Files
Polaris/code/game/objects/structures/curtains.dm
Neerti e52a0ea332 Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into sync_to_bay_10/10/2015
Conflicts:
	.travis.yml
	code/game/gamemodes/changeling/changeling_powers.dm
	code/game/gamemodes/changeling/modularchangling.dm
	code/game/turfs/simulated.dm
	code/global.dm
	icons/misc/fullscreen.dmi
	polaris.dme
2015-10-10 23:17:26 -04:00

71 lines
1.4 KiB
Plaintext

#define SHOWER_OPEN_LAYER OBJ_LAYER + 0.4
#define SHOWER_CLOSED_LAYER MOB_LAYER + 0.1
/obj/structure/curtain
name = "curtain"
icon = 'icons/obj/curtain.dmi'
icon_state = "closed"
layer = SHOWER_OPEN_LAYER
opacity = 1
density = 0
/obj/structure/curtain/open
icon_state = "open"
layer = SHOWER_CLOSED_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>")
qdel(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/bed
name = "bed curtain"
color = "#854636"
/obj/structure/curtain/open/privacy
name = "privacy curtain"
color = "#B8F5E3"
/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/medical
color = "#B8F5E3"
/obj/structure/curtain/open/shower/security
color = "#AA0000"
#undef SHOWER_OPEN_LAYER
#undef SHOWER_CLOSED_LAYER