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.
This commit is contained in:
LemonInTheDark
2022-01-28 17:08:02 +00:00
committed by GitHub
parent 935497a893
commit f509a71954
+1 -1
View File
@@ -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()