forked from Wuzzy/realtest_mt5
Fix another undeclared globals
This commit is contained in:
parent
21b8f831ee
commit
6cec6e6a12
|
@ -29,7 +29,7 @@ minetest.register_entity(":__builtin:item", {
|
||||||
item_texture = minetest.registered_items[itemname].inventory_image
|
item_texture = minetest.registered_items[itemname].inventory_image
|
||||||
item_type = minetest.registered_items[itemname].type
|
item_type = minetest.registered_items[itemname].type
|
||||||
end
|
end
|
||||||
prop = {
|
local prop = {
|
||||||
is_visible = true,
|
is_visible = true,
|
||||||
visual = "sprite",
|
visual = "sprite",
|
||||||
textures = {"unknown_item.png"}
|
textures = {"unknown_item.png"}
|
||||||
|
|
|
@ -32,7 +32,7 @@ function realtest.register_on_updatenode(func)
|
||||||
end
|
end
|
||||||
minetest.register_on_updatenode = realtest.register_on_updatenode
|
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
|
for _, callback in ipairs(realtest.registered_on_updatenodes) do
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
callback(pos, node)
|
callback(pos, node)
|
||||||
|
@ -43,7 +43,7 @@ function minetest.check_for_falling(pos)
|
||||||
for x = -1,1 do
|
for x = -1,1 do
|
||||||
for y = -1,1 do
|
for y = -1,1 do
|
||||||
for z = -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)
|
nodeupdate_single(pos2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -169,7 +169,7 @@ minetest.register_entity(":__builtin:falling_node", {
|
||||||
item_texture = minetest.registered_items[itemname].inventory_image
|
item_texture = minetest.registered_items[itemname].inventory_image
|
||||||
item_type = minetest.registered_items[itemname].type
|
item_type = minetest.registered_items[itemname].type
|
||||||
end
|
end
|
||||||
prop = {
|
local prop = {
|
||||||
is_visible = true,
|
is_visible = true,
|
||||||
textures = {nodename},
|
textures = {nodename},
|
||||||
}
|
}
|
||||||
|
|
|
@ -364,7 +364,7 @@ minetest.register_abm({
|
||||||
interval = 0.5,
|
interval = 0.5,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
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
|
for i, player in ipairs(players) do
|
||||||
player:set_hp(player:get_hp() - 1)
|
player:set_hp(player:get_hp() - 1)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue