diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index 26fb60335c8..29fef068cce 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -161,3 +161,8 @@ //1 = standard hud //2 = reduced hud (just hands and intent switcher) //3 = no hud (for screenshots) + + +#define HUD_LAYER_SCREEN 20 + +#define HUD_LAYER_BUILDMODE 30 diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 5bf3a483cd8..17c67c7821f 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -9,7 +9,7 @@ /obj/screen name = "" icon = 'icons/mob/screen_gen.dmi' - layer = 20 + layer = HUD_LAYER_SCREEN plane = HUD_PLANE unacidable = 1 var/obj/master = null //A reference to the object in the slot. Grabs or items, generally. diff --git a/code/datums/action.dm b/code/datums/action.dm index e49002e8e9d..e0634527104 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -127,7 +127,7 @@ var/obj/item/I = target var/old_layer = I.layer var/old_plane = I.plane - I.layer = 21 + I.layer = HUD_LAYER_SCREEN + 1 I.plane = HUD_PLANE current_button.overlays += I I.layer = old_layer diff --git a/code/modules/admin/buildmode.dm b/code/modules/admin/buildmode.dm index d628df054c6..b04b9d2b96a 100644 --- a/code/modules/admin/buildmode.dm +++ b/code/modules/admin/buildmode.dm @@ -14,6 +14,7 @@ /obj/screen/buildmode icon = 'icons/misc/buildmode.dmi' var/datum/click_intercept/buildmode/bd + layer = HUD_LAYER_BUILDMODE /obj/screen/buildmode/New(bld) ..() @@ -78,6 +79,7 @@ /obj/effect/buildmode_reticule var/image/I var/client/cl + anchored = TRUE /obj/effect/buildmode_reticule/New(var/turf/t, var/client/c) loc = t @@ -349,13 +351,13 @@ if(BOOM_BUILDMODE) devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null if(devastation == null) devastation = -1 - var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null + heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null if(heavy == null) heavy = -1 - var/light = input("Range of light impact. -1 to none", text("Input")) as num|null + light = input("Range of light impact. -1 to none", text("Input")) as num|null if(light == null) light = -1 - var/flash = input("Range of flash. -1 to none", text("Input")) as num|null + flash = input("Range of flash. -1 to none", text("Input")) as num|null if(flash == null) flash = -1 - var/flames = input("Range of flames. -1 to none", text("Input")) as num|null + flames = input("Range of flames. -1 to none", text("Input")) as num|null if(flames == null) flames = -1 if(SAVE_BUILDMODE) @@ -454,10 +456,12 @@ var/turf/T = get_turf(object) log_admin("Build Mode: [key_name(user)] modified [T] ([T.x],[T.y],[T.z]) to [objholder]") T.ChangeTurf(objholder) - else + else if(!isnull(objholder)) var/obj/A = new objholder (get_turf(object)) A.setDir(build_dir) log_admin("Build Mode: [key_name(user)] modified [A]'s ([A.x],[A.y],[A.z]) dir to [build_dir]") + else + to_chat(user, "Select object type first.") else if(right_click) if(isobj(object)) log_admin("Build Mode: [key_name(user)] deleted [object] at ([object.x],[object.y],[object.z])") @@ -625,7 +629,7 @@ L2.color = L.color link_lines += L2 if(BOOM_BUILDMODE) - explosion(object, devastation, heavy, light, flash, null, null,flames) + explosion(object, devastation, heavy, light, flash, null, TRUE, flames) if(SAVE_BUILDMODE) if(!cornerA) cornerA = select_tile(get_turf(object))