diff options
author | LNJ <git@lnj.li> | 2017-04-05 13:17:08 +0200 |
---|---|---|
committer | LNJ <git@lnj.li> | 2017-04-05 14:53:16 +0200 |
commit | ad3bbe8664199c1b27eaece422f23784512e5d05 (patch) | |
tree | 7eca4598fd24cb9bec88c310e227b70cdb23c726 /lua/api.lua | |
parent | 03e692d72a9772fc6d5ca875ff7416e333cb01fb (diff) |
Adjust pipeworks support (on insert object) for 2x2 drawers
Diffstat (limited to 'lua/api.lua')
-rwxr-xr-x | lua/api.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lua/api.lua b/lua/api.lua index 414245e..af91e0f 100755 --- a/lua/api.lua +++ b/lua/api.lua @@ -109,10 +109,13 @@ function drawers.drawer_on_dig(pos, node, player) end function drawers.drawer_insert_object(pos, node, stack, direction) - local drawer_visual = drawers.drawer_visuals[core.serialize(pos)] - if not drawer_visual then return stack end + local drawer_visuals = drawers.drawer_visuals[core.serialize(pos)] + if not drawer_visuals then return stack end - local leftover = drawer_visual.try_insert_stack(drawer_visual, stack, true) + local leftover = stack + for _, visual in pairs(drawer_visuals) do + leftover = visual.try_insert_stack(visual, leftover, true) + end return leftover end |