From 88c4ca02460ac37b95bff5983df1ccf0e95ed929 Mon Sep 17 00:00:00 2001 From: Leshana Date: Sun, 1 Apr 2018 16:29:52 -0400 Subject: [PATCH] Fix light/camera layers for macros and fix constants for them too. --- code/game/machinery/camera/camera_vr.dm | 6 +++--- code/modules/power/lighting.dm | 17 +++++------------ code/modules/power/lighting_vr.dm | 17 +++++------------ 3 files changed, 13 insertions(+), 27 deletions(-) diff --git a/code/game/machinery/camera/camera_vr.dm b/code/game/machinery/camera/camera_vr.dm index fcef1edeb9..1111b2773c 100644 --- a/code/game/machinery/camera/camera_vr.dm +++ b/code/game/machinery/camera/camera_vr.dm @@ -1,7 +1,7 @@ /obj/machinery/camera - layer = 4 + layer = BELOW_MOB_LAYER /obj/machinery/camera/New() ..() - if (dir == 1) // idk why the fuck dir is not 2 - layer = 5 \ No newline at end of file + if (dir == NORTH) + layer = ABOVE_MOB_LAYER \ No newline at end of file diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index be739ff7fe..b3d861d4db 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -16,7 +16,7 @@ icon = 'icons/obj/lighting.dmi' icon_state = "tube-construct-stage1" anchored = 1 - plane = MOB_LAYER + plane = MOB_PLANE layer = ABOVE_MOB_LAYER var/stage = 1 var/fixture_type = "tube" @@ -133,8 +133,6 @@ icon = 'icons/obj/lighting.dmi' icon_state = "bulb-construct-stage1" anchored = 1 - plane = MOB_LAYER - layer = ABOVE_MOB_LAYER stage = 1 fixture_type = "bulb" sheets_refunded = 1 @@ -145,6 +143,8 @@ icon = 'icons/obj/lighting.dmi' icon_state = "flamp-construct-stage1" anchored = 0 + plane = OBJ_PLANE + layer = OBJ_LAYER stage = 1 fixture_type = "flamp" sheets_refunded = 2 @@ -157,7 +157,7 @@ icon_state = "tube1" desc = "A lighting fixture." anchored = 1 - plane = MOB_LAYER + plane = MOB_PLANE layer = ABOVE_MOB_LAYER use_power = 2 idle_power_usage = 2 @@ -199,6 +199,7 @@ fitting = "bulb" brightness_range = 5 brightness_power = 2 + plane = OBJ_PLANE layer = OBJ_LAYER brightness_color = "#FFF4E5" desc = "A floor lamp." @@ -206,11 +207,6 @@ shows_alerts = FALSE var/lamp_shade = 1 -//Vorestation addition, to override the New() proc further below, since this is a lamp. -/obj/machinery/light/flamp/New() - ..() - layer = OBJ_LAYER - /obj/machinery/light/small/emergency brightness_range = 4 brightness_power = 2 @@ -261,9 +257,6 @@ broken(1) spawn(1) update(0) - //Vorestation addition, so large mobs stop looking stupid in front of lights. - if (dir == 2) - layer = 5 /obj/machinery/light/Destroy() var/area/A = get_area(src) diff --git a/code/modules/power/lighting_vr.dm b/code/modules/power/lighting_vr.dm index 5583716d57..fb4a15a883 100644 --- a/code/modules/power/lighting_vr.dm +++ b/code/modules/power/lighting_vr.dm @@ -1,26 +1,19 @@ // I hate the way macros look stupid standing near lights. I don't care how absurd this looks. /obj/machinery/light_construct - layer = 4 - -/obj/machinery/light_construct/small - layer = 4 - -/obj/machinery/light_construct/flamp - layer = 4 - + layer = BELOW_MOB_LAYER /obj/machinery/light - layer = 4 + layer = BELOW_MOB_LAYER //Vorestation addition, to override the New() proc further below, since this is a lamp. /obj/machinery/light/flamp/New() ..() - layer = 4 + layer = initial(layer) // create a new lighting fixture /obj/machinery/light/New() ..() //Vorestation addition, so large mobs stop looking stupid in front of lights. - if (dir == 2) - layer = 5 \ No newline at end of file + if (dir == SOUTH) // Lights are backwards, SOUTH lights face north (they are on south wall) + layer = ABOVE_MOB_LAYER