From 32bf5b3b24d4202a33c00cfbdb9ec63608d670a6 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Sun, 6 Apr 2025 13:36:53 +0900 Subject: [PATCH] .. --- PHI-CL/control.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/PHI-CL/control.lua b/PHI-CL/control.lua index 6f17cf3..0c3d4ac 100644 --- a/PHI-CL/control.lua +++ b/PHI-CL/control.lua @@ -62,17 +62,16 @@ if settings.startup['PHI-CT'].value then end end) - --[[ local gui = {} local inserter_utils = {} math2d.direction = {vectors = {{x = 0, y = -1}, {x = 1, y = -1}, {x = 1, y = 0}, {x = 1, y = 1}, {x = 0, y = 1}, {x = -1, y = 1}, {x = -1, y = 0}, {x = -1, y = -1}}} function inserter_utils.get_arm_positions(inserter) - local x_int, x_frac, y_int, y_frac = math.modf((inserter.position.x and inserter.position.x) or inserter.position[1]), math.modf((inserter.position.y and inserter.position.y) or inserter.position[2]) + local x_int, x_frac, y_int, y_frac = math.modf(inserter.position.x or inserter.position[1]), math.modf((inserter.position.y and inserter.position.y) or inserter.position[2]) local base_tile = {x = x_frac < 0 and (x_int - 1) or x_int, y = y_frac < 0 and (y_int - 1) or y_int} - local pos2 = (inserter.drop_position.x and {x = inserter.drop_position.x, y = inserter.drop_position.y}) or {x = inserter.drop_position[1], y = inserter.drop_position[2]} + local pos2 = {x = inserter.drop_position.x, y = inserter.drop_position.y} or {x = inserter.drop_position[1], y = inserter.drop_position[2]} local x_int2, x_frac2, y_int2, y_frac2 = math.modf(pos2.x), math.modf(pos2.y) - local pos3 =(inserter.pickup_position.x and {x = inserter.pickup_position.x, y = inserter.pickup_position.y}) or {x = inserter.pickup_position[1], y = inserter.pickup_position[2]} + local pos3 = {x = inserter.pickup_position.x, y = inserter.pickup_position.y} or {x = inserter.pickup_position[1], y = inserter.pickup_position[2]} local x_int3, x_frac3, y_int3, y_frac3 = math.modf(pos3.x), math.modf(pos3.y) return { @@ -95,6 +94,9 @@ if settings.startup['PHI-CT'].value then end end + + --[[ + function gui.create(player) if player.gui.relative.inserter_config then player.gui.relative.inserter_config.destroy()