[MIRROR] Mechanical Curtains (#2466)

* Mechanical Curtains (#55751)

good for better mapping, I have seen some mappers wish to utilize fancy curtains on their rooms windows (for example, a psychologist office) but wanted to be able to have privacy when with a patient, which curtains can be opened from either side of the window, and shutters just dont fit the theme, this way mappers can add in curtains which are button operated and cant be opened manually, basically, it functions like a shutter, only it looks and acts like curtains (can be destroyed like one, etc... it is literally a curtain subtype)

* Mechanical Curtains

Co-authored-by: 小月猫 <alina.r.starkova@gmail.com>
This commit is contained in:
SkyratBot
2021-01-03 14:47:13 +01:00
committed by GitHub
parent b18979fbfa
commit 17e84733b3
4 changed files with 61 additions and 0 deletions

View File

@@ -25,6 +25,27 @@
INVOKE_ASYNC(M, openclose ? /obj/machinery/door/poddoor.proc/open : /obj/machinery/door/poddoor.proc/close)
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 10)
/obj/item/assembly/control/curtain
name = "curtain controller"
desc = "A small electronic device able to control a mechanical curtain remotely."
/obj/item/assembly/control/curtain/examine(mob/user)
. = ..()
if(id)
. += "<span class='notice'>Its channel ID is '[id]'.</span>"
/obj/item/assembly/control/curtain/activate()
var/openclose
if(cooldown)
return
cooldown = TRUE
for(var/obj/structure/curtain/cloth/fancy/mechanical/M in GLOB.curtains)
if(M.id == src.id)
if(openclose == null || !sync_doors)
openclose = M.density
INVOKE_ASYNC(M, openclose ? /obj/structure/curtain/cloth/fancy/mechanical.proc/open : /obj/structure/curtain/cloth/fancy/mechanical.proc/close)
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 5)
/obj/item/assembly/control/airlock
name = "airlock controller"