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

Updated mesecons and pipeworks

- Added security on devices from pipeworks (breaker,placer)
- Added new mod in mesecons : mesecons_stickyblocks
This commit is contained in:
LeMagnesium
2015-03-31 18:08:41 +02:00
parent fee70f8fc3
commit a6bfdd377c
8 changed files with 114 additions and 80 deletions

View File

@ -135,8 +135,12 @@ end
-- returns true if player was found, false if not
local node_detector_scan = function (pos)
local node = minetest.get_node(pos)
local frontpos = vector.subtract(pos, minetest.facedir_to_dir(node.param2))
if not pos then return end
local node = minetest.get_node_or_nil(pos)
if not node then return end
local scandir = minetest.facedir_to_dir(node.param2)
if not scandir then return end
local frontpos = vector.subtract(pos, scandir)
local frontnode = minetest.get_node(frontpos)
local meta = minetest.get_meta(pos)
return (frontnode.name == meta:get_string("scanname")) or