mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-11 16:14:08 +01:00
Merge pull request #19308 from Niknakflak/NanotrasenFixtures
Adds shower curtains
This commit is contained in:
@@ -478,3 +478,45 @@
|
||||
icon_state = "puddle-splash"
|
||||
. = ..()
|
||||
icon_state = "puddle"
|
||||
|
||||
|
||||
//Shower Curtains//
|
||||
//Defines used are pre-existing in layers.dm//
|
||||
|
||||
|
||||
/obj/structure/curtain
|
||||
name = "curtain"
|
||||
desc = "Contains less than 1% mercury."
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "open"
|
||||
color = "#ACD1E9" //Default color, didn't bother hardcoding other colors, mappers can and should easily change it.
|
||||
alpha = 200 //Mappers can also just set this to 255 if they want curtains that can't be seen through
|
||||
layer = WALL_OBJ_LAYER
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
density = 0
|
||||
var/open = TRUE
|
||||
|
||||
|
||||
/obj/structure/curtain/proc/toggle()
|
||||
open = !open
|
||||
update_icon()
|
||||
|
||||
/obj/structure/curtain/update_icon()
|
||||
if(!open)
|
||||
icon_state = "closed"
|
||||
layer = WALL_OBJ_LAYER
|
||||
density = 1
|
||||
open = FALSE
|
||||
|
||||
else
|
||||
icon_state = "open"
|
||||
layer = SIGN_LAYER
|
||||
density = 0
|
||||
open = TRUE
|
||||
|
||||
/obj/structure/curtain/attack_hand(mob/user)
|
||||
playsound(loc, 'sound/effects/curtain.ogg', 50, 1)
|
||||
toggle()
|
||||
..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user