mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 11:53:46 +01:00
fix crash then using function in _mcl_armor_[texture, preview]
tool field
This commit is contained in:
parent
e40ed91674
commit
e9437e9e1e
@ -270,8 +270,14 @@ function mcl_enchanting.initialize()
|
||||
new_def.groups.not_in_creative_inventory = 1
|
||||
new_def.groups.not_in_craft_guide = 1
|
||||
new_def.groups.enchanted = 1
|
||||
new_def._mcl_armor_texture = new_def._mcl_armor_texture and new_def._mcl_armor_texture .. mcl_enchanting.overlay
|
||||
new_def._mcl_armor_preview = new_def._mcl_armor_preview and new_def._mcl_armor_preview .. mcl_enchanting.overlay
|
||||
|
||||
if new_def._mcl_armor_texture and not type(new_def._mcl_armor_texture) == "function" then
|
||||
new_def._mcl_armor_texture = new_def._mcl_armor_texture .. mcl_enchanting.overlay
|
||||
end
|
||||
if new_def._mcl_armor_preview and not type(new_def._mcl_armor_preview) == "function" then
|
||||
new_def._mcl_armor_preview = new_def._mcl_armor_preview .. mcl_enchanting.overlay
|
||||
end
|
||||
|
||||
new_def._mcl_enchanting_enchanted_tool = new_name
|
||||
new_def.after_use = get_after_use_callback(itemdef)
|
||||
local register_list = register_item_list
|
||||
|
Loading…
Reference in New Issue
Block a user