From f1ce83a4f97e78e1761db8bd077b73b050d176d6 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Mon, 7 Apr 2025 22:35:58 +0900 Subject: [PATCH] . --- PHI-CL/control.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PHI-CL/control.lua b/PHI-CL/control.lua index a8922fc..40c3360 100644 --- a/PHI-CL/control.lua +++ b/PHI-CL/control.lua @@ -74,8 +74,9 @@ if settings.startup['PHI-CT'].value then function gui_update(player, inserter) local gui = player.gui.relative.inserter_config - local pos_p = inserter.inserter_pickup_position or {x = 0, y = 0} - local pos_d = inserter.inserter_drop_position or {x = 0, y = 0} + local pos_p = inserter.inserter_pickup_position + local pos_d = inserter.inserter_drop_position + pos_p.x, pos_p.y, pos_d.x, pos_d.y = pos_p.x or 0, pos_p.y or 0, pos_d.x or 0, pos_d.y or 0 local range = math.max(math.abs(math.floor(pos_p.x)), math.abs(math.floor(pos_p.y)), math.abs(math.floor(pos_d.x)), math.abs(math.floor(pos_d.y))) gui.table['table_' .. (3 + (pos_p.x >= 0 and math.max(math.ceil(pos_p.x), 2)) or (pos_p.x < 0 and math.min(math.ceil(pos_p.x), -2))) .. '_' .. (pos_p.y >= 0 and math.max(math.ceil(pos_p.y), 2)) or (pos_p.y < 0 and math.min(math.ceil(pos_p.y), -2))].sprite = 'virtual-signal/up-arrow' gui.table['table_' .. (3 + (pos_d.x >= 0 and math.max(math.ceil(pos_d.x), 2)) or (pos_d.x < 0 and math.min(math.ceil(pos_d.x), -2))) .. '_' .. (pos_d.y >= 0 and math.max(math.ceil(pos_d.y), 2)) or (pos_d.y < 0 and math.min(math.ceil(pos_d.y), -2))].sprite = 'virtual-signal/down-arrow'