Fix weird read of tooldef in jewels mod

This commit is contained in:
Wuzzy 2020-01-31 07:36:51 +01:00
parent 80d840d201
commit ba9c742853

View File

@ -90,8 +90,7 @@ function jewels.register_jewel(toolname, new_toolname, def)
end end
jewels.registered_jewel_parents[new_toolname] = newparent jewels.registered_jewel_parents[new_toolname] = newparent
local tooldef = minetest.deserialize( local tooldef = minetest.registered_tools[toolname]
minetest.serialize(minetest.registered_tools[toolname]))
if not tooldef then if not tooldef then
minetest.log("warning", minetest.log("warning",
@ -111,7 +110,7 @@ function jewels.register_jewel(toolname, new_toolname, def)
new_tool_wieldimage = "(" .. tooldef.wield_image .. ")^(" .. data.overlay_wield .. ")" new_tool_wieldimage = "(" .. tooldef.wield_image .. ")^(" .. data.overlay_wield .. ")"
end end
local new_tooldef = tooldef local new_tooldef = table.copy(tooldef)
local desc local desc
if data.description ~= nil then if data.description ~= nil then
desc = data.description desc = data.description