Merge pull request #50401 from Mickyan/curtain_opaque

Makes certain curtains block your view when closed, new curtain type
This commit is contained in:
spookydonut
2020-04-06 16:52:36 +08:00
committed by GitHub
3 changed files with 27 additions and 2 deletions
+21 -2
View File
@@ -422,9 +422,11 @@
alpha = 200 //Mappers can also just set this to 255 if they want curtains that can't be seen through
layer = SIGN_LAYER
anchored = TRUE
opacity = 0
opacity = FALSE
density = FALSE
var/open = TRUE
/// if it can be seen through when closed
var/opaque_closed = FALSE
/obj/structure/curtain/proc/toggle()
open = !open
@@ -436,12 +438,14 @@
layer = WALL_OBJ_LAYER
density = TRUE
open = FALSE
if(opaque_closed)
opacity = TRUE
else
icon_state = "[icon_type]-open"
layer = SIGN_LAYER
density = FALSE
open = TRUE
opacity = FALSE
/obj/structure/curtain/attackby(obj/item/W, mob/user)
if (istype(W, /obj/item/toy/crayon))
@@ -496,3 +500,18 @@
icon_state = "bounty-open"
color = null
alpha = 255
opaque_closed = TRUE
/obj/structure/curtain/cloth/
color = null
alpha = 255
opaque_closed = TRUE
/obj/structure/curtain/cloth/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/cloth (loc, 4)
new /obj/item/stack/rods (loc, 1)
qdel(src)
/obj/structure/curtain/cloth/fancy
icon_type = "cur_fancy"
icon_state = "cur_fancy-open"