diff --git a/cooking.lua b/cooking.lua index 0f4fd28..43c8331 100644 --- a/cooking.lua +++ b/cooking.lua @@ -1,4 +1,4 @@ -minetest.register_alias("xdecor:cauldron", "xdecor:cauldron_empty") +minetest.register_alias("xdecor:cauldron", "xdecor:cauldron_empty") -- legacy code local cauldron_cbox = { type = "fixed", diff --git a/enchanting.lua b/enchanting.lua index 64604bc..b8889d2 100644 --- a/enchanting.lua +++ b/enchanting.lua @@ -172,7 +172,6 @@ for _, tooldef in next, defs, 1 do for _, ench in pairs(tooldef[3]) do local tool, group, material, enchant = tooldef[1], tooldef[2], mat, ench local original_tool = minetest.registered_tools[mod..":"..tool.."_"..material] - local ceil = math.ceil if original_tool then if mod == "default" then @@ -184,7 +183,7 @@ for _, ench in pairs(tooldef[3]) do local max_drop_level = original_tool.tool_capabilities.max_drop_level if enchant == "durable" then - groupcaps[group].uses = ceil(original_groupcaps[group].uses * use_factor) + groupcaps[group].uses = math.ceil(original_groupcaps[group].uses * use_factor) elseif enchant == "fast" then for i = 1, 3 do groupcaps[group].times[i] = original_groupcaps[group].times[i] - times_subtractor @@ -213,7 +212,7 @@ for _, ench in pairs(tooldef[3]) do for armor_group, value in pairs(original_armor_groups) do if enchant == "strong" then - armorcaps[armor_group] = ceil(value * strength_factor) + armorcaps[armor_group] = math.ceil(value * strength_factor) elseif enchant == "speed" then armorcaps[armor_group] = value armorcaps.physics_speed = speed_factor @@ -231,7 +230,8 @@ for _, ench in pairs(tooldef[3]) do }) end end - minetest.register_alias("xdecor:enchanted_"..tool.."_"..material.."_"..enchant, mod..":enchanted_"..tool.."_"..material.."_"..enchant) + minetest.register_alias("xdecor:enchanted_"..tool.."_"..material.."_"..enchant, mod.. + ":enchanted_"..tool.."_"..material.."_"..enchant) -- legacy code end end end diff --git a/nodes.lua b/nodes.lua index 584c9b8..f118a3e 100644 --- a/nodes.lua +++ b/nodes.lua @@ -373,7 +373,7 @@ xdecor.register("painting_1", { end }) -minetest.register_alias("xdecor:painting", "xdecor:painting_1") +minetest.register_alias("xdecor:painting", "xdecor:painting_1") -- legacy code for i = 2, 4 do xdecor.register("painting_"..i, { diff --git a/worktable.lua b/worktable.lua index 1880b72..84c1c73 100644 --- a/worktable.lua +++ b/worktable.lua @@ -277,7 +277,7 @@ function worktable.fields(pos, _, fields, sender) end worktable.crafting(pos) elseif fields.craftguide then - if not meta:to_table().inventory.inv_items_list then return end + if not meta:to_table().inventory.inv_items_list then return end -- legacy code worktable.craft_output_recipe(pos, 0, 1, nil, "") elseif fields.alternate then inv:set_list("craft_output_recipe", {}) @@ -488,7 +488,7 @@ for _, name in pairs(n) do on_place = minetest.rotate_node }) end - minetest.register_alias("xdecor:"..d[1].."_"..name, mod..":"..name.."_"..d[1]) + minetest.register_alias("xdecor:"..d[1].."_"..name, mod..":"..name.."_"..d[1]) -- legacy code end end end