From dda9027035453caf223a4914b3f959efb386c5f8 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Tue, 16 Oct 2018 20:09:30 -0700 Subject: [PATCH] Re-implements BM offsets in a 511-compatible manner --- code/modules/buildmode/buildmode.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/buildmode/buildmode.dm b/code/modules/buildmode/buildmode.dm index 3c91dc49a4b..7f43f20c934 100644 --- a/code/modules/buildmode/buildmode.dm +++ b/code/modules/buildmode/buildmode.dm @@ -49,8 +49,9 @@ var/x = pos_idx % switch_width var/y = FLOOR(pos_idx / switch_width, 1) var/obj/screen/buildmode/B = new buttontype(src, thing) - // extra .5 for a nice offset look - B.screen_loc = "NORTH-[(1 + 0.5 + y*1.5)],WEST+[0.5 + x*1.5]" + // this stuff is equivalent to the commented out line for 511 compat + // B.screen_loc = "NORTH-[(1 + 0.5 + y*1.5)],WEST+[0.5 + x*1.5]" + B.screen_loc = "NORTH-[1 + FLOOR(0.5 + 1.5*y, 1) + ((y + 1) % 2)]:[16*((y + 1) % 2)],WEST+[FLOOR(0.5 + 1.5*x, 1)]:[16*((x + 1) % 2)]" buttonslist += B pos_idx++