mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
Hotfix for r2403.
Forgot to add shutters.dm. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2404 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
/obj/machinery/door/poddoor/shutters
|
||||
name = "Shutters"
|
||||
icon = 'rapid_pdoor.dmi'
|
||||
icon_state = "shutter1"
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/New()
|
||||
..()
|
||||
layer = 3.1
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/attackby(obj/item/weapon/C as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if (!( istype(C, /obj/item/weapon/crowbar || istype(C, /obj/item/weapon/fireaxe) && C.wielded == 1) ))
|
||||
return
|
||||
if ((src.density && (stat & NOPOWER) && !( src.operating )))
|
||||
spawn( 0 )
|
||||
src.operating = 1
|
||||
flick("shutterc0", src)
|
||||
src.icon_state = "shutter0"
|
||||
sleep(15)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
src.operating = 0
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/open()
|
||||
if (src.operating == 1) //doors can still open when emag-disabled
|
||||
return
|
||||
if (!ticker)
|
||||
return 0
|
||||
if(!src.operating) //in case of emag
|
||||
src.operating = 1
|
||||
flick("shutterc0", src)
|
||||
src.icon_state = "shutter0"
|
||||
sleep(10)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
update_nearby_tiles()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
src.operating = 0
|
||||
if(autoclose)
|
||||
spawn(150)
|
||||
autoclose()
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/close()
|
||||
if (src.operating)
|
||||
return
|
||||
src.operating = 1
|
||||
flick("shutterc1", src)
|
||||
src.icon_state = "shutter1"
|
||||
src.density = 1
|
||||
if (src.visible)
|
||||
src.sd_SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
src.operating = 0
|
||||
return
|
||||
Reference in New Issue
Block a user