From 6cec6e6a125e0bf879744f434b12608f4a4d2bdb Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 30 Mar 2020 23:10:46 +0200 Subject: [PATCH] Fix another undeclared globals --- mods/builtin_item/init.lua | 2 +- mods/core/falling.lua | 6 +++--- mods/default/init.lua | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mods/builtin_item/init.lua b/mods/builtin_item/init.lua index e5415b4..26ef2f4 100644 --- a/mods/builtin_item/init.lua +++ b/mods/builtin_item/init.lua @@ -29,7 +29,7 @@ minetest.register_entity(":__builtin:item", { item_texture = minetest.registered_items[itemname].inventory_image item_type = minetest.registered_items[itemname].type end - prop = { + local prop = { is_visible = true, visual = "sprite", textures = {"unknown_item.png"} diff --git a/mods/core/falling.lua b/mods/core/falling.lua index 91d6925..ee304a9 100644 --- a/mods/core/falling.lua +++ b/mods/core/falling.lua @@ -32,7 +32,7 @@ function realtest.register_on_updatenode(func) end minetest.register_on_updatenode = realtest.register_on_updatenode -function nodeupdate_single(pos) +local function nodeupdate_single(pos) for _, callback in ipairs(realtest.registered_on_updatenodes) do local node = minetest.get_node(pos) callback(pos, node) @@ -43,7 +43,7 @@ function minetest.check_for_falling(pos) for x = -1,1 do for y = -1,1 do for z = -1,1 do - pos2 = {x=pos.x+x, y=pos.y+y, z=pos.z+z} + local pos2 = {x=pos.x+x, y=pos.y+y, z=pos.z+z} nodeupdate_single(pos2) end end @@ -169,7 +169,7 @@ minetest.register_entity(":__builtin:falling_node", { item_texture = minetest.registered_items[itemname].inventory_image item_type = minetest.registered_items[itemname].type end - prop = { + local prop = { is_visible = true, textures = {nodename}, } diff --git a/mods/default/init.lua b/mods/default/init.lua index 8fb8c4c..bc73736 100644 --- a/mods/default/init.lua +++ b/mods/default/init.lua @@ -364,7 +364,7 @@ minetest.register_abm({ interval = 0.5, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) - players = minetest.get_objects_inside_radius(pos, 1) + local players = minetest.get_objects_inside_radius(pos, 1) for i, player in ipairs(players) do player:set_hp(player:get_hp() - 1) end