Merge pull request #4554 from Citadel-Station-13/upstream-merge-33858

[MIRROR] Adds open/close sound to blastdoors and shutters
This commit is contained in:
LetterJay
2017-12-28 23:57:40 -06:00
committed by GitHub
2 changed files with 63 additions and 61 deletions
+63 -61
View File
@@ -1,66 +1,68 @@
/obj/machinery/door/poddoor
name = "blast door"
desc = "A heavy duty blast door that opens mechanically."
icon = 'icons/obj/doors/blastdoor.dmi'
icon_state = "closed"
var/id = 1
/obj/machinery/door/poddoor
name = "blast door"
desc = "A heavy duty blast door that opens mechanically."
icon = 'icons/obj/doors/blastdoor.dmi'
icon_state = "closed"
var/id = 1
sub_door = TRUE
explosion_block = 3
explosion_block = 3
heat_proof = TRUE
safe = FALSE
max_integrity = 600
armor = list(melee = 50, bullet = 100, laser = 100, energy = 100, bomb = 50, bio = 100, rad = 100, fire = 100, acid = 70)
resistance_flags = FIRE_PROOF
damage_deflection = 70
/obj/machinery/door/poddoor/preopen
icon_state = "open"
max_integrity = 600
armor = list(melee = 50, bullet = 100, laser = 100, energy = 100, bomb = 50, bio = 100, rad = 100, fire = 100, acid = 70)
resistance_flags = FIRE_PROOF
damage_deflection = 70
/obj/machinery/door/poddoor/preopen
icon_state = "open"
density = FALSE
opacity = 0
/obj/machinery/door/poddoor/ert
desc = "A heavy duty blast door that only opens for dire emergencies."
//special poddoors that open when emergency shuttle docks at centcom
/obj/machinery/door/poddoor/shuttledock
var/checkdir = 4 //door won't open if turf in this dir is `turftype`
var/turftype = /turf/open/space
/obj/machinery/door/poddoor/shuttledock/proc/check()
var/turf/T = get_step(src, checkdir)
if(!istype(T, turftype))
INVOKE_ASYNC(src, .proc/open)
else
INVOKE_ASYNC(src, .proc/close)
opacity = 0
/obj/machinery/door/poddoor/ert
desc = "A heavy duty blast door that only opens for dire emergencies."
//special poddoors that open when emergency shuttle docks at centcom
/obj/machinery/door/poddoor/shuttledock
var/checkdir = 4 //door won't open if turf in this dir is `turftype`
var/turftype = /turf/open/space
/obj/machinery/door/poddoor/shuttledock/proc/check()
var/turf/T = get_step(src, checkdir)
if(!istype(T, turftype))
INVOKE_ASYNC(src, .proc/open)
else
INVOKE_ASYNC(src, .proc/close)
/obj/machinery/door/poddoor/CollidedWith(atom/movable/AM)
if(density)
return 0
else
return ..()
//"BLAST" doors are obviously stronger than regular doors when it comes to BLASTS.
/obj/machinery/door/poddoor/ex_act(severity, target)
if(severity == 3)
return
..()
/obj/machinery/door/poddoor/do_animate(animation)
switch(animation)
if("opening")
flick("opening", src)
if("closing")
flick("closing", src)
/obj/machinery/door/poddoor/update_icon()
if(density)
icon_state = "closed"
else
icon_state = "open"
/obj/machinery/door/poddoor/try_to_activate_door(mob/user)
return
/obj/machinery/door/poddoor/try_to_crowbar(obj/item/I, mob/user)
if(stat & NOPOWER)
open(1)
if(density)
return 0
else
return ..()
//"BLAST" doors are obviously stronger than regular doors when it comes to BLASTS.
/obj/machinery/door/poddoor/ex_act(severity, target)
if(severity == 3)
return
..()
/obj/machinery/door/poddoor/do_animate(animation)
switch(animation)
if("opening")
flick("opening", src)
playsound(src, 'sound/machines/blastdoor.ogg', 30, 1)
if("closing")
flick("closing", src)
playsound(src, 'sound/machines/blastdoor.ogg', 30, 1)
/obj/machinery/door/poddoor/update_icon()
if(density)
icon_state = "closed"
else
icon_state = "open"
/obj/machinery/door/poddoor/try_to_activate_door(mob/user)
return
/obj/machinery/door/poddoor/try_to_crowbar(obj/item/I, mob/user)
if(stat & NOPOWER)
open(1)
Binary file not shown.