mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-12-23 08:20:21 +01:00
minetest.env:* --> minetest.*
This commit is contained in:
parent
4b148c416b
commit
4de58abc31
@ -30,7 +30,7 @@ computer.register = function ( name, def )
|
|||||||
if (def.on_turn_off(pos, node, clicker, itemstack)) then return; end
|
if (def.on_turn_off(pos, node, clicker, itemstack)) then return; end
|
||||||
end
|
end
|
||||||
node.name = OFFSTATE;
|
node.name = OFFSTATE;
|
||||||
minetest.env:set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos);
|
nodeupdate(pos);
|
||||||
end;
|
end;
|
||||||
});
|
});
|
||||||
@ -55,7 +55,7 @@ computer.register = function ( name, def )
|
|||||||
if (def.on_turn_on(pos, node, clicker, itemstack)) then return; end
|
if (def.on_turn_on(pos, node, clicker, itemstack)) then return; end
|
||||||
end
|
end
|
||||||
node.name = ONSTATE;
|
node.name = ONSTATE;
|
||||||
minetest.env:set_node(pos, node);
|
minetest.set_node(pos, node);
|
||||||
nodeupdate(pos);
|
nodeupdate(pos);
|
||||||
end;
|
end;
|
||||||
drop = ONSTATE;
|
drop = ONSTATE;
|
||||||
|
@ -47,9 +47,9 @@ facedir[3] = {x=-1,y=0,z=0}
|
|||||||
local remove_item = function(pos, node)
|
local remove_item = function(pos, node)
|
||||||
local objs = nil
|
local objs = nil
|
||||||
if node.name == "itemframes:frame" then
|
if node.name == "itemframes:frame" then
|
||||||
objs = minetest.env:get_objects_inside_radius(pos, .5)
|
objs = minetest.get_objects_inside_radius(pos, .5)
|
||||||
elseif node.name == "itemframes:pedestal" then
|
elseif node.name == "itemframes:pedestal" then
|
||||||
objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y+1,z=pos.z}, .5)
|
objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y+1,z=pos.z}, .5)
|
||||||
end
|
end
|
||||||
if objs then
|
if objs then
|
||||||
for _, obj in ipairs(objs) do
|
for _, obj in ipairs(objs) do
|
||||||
@ -62,7 +62,7 @@ end
|
|||||||
|
|
||||||
local update_item = function(pos, node)
|
local update_item = function(pos, node)
|
||||||
remove_item(pos, node)
|
remove_item(pos, node)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if meta:get_string("item") ~= "" then
|
if meta:get_string("item") ~= "" then
|
||||||
if node.name == "itemframes:frame" then
|
if node.name == "itemframes:frame" then
|
||||||
local posad = facedir[node.param2]
|
local posad = facedir[node.param2]
|
||||||
@ -75,7 +75,7 @@ local update_item = function(pos, node)
|
|||||||
end
|
end
|
||||||
tmp.nodename = node.name
|
tmp.nodename = node.name
|
||||||
tmp.texture = ItemStack(meta:get_string("item")):get_name()
|
tmp.texture = ItemStack(meta:get_string("item")):get_name()
|
||||||
local e = minetest.env:add_entity(pos,"itemframes:item")
|
local e = minetest.add_entity(pos,"itemframes:item")
|
||||||
if node.name == "itemframes:frame" then
|
if node.name == "itemframes:frame" then
|
||||||
local yaw = math.pi*2 - node.param2 * math.pi/2
|
local yaw = math.pi*2 - node.param2 * math.pi/2
|
||||||
e:setyaw(yaw)
|
e:setyaw(yaw)
|
||||||
@ -84,12 +84,12 @@ local update_item = function(pos, node)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local drop_item = function(pos, node)
|
local drop_item = function(pos, node)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if meta:get_string("item") ~= "" then
|
if meta:get_string("item") ~= "" then
|
||||||
if node.name == "itemframes:frame" then
|
if node.name == "itemframes:frame" then
|
||||||
minetest.env:add_item(pos, meta:get_string("item"))
|
minetest.add_item(pos, meta:get_string("item"))
|
||||||
elseif node.name == "itemframes:pedestal" then
|
elseif node.name == "itemframes:pedestal" then
|
||||||
minetest.env:add_item({x=pos.x,y=pos.y+1,z=pos.z}, meta:get_string("item"))
|
minetest.add_item({x=pos.x,y=pos.y+1,z=pos.z}, meta:get_string("item"))
|
||||||
end
|
end
|
||||||
meta:set_string("item","")
|
meta:set_string("item","")
|
||||||
end
|
end
|
||||||
@ -111,13 +111,13 @@ minetest.register_node("itemframes:frame",{
|
|||||||
legacy_wallmounted = true,
|
legacy_wallmounted = true,
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
after_place_node = function(pos, placer, itemstack)
|
after_place_node = function(pos, placer, itemstack)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("owner",placer:get_player_name())
|
meta:set_string("owner",placer:get_player_name())
|
||||||
meta:set_string("infotext","Item frame (owned by "..placer:get_player_name()..")")
|
meta:set_string("infotext","Item frame (owned by "..placer:get_player_name()..")")
|
||||||
end,
|
end,
|
||||||
on_rightclick = function(pos, node, clicker, itemstack)
|
on_rightclick = function(pos, node, clicker, itemstack)
|
||||||
if not itemstack then return end
|
if not itemstack then return end
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if clicker:get_player_name() == meta:get_string("owner") then
|
if clicker:get_player_name() == meta:get_string("owner") then
|
||||||
drop_item(pos,node)
|
drop_item(pos,node)
|
||||||
local s = itemstack:take_item()
|
local s = itemstack:take_item()
|
||||||
@ -127,14 +127,14 @@ minetest.register_node("itemframes:frame",{
|
|||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
on_punch = function(pos,node,puncher)
|
on_punch = function(pos,node,puncher)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if puncher:get_player_name() == meta:get_string("owner") then
|
if puncher:get_player_name() == meta:get_string("owner") then
|
||||||
drop_item(pos, node)
|
drop_item(pos, node)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
can_dig = function(pos,player)
|
can_dig = function(pos,player)
|
||||||
|
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
return player:get_player_name() == meta:get_string("owner")
|
return player:get_player_name() == meta:get_string("owner")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -155,13 +155,13 @@ minetest.register_node("itemframes:pedestal",{
|
|||||||
groups = { cracky=3 },
|
groups = { cracky=3 },
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
after_place_node = function(pos, placer, itemstack)
|
after_place_node = function(pos, placer, itemstack)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("owner",placer:get_player_name())
|
meta:set_string("owner",placer:get_player_name())
|
||||||
meta:set_string("infotext","Pedestal (owned by "..placer:get_player_name()..")")
|
meta:set_string("infotext","Pedestal (owned by "..placer:get_player_name()..")")
|
||||||
end,
|
end,
|
||||||
on_rightclick = function(pos, node, clicker, itemstack)
|
on_rightclick = function(pos, node, clicker, itemstack)
|
||||||
if not itemstack then return end
|
if not itemstack then return end
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if clicker:get_player_name() == meta:get_string("owner") then
|
if clicker:get_player_name() == meta:get_string("owner") then
|
||||||
drop_item(pos,node)
|
drop_item(pos,node)
|
||||||
local s = itemstack:take_item()
|
local s = itemstack:take_item()
|
||||||
@ -171,14 +171,14 @@ minetest.register_node("itemframes:pedestal",{
|
|||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
on_punch = function(pos,node,puncher)
|
on_punch = function(pos,node,puncher)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if puncher:get_player_name() == meta:get_string("owner") then
|
if puncher:get_player_name() == meta:get_string("owner") then
|
||||||
drop_item(pos,node)
|
drop_item(pos,node)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
can_dig = function(pos,player)
|
can_dig = function(pos,player)
|
||||||
|
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
return player:get_player_name() == meta:get_string("owner")
|
return player:get_player_name() == meta:get_string("owner")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -26,7 +26,7 @@ minetest.register_node("lrfurn:coffeetable_back", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local node = minetest.env:get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local param2 = node.param2
|
local param2 = node.param2
|
||||||
node.name = "lrfurn:coffeetable_front"
|
node.name = "lrfurn:coffeetable_front"
|
||||||
if param2 == 0 then
|
if param2 == 0 then
|
||||||
@ -38,13 +38,13 @@ minetest.register_node("lrfurn:coffeetable_back", {
|
|||||||
elseif param2 == 3 then
|
elseif param2 == 3 then
|
||||||
pos.x = pos.x-1
|
pos.x = pos.x-1
|
||||||
end
|
end
|
||||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
||||||
minetest.env:set_node(pos, node)
|
minetest.set_node(pos, node)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_destruct = function(pos)
|
on_destruct = function(pos)
|
||||||
local node = minetest.env:get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local param2 = node.param2
|
local param2 = node.param2
|
||||||
if param2 == 0 then
|
if param2 == 0 then
|
||||||
pos.z = pos.z+1
|
pos.z = pos.z+1
|
||||||
@ -55,9 +55,9 @@ minetest.register_node("lrfurn:coffeetable_back", {
|
|||||||
elseif param2 == 3 then
|
elseif param2 == 3 then
|
||||||
pos.x = pos.x-1
|
pos.x = pos.x-1
|
||||||
end
|
end
|
||||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:coffeetable_front" ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:coffeetable_front" ) then
|
||||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||||
minetest.env:remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -48,7 +48,7 @@ for i in ipairs(longsofas_list) do
|
|||||||
},
|
},
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local node = minetest.env:get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local param2 = node.param2
|
local param2 = node.param2
|
||||||
node.name = "lrfurn:longsofa_middle_"..colour
|
node.name = "lrfurn:longsofa_middle_"..colour
|
||||||
if param2 == 0 then
|
if param2 == 0 then
|
||||||
@ -60,8 +60,8 @@ for i in ipairs(longsofas_list) do
|
|||||||
elseif param2 == 3 then
|
elseif param2 == 3 then
|
||||||
pos.x = pos.x-1
|
pos.x = pos.x-1
|
||||||
end
|
end
|
||||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
||||||
minetest.env:set_node(pos, node)
|
minetest.set_node(pos, node)
|
||||||
node.name = "lrfurn:longsofa_left_"..colour
|
node.name = "lrfurn:longsofa_left_"..colour
|
||||||
if param2 == 0 then
|
if param2 == 0 then
|
||||||
pos.z = pos.z+1
|
pos.z = pos.z+1
|
||||||
@ -72,14 +72,14 @@ for i in ipairs(longsofas_list) do
|
|||||||
elseif param2 == 3 then
|
elseif param2 == 3 then
|
||||||
pos.x = pos.x-1
|
pos.x = pos.x-1
|
||||||
end
|
end
|
||||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
||||||
minetest.env:set_node(pos, node)
|
minetest.set_node(pos, node)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_destruct = function(pos)
|
on_destruct = function(pos)
|
||||||
local node = minetest.env:get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local param2 = node.param2
|
local param2 = node.param2
|
||||||
if param2 == 0 then
|
if param2 == 0 then
|
||||||
pos.z = pos.z+1
|
pos.z = pos.z+1
|
||||||
@ -90,9 +90,9 @@ for i in ipairs(longsofas_list) do
|
|||||||
elseif param2 == 3 then
|
elseif param2 == 3 then
|
||||||
pos.x = pos.x-1
|
pos.x = pos.x-1
|
||||||
end
|
end
|
||||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:longsofa_middle_"..colour ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:longsofa_middle_"..colour ) then
|
||||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||||
minetest.env:remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
if param2 == 0 then
|
if param2 == 0 then
|
||||||
pos.z = pos.z+1
|
pos.z = pos.z+1
|
||||||
elseif param2 == 1 then
|
elseif param2 == 1 then
|
||||||
@ -102,9 +102,9 @@ for i in ipairs(longsofas_list) do
|
|||||||
elseif param2 == 3 then
|
elseif param2 == 3 then
|
||||||
pos.x = pos.x-1
|
pos.x = pos.x-1
|
||||||
end
|
end
|
||||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:longsofa_left_"..colour ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:longsofa_left_"..colour ) then
|
||||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||||
minetest.env:remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -48,7 +48,7 @@ for i in ipairs(sofas_list) do
|
|||||||
},
|
},
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local node = minetest.env:get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local param2 = node.param2
|
local param2 = node.param2
|
||||||
node.name = "lrfurn:sofa_left_"..colour
|
node.name = "lrfurn:sofa_left_"..colour
|
||||||
if param2 == 0 then
|
if param2 == 0 then
|
||||||
@ -60,13 +60,13 @@ for i in ipairs(sofas_list) do
|
|||||||
elseif param2 == 3 then
|
elseif param2 == 3 then
|
||||||
pos.x = pos.x-1
|
pos.x = pos.x-1
|
||||||
end
|
end
|
||||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
||||||
minetest.env:set_node(pos, node)
|
minetest.set_node(pos, node)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_destruct = function(pos)
|
on_destruct = function(pos)
|
||||||
local node = minetest.env:get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local param2 = node.param2
|
local param2 = node.param2
|
||||||
if param2 == 0 then
|
if param2 == 0 then
|
||||||
pos.z = pos.z+1
|
pos.z = pos.z+1
|
||||||
@ -77,9 +77,9 @@ for i in ipairs(sofas_list) do
|
|||||||
elseif param2 == 3 then
|
elseif param2 == 3 then
|
||||||
pos.x = pos.x-1
|
pos.x = pos.x-1
|
||||||
end
|
end
|
||||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:sofa_left_"..colour ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:sofa_left_"..colour ) then
|
||||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||||
minetest.env:remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -215,146 +215,146 @@ after_place_node = function(pos,placer,itemstack)
|
|||||||
local p = {x=pos.x, y=pos.y, z=pos.z}
|
local p = {x=pos.x, y=pos.y, z=pos.z}
|
||||||
if param2 == 0 then
|
if param2 == 0 then
|
||||||
pos.x = pos.x-1
|
pos.x = pos.x-1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen4", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen4", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.x = pos.x+2
|
pos.x = pos.x+2
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen6", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen6", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.y = pos.y+1
|
pos.y = pos.y+1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen3", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen3", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.x = pos.x-1
|
pos.x = pos.x-1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen2", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen2", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.x = pos.x-1
|
pos.x = pos.x-1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen1", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen1", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
elseif param2 == 1 then
|
elseif param2 == 1 then
|
||||||
pos.z = pos.z+1
|
pos.z = pos.z+1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen4", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen4", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.z = pos.z-2
|
pos.z = pos.z-2
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen6", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen6", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.y = pos.y+1
|
pos.y = pos.y+1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen3", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen3", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.z = pos.z+1
|
pos.z = pos.z+1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen2", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen2", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.z = pos.z+1
|
pos.z = pos.z+1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen1", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen1", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
elseif param2 == 2 then
|
elseif param2 == 2 then
|
||||||
pos.x = pos.x+1
|
pos.x = pos.x+1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen4", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen4", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.x = pos.x-2
|
pos.x = pos.x-2
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen6", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen6", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.y = pos.y+1
|
pos.y = pos.y+1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen3", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen3", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.x = pos.x+1
|
pos.x = pos.x+1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen2", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen2", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.x = pos.x+1
|
pos.x = pos.x+1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen1", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen1", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
elseif param2 == 3 then
|
elseif param2 == 3 then
|
||||||
pos.z = pos.z-1
|
pos.z = pos.z-1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen4", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen4", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.z = pos.z+2
|
pos.z = pos.z+2
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen6", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen6", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.y = pos.y+1
|
pos.y = pos.y+1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen3", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen3", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.z = pos.z-1
|
pos.z = pos.z-1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen2", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen2", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
pos.z = pos.z-1
|
pos.z = pos.z-1
|
||||||
if minetest.registered_nodes[minetest.env:get_node(pos).name].buildable_to then
|
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||||
minetest.set_node(pos,{name="plasmascreen:screen1", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.set_node(pos,{name="plasmascreen:screen1", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
else
|
else
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user