From ef312ab90187d7a9cba046de7bb3b0b5191577ff Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Wed, 26 Mar 2025 20:57:13 +0900 Subject: [PATCH] . --- PHI-CL/control.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/PHI-CL/control.lua b/PHI-CL/control.lua index a4dd0d7..6cbe7b2 100644 --- a/PHI-CL/control.lua +++ b/PHI-CL/control.lua @@ -275,21 +275,16 @@ if settings.startup['PHI-CT'].value then inserter_utils.set_arm_positions(player.opened, new_positions) elseif e.button == defines.mouse_button_type.right or (e.button == defines.mouse_button_type.left and (e.control or e.shift)) then - local new_positions = {pickup = new_pos} - if e.element.sprite == 'virtual-signal/up-arrow' then return end - if e.element.sprite == 'virtual-signal/down-arrow' then - new_positions.drop = inserter_utils.get_arm_positions(player.opened).pickup - end - + local new_positions = {pickup = new_pos, drop = (e.element.sprite == 'virtual-signal/down-arrow' and inserter_utils.get_arm_positions(player.opened).pickup) or nil} inserter_utils.set_arm_positions(player.opened, new_positions) end for _, p in pairs(game.players) do - if (player.opened and p.opened == player.opened) or (not player.opened and (p.opened and p.opened.object_name == 'LuaEntity' and (p.opened.type == 'inserter' or (p.opened.type == 'entity-ghost' and p.opened.ghost_type == 'inserter')))) then + if p.opened and ((p.opened == player.opened) or (p.opened.object_name == 'LuaEntity' and (p.opened.type == 'inserter' or (p.opened.type == 'entity-ghost' and p.opened.ghost_type == 'inserter')))) then gui.update(p, p.opened) end end