diff options
author | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-12-19 18:17:22 +0000 |
---|---|---|
committer | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-12-19 18:17:22 +0000 |
commit | 755dd262086da5469489d74c919e6870870eca57 (patch) | |
tree | dbfb2d5e062aa21f0f9513462293138b6ae64a59 | |
parent | 56362cdd2acd8e855ceb79b46ce0b62f205776da (diff) |
item_transport.lua: move tube limit checking before can_go() callback in go_next()
-rw-r--r-- | item_transport.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/item_transport.lua b/item_transport.lua index cf9e5c4..154b6db 100644 --- a/item_transport.lua +++ b/item_transport.lua @@ -89,6 +89,9 @@ local function go_next(pos, velocity, stack, owner) speed = 1 end vel.speed = speed + + crunch_tube(pos, cnode, cmeta) + if minetest.registered_nodes[cnode.name] and minetest.registered_nodes[cnode.name].tube and minetest.registered_nodes[cnode.name].tube.can_go then can_go = minetest.registered_nodes[cnode.name].tube.can_go(pos, cnode, vel, stack) else @@ -116,8 +119,6 @@ local function go_next(pos, velocity, stack, owner) end end - crunch_tube(pos, cnode, cmeta) - if not next_positions[1] then return false, nil end |