mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Door speedup
This commit is contained in:
@@ -894,31 +894,9 @@ About the new airlock wires panel:
|
||||
if(locate(/mob/living) in turf)
|
||||
// playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0) //THE BUZZING IT NEVER STOPS -Pete
|
||||
spawn (60)
|
||||
close()
|
||||
autoclose()
|
||||
return
|
||||
|
||||
for(var/turf/turf in locs)
|
||||
for(var/mob/living/M in turf)
|
||||
if(isrobot(M))
|
||||
M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
else
|
||||
M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
M.SetStunned(5)
|
||||
M.SetWeakened(5)
|
||||
var/obj/effect/stop/S
|
||||
S = new /obj/effect/stop
|
||||
S.victim = M
|
||||
S.loc = M.loc
|
||||
spawn(20)
|
||||
del(S)
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (!(H.species && (H.species.flags & NO_PAIN)))
|
||||
M.emote("scream")
|
||||
var/turf/location = src.loc
|
||||
if(istype(location, /turf/simulated))
|
||||
location.add_blood(M)
|
||||
|
||||
use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people
|
||||
if(istype(src, /obj/machinery/door/airlock/glass))
|
||||
playsound(src.loc, 'sound/machines/windowdoor.ogg', 30, 1)
|
||||
@@ -928,9 +906,25 @@ About the new airlock wires panel:
|
||||
var/obj/structure/window/killthis = (locate(/obj/structure/window) in turf)
|
||||
if(killthis)
|
||||
killthis.ex_act(2)//Smashin windows
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
if(density)
|
||||
return 1
|
||||
operating = 1
|
||||
do_animate("closing")
|
||||
src.layer = 3.1
|
||||
sleep(5)
|
||||
src.density = 1
|
||||
if(!safe)
|
||||
crush()
|
||||
sleep(5)
|
||||
update_icon()
|
||||
if(visible && !glass)
|
||||
SetOpacity(1)
|
||||
operating = 0
|
||||
update_nearby_tiles()
|
||||
if(locate(/mob/living) in get_turf(src))
|
||||
open()
|
||||
|
||||
//I shall not add a check every x ticks if a door has closed over some fire.
|
||||
var/obj/fire/fire = locate() in loc
|
||||
if(fire)
|
||||
|
||||
@@ -225,24 +225,27 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/proc/open()
|
||||
if(!density) return 1
|
||||
if(operating > 0) return
|
||||
if(!ticker) return 0
|
||||
if(!density)
|
||||
return 1
|
||||
if(operating > 0)
|
||||
return
|
||||
if(!ticker)
|
||||
return 0
|
||||
if(!operating) operating = 1
|
||||
|
||||
do_animate("opening")
|
||||
src.SetOpacity(0)
|
||||
sleep(10)
|
||||
src.layer = open_layer
|
||||
sleep(5)
|
||||
src.density = 0
|
||||
sleep(5)
|
||||
src.layer = 2.7
|
||||
explosion_resistance = 0
|
||||
update_icon()
|
||||
SetOpacity(0)
|
||||
operating = 0
|
||||
update_nearby_tiles()
|
||||
|
||||
if(operating) operating = 0
|
||||
|
||||
if(autoclose && normalspeed)
|
||||
if(autoclose && normalspeed)
|
||||
spawn(150)
|
||||
autoclose()
|
||||
if(autoclose && !normalspeed)
|
||||
@@ -251,17 +254,19 @@
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/door/proc/close()
|
||||
if(density) return 1
|
||||
if(operating > 0) return
|
||||
if(density)
|
||||
return 1
|
||||
if(operating > 0)
|
||||
return
|
||||
operating = 1
|
||||
|
||||
src.density = 1
|
||||
explosion_resistance = initial(explosion_resistance)
|
||||
src.layer = closed_layer
|
||||
do_animate("closing")
|
||||
sleep(10)
|
||||
explosion_resistance = initial(explosion_resistance)
|
||||
src.layer = 3.1
|
||||
sleep(5)
|
||||
src.density = 1
|
||||
sleep(5)
|
||||
update_icon()
|
||||
if(visible && !glass)
|
||||
SetOpacity(1) //caaaaarn!
|
||||
|
||||
Reference in New Issue
Block a user