Clean up output and update changelog
This commit is contained in:
parent
3ea6649f68
commit
da04d2e26f
|
@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- Refactor recipe override mechanism to avoid re-coding recipes
|
||||
when we only want to change the amount produced.
|
||||
- Realign rail recipe to the changes made in Minetest Game. All rail recipes
|
||||
(standard, power, break) are boosted by 50%.
|
||||
|
||||
### Fixed
|
||||
|
||||
- [Fixed strange placement behavior for non-default Stairs+ nodes.](https://github.com/minetest-mods/moreblocks/pull/168)
|
||||
|
|
|
@ -5,6 +5,8 @@ Copyright © 2011-2020 Hugo Locurcio and contributors.
|
|||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
-- Redefine some of the default crafting recipes to be more productive
|
||||
|
||||
-- Auxiliary function: take a recipe as returned by get_all_craft_recipes
|
||||
|
@ -39,14 +41,13 @@ local change_recipe_amount = function(product, recipe, func)
|
|||
redo.output = ("%s %d"):format(product, newamount)
|
||||
minetest.register_craft(redo)
|
||||
|
||||
minetest.log(("moreblocks recipe for %s production: %d => %d"):format(product, oldamount, newamount))
|
||||
minetest.log("action", ("[MOD]%s: recipe for %s production: %d => %d"):format(modname, product, oldamount, newamount))
|
||||
end
|
||||
|
||||
local increase_craft_production = function(product, func)
|
||||
local recipes = minetest.get_all_craft_recipes(product)
|
||||
for _, r in pairs(recipes) do
|
||||
if r.type == "normal" or r.method == "normal" then
|
||||
minetest.log(dump(r))
|
||||
change_recipe_amount(product, r, func)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue