mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-26 12:33:43 +01:00
Remove recipe from caches after calling clear_craft()
This commit is contained in:
parent
97036d9f9a
commit
937b40aae4
14
init.lua
14
init.lua
@ -1249,6 +1249,20 @@ core.register_craft = function(def)
|
||||
end
|
||||
end
|
||||
|
||||
local old_clear_craft = core.clear_craft
|
||||
|
||||
core.clear_craft = function(def)
|
||||
old_clear_craft(def)
|
||||
|
||||
if true_str(def) then
|
||||
recipes_cache[def] = nil
|
||||
fuel_cache[def] = nil
|
||||
|
||||
elseif is_table(def) then
|
||||
return -- TODO
|
||||
end
|
||||
end
|
||||
|
||||
local function handle_drops_table(name, drop)
|
||||
-- Code borrowed and modified from unified_inventory
|
||||
-- https://github.com/minetest-mods/unified_inventory/blob/master/api.lua
|
||||
|
Loading…
Reference in New Issue
Block a user