Fix another undeclared globals

This commit is contained in:
Wuzzy 2020-03-30 23:10:46 +02:00
parent 21b8f831ee
commit 6cec6e6a12
3 changed files with 5 additions and 5 deletions

View File

@ -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"}

View File

@ -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},
}

View File

@ -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