Files
Paradise/code/game/objects/structures/curtains.dm
Tigercat2000 7f8b190e5f 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.
2015-04-25 09:36:08 -07:00

59 lines
1.2 KiB
Plaintext

#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 = SHOWER_CLOSED_LAYER
opacity = 1
density = 0
/obj/structure/curtain/open
icon_state = "open"
layer = SHOWER_OPEN_LAYER
opacity = 0
/obj/structure/curtain/bullet_act(obj/item/projectile/P, def_zone)
if(!P.nodamage)
visible_message("<span class='warning'>[P] tears [src] down!</span>")
del(src)
else
..(P, def_zone)
/obj/structure/curtain/attack_hand(mob/user)
playsound(get_turf(loc), "rustle", 15, 1, -5)
toggle()
..()
/obj/structure/curtain/proc/toggle()
opacity = !opacity
if(opacity)
icon_state = "closed"
layer = SHOWER_CLOSED_LAYER
else
icon_state = "open"
layer = SHOWER_OPEN_LAYER
/obj/structure/curtain/black
name = "black curtain"
color = "#222222"
/obj/structure/curtain/medical
name = "plastic curtain"
color = "#B8F5E3"
alpha = 200
/obj/structure/curtain/open/shower
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