mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-25 20:23:42 +01:00
Fixed comment
This commit is contained in:
parent
07820fa37c
commit
9dd63cd83a
16
init.lua
16
init.lua
@ -877,20 +877,22 @@ local function reset_data(data)
|
||||
data.items = data.items_raw
|
||||
end
|
||||
|
||||
-- As `core.get_craft_recipe` and `core.get_all_craft_recipes` do not return the replacements,
|
||||
-- we have to override `core.register_craft` and `core.register_alias` and do some reverse engineering.
|
||||
-- See engine's issues #4901 and #8920.
|
||||
|
||||
fuel_cache.replacements = {}
|
||||
|
||||
local old_register_alias = core.register_alias
|
||||
local old_register_craft = core.register_craft
|
||||
|
||||
core.register_alias = function(old, new)
|
||||
old_register_alias(old, new)
|
||||
alias_cache[new] = old
|
||||
end
|
||||
|
||||
--[[ As `core.get_craft_recipe` and `core.get_all_craft_recipes` do not
|
||||
return the replacements and toolrepair, we have to override
|
||||
`core.register_craft` and do some reverse engineering.
|
||||
See engine's issues #4901 and #8920. ]]
|
||||
|
||||
fuel_cache.replacements = {}
|
||||
|
||||
local old_register_craft = core.register_craft
|
||||
|
||||
core.register_craft = function(def)
|
||||
old_register_craft(def)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user