mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-26 09:03:46 +01:00
Disallow pushing into invalid faces
This commit is contained in:
parent
c0f2ffc99a
commit
8f896b65c4
@ -431,6 +431,14 @@ end
|
||||
function tubelib.push_items(pos, side, items, player_name)
|
||||
local npos, nside, name = get_dest_node(pos, side)
|
||||
if npos == nil then return end
|
||||
|
||||
local _,node = Tube:get_node(pos)
|
||||
local dir = side_to_dir(side, node.param2)
|
||||
local node, _, valid = Tube:get_secondary_node(pos, dir)
|
||||
if node and not valid then
|
||||
return false
|
||||
end
|
||||
|
||||
if tubelib_NodeDef[name] and tubelib_NodeDef[name].on_push_item then
|
||||
return tubelib_NodeDef[name].on_push_item(npos, nside, items, player_name)
|
||||
elseif name == "air" then
|
||||
|
Loading…
Reference in New Issue
Block a user