From a2926e724c15fbef124af384dda69c964ea2328b Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Sat, 23 Mar 2019 19:30:59 +0100 Subject: [PATCH] Warehouse boxes bugfix for the Blackhole bugfix --- techpack_warehouse/box_copper.lua | 2 +- techpack_warehouse/box_gold.lua | 2 +- techpack_warehouse/box_steel.lua | 2 +- techpack_warehouse/common.lua | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/techpack_warehouse/box_copper.lua b/techpack_warehouse/box_copper.lua index 8aa92fe..dc541c3 100644 --- a/techpack_warehouse/box_copper.lua +++ b/techpack_warehouse/box_copper.lua @@ -130,7 +130,7 @@ tubelib.register_node(NODE_NAME, {NODE_NAME.."_active", NODE_NAME.."_defect"}, { on_push_item = function(pos, side, item) local meta = M(pos) - meta:set_string("push_dir", side) + meta:set_string("push_dir", wh.Turn180[side]) local num = wh.numbers_to_shift(Box, meta, item) if num > 0 then item:set_count(num) diff --git a/techpack_warehouse/box_gold.lua b/techpack_warehouse/box_gold.lua index 0546dad..5f80712 100644 --- a/techpack_warehouse/box_gold.lua +++ b/techpack_warehouse/box_gold.lua @@ -130,7 +130,7 @@ tubelib.register_node(NODE_NAME, {NODE_NAME.."_active", NODE_NAME.."_defect"}, { on_push_item = function(pos, side, item) local meta = M(pos) - meta:set_string("push_dir", side) + meta:set_string("push_dir", wh.Turn180[side]) local num = wh.numbers_to_shift(Box, meta, item) if num > 0 then item:set_count(num) diff --git a/techpack_warehouse/box_steel.lua b/techpack_warehouse/box_steel.lua index 28197b9..9e26082 100644 --- a/techpack_warehouse/box_steel.lua +++ b/techpack_warehouse/box_steel.lua @@ -130,7 +130,7 @@ tubelib.register_node(NODE_NAME, {NODE_NAME.."_active", NODE_NAME.."_defect"}, { on_push_item = function(pos, side, item) local meta = M(pos) - meta:set_string("push_dir", side) + meta:set_string("push_dir", wh.Turn180[side]) local num = wh.numbers_to_shift(Box, meta, item) if num > 0 then item:set_count(num) diff --git a/techpack_warehouse/common.lua b/techpack_warehouse/common.lua index 94da059..84d5d00 100644 --- a/techpack_warehouse/common.lua +++ b/techpack_warehouse/common.lua @@ -21,9 +21,11 @@ local STANDBY_TICKS = 4 local COUNTDOWN_TICKS = 2 local CYCLE_TIME = 2 + local Cache = {} techpack_warehouse.Box = {} +techpack_warehouse.Turn180 = {F="B", L="R", B="F", R="L", U="D", D="U"} local function formspec(self, pos, meta) return "size[10,9]"..