From 7f8b190e5f6bf8609d6dc063a742d56ecb6b8ad6 Mon Sep 17 00:00:00 2001 From: Tigercat2000 Date: Sat, 25 Apr 2015 05:20:49 -0700 Subject: [PATCH] Small refactor of curtains This commit ports Baystation12/Baystation12#8921. Curtains now use SHOWER_OPEN_LAYER and SHOWER_CLOSED_LAYER instead of manual layer definitions. Two new default shower curtains have been added, Engineering and Security. They are not currently avalible on the map due to the fact that Paradise's map, as of this commit, does not have any showers anywhere but the dorms & engineering satellite. --- code/game/objects/structures/curtains.dm | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm index e48e8419d2c..53cc69d98ae 100644 --- a/code/game/objects/structures/curtains.dm +++ b/code/game/objects/structures/curtains.dm @@ -1,14 +1,17 @@ +#define SHOWER_OPEN_LAYER OBJ_LAYER + 0.4 +#define SHOWER_CLOSED_LAYER MOB_LAYER + 0.1 + /obj/structure/curtain icon = 'icons/obj/curtain.dmi' name = "curtain" icon_state = "closed" - layer = MOB_LAYER + 0.1 + layer = SHOWER_CLOSED_LAYER opacity = 1 density = 0 /obj/structure/curtain/open icon_state = "open" - layer = OBJ_LAYER + layer = SHOWER_OPEN_LAYER opacity = 0 /obj/structure/curtain/bullet_act(obj/item/projectile/P, def_zone) @@ -27,10 +30,10 @@ opacity = !opacity if(opacity) icon_state = "closed" - layer = MOB_LAYER + 0.1 + layer = SHOWER_CLOSED_LAYER else icon_state = "open" - layer = OBJ_LAYER + layer = SHOWER_OPEN_LAYER /obj/structure/curtain/black name = "black curtain" @@ -45,3 +48,12 @@ name = "shower curtain" color = "#ACD1E9" alpha = 200 + +/obj/structure/curtain/open/shower/engineering + color = "#FFA500" + +/obj/structure/curtain/open/shower/security + color = "#AA0000" + +#undef SHOWER_OPEN_LAYER +#undef SHOWER_CLOSED_LAYER \ No newline at end of file