From f509a71954618d0ffeabc02f53a662725dbc6bc3 Mon Sep 17 00:00:00 2001 From: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Date: Fri, 28 Jan 2022 09:08:02 -0800 Subject: [PATCH] Fixes incorrect apc offset warnings (#64488) We were setting the offset to negative values, then checking that against a non negative define Uses the absolute value to compare instead of the signed value. --- code/modules/power/apc.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index e89f8f3d8ea..5dc6d471087 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -237,7 +237,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/power/apc/auto_name, APC_PIXEL_OFFSET if(WEST) offset_old = pixel_x pixel_x = -APC_PIXEL_OFFSET - if(offset_old != APC_PIXEL_OFFSET && !building) + if(abs(offset_old) != APC_PIXEL_OFFSET && !building) log_mapping("APC: ([src]) at [AREACOORD(src)] with dir ([dir] | [uppertext(dir2text(dir))]) has pixel_[dir & (WEST|EAST) ? "x" : "y"] value [offset_old] - should be [dir & (SOUTH|EAST) ? "-" : ""][APC_PIXEL_OFFSET]. Use the directional/ helpers!") /obj/machinery/power/apc/Destroy()