1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

passage de variables global en local

passage de variables global en local
This commit is contained in:
2015-01-14 17:33:46 +01:00
committed by LeMagnesium
parent c35814348b
commit 916f3cb093
6 changed files with 20 additions and 20 deletions

View File

@ -1,6 +1,6 @@
function spawn_falling_node(p, node, owners)
obj = minetest.add_entity(p, "__builtin:falling_node")
local obj = minetest.add_entity(p, "__builtin:falling_node")
obj:get_luaentity():set_node(node)
obj:get_luaentity():set_owner(owners)
end
@ -52,10 +52,10 @@ end
--
function nodeupdate_single(p, delay)
n = minetest.get_node(p)
local n = minetest.get_node(p)
if minetest.get_item_group(n.name, "falling_node") ~= 0 then
p_bottom = {x=p.x, y=p.y-1, z=p.z}
n_bottom = minetest.get_node(p_bottom)
local p_bottom = {x=p.x, y=p.y-1, z=p.z}
local n_bottom = minetest.get_node(p_bottom)
-- Note: walkable is in the node definition, not in item groups
if minetest.registered_nodes[n_bottom.name] and
(minetest.get_item_group(n.name, "float") == 0 or

View File

@ -29,7 +29,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 = {node.name},
}