mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
Added a limit to the Entered loop.
Doors will only check for the presence of a mob rather than looping though all of them and will play a sound rather than message when it does find one. Door damage lowered to 5 with Urist's permission, you have a chance to get someone to help you before you are crushed to death now. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2902 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1047,25 +1047,23 @@ About the new airlock wires panel:
|
||||
if(src.welded || src.locked || (!src.arePowerSystemsOn()) || (stat & NOPOWER) || src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
|
||||
return
|
||||
if(safe)
|
||||
for(var/mob/M in src.loc)
|
||||
M << "The door buzzes angerly."
|
||||
for(var/mob/M in src.loc)
|
||||
if(locate(/mob/living) in get_turf(src))
|
||||
playsound(src.loc, 'buzz-two.ogg', 50, 0)
|
||||
spawn (60)
|
||||
close()
|
||||
return
|
||||
|
||||
else // OH FUCK MOVE
|
||||
for(var/mob/M in src.loc)
|
||||
if(isrobot(M))
|
||||
M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
else
|
||||
M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
M.SetStunned(5)
|
||||
M.SetWeakened(5)
|
||||
M.emote("scream")
|
||||
var/turf/location = src.loc
|
||||
if(istype(location, /turf/simulated))
|
||||
location.add_blood(M)
|
||||
for(var/mob/M in get_turf(src))
|
||||
if(isrobot(M))
|
||||
M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
else
|
||||
M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
M.SetStunned(5)
|
||||
M.SetWeakened(5)
|
||||
M.emote("scream")
|
||||
var/turf/location = src.loc
|
||||
if(istype(location, /turf/simulated))
|
||||
location.add_blood(M)
|
||||
|
||||
use_power(50)
|
||||
playsound(src.loc, 'airlock.ogg', 30, 1)
|
||||
|
||||
+16
-7
@@ -80,18 +80,25 @@
|
||||
|
||||
|
||||
/turf/Entered(atom/movable/M as mob|obj)
|
||||
var/loopsanity = 10
|
||||
if(ismob(M))
|
||||
if(M.flags & NOGRAV)
|
||||
inertial_drift(M)
|
||||
else if(!istype(src, /turf/space))
|
||||
M:inertia_dir = 0
|
||||
..()
|
||||
var/objects = 0
|
||||
for(var/atom/A as mob|obj|turf|area in src)
|
||||
if(objects > loopsanity) break
|
||||
objects++
|
||||
spawn( 0 )
|
||||
if ((A && M))
|
||||
A.HasEntered(M, 1)
|
||||
return
|
||||
objects = 0
|
||||
for(var/atom/A as mob|obj|turf|area in range(1))
|
||||
if(objects > loopsanity) break
|
||||
objects++
|
||||
spawn( 0 )
|
||||
if ((A && M))
|
||||
A.HasProximity(M, 1)
|
||||
@@ -168,17 +175,19 @@
|
||||
if (istype(A,/mob/living/carbon))
|
||||
var/mob/living/carbon/M = A
|
||||
if(M.lying) return
|
||||
if(istype(M, /mob/living/carbon/human)) // Split this into two seperate if checks, when non-humans were being checked it would throw a null error -- TLE
|
||||
if(istype(M:shoes, /obj/item/clothing/shoes/clown_shoes))
|
||||
if(M.m_intent == "run")
|
||||
if(M.footstep >= 2)
|
||||
M.footstep = 0
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.shoes, /obj/item/clothing/shoes/clown_shoes))
|
||||
if(H.m_intent == "run")
|
||||
if(H.footstep >= 2)
|
||||
H.footstep = 0
|
||||
else
|
||||
M.footstep++
|
||||
if(M.footstep == 0)
|
||||
H.footstep++
|
||||
if(H.footstep == 0)
|
||||
playsound(src, "clownstep", 50, 1) // this will get annoying very fast.
|
||||
else
|
||||
playsound(src, "clownstep", 20, 1)
|
||||
|
||||
switch (src.wet)
|
||||
if(1)
|
||||
if(istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
#define MAX_PRESSURE_DAMAGE 20
|
||||
|
||||
// Doors!
|
||||
#define DOOR_CRUSH_DAMAGE 20
|
||||
#define DOOR_CRUSH_DAMAGE 5
|
||||
|
||||
// Factor of how fast mob nutrition decreases
|
||||
#define HUNGER_FACTOR 0.1
|
||||
|
||||
Reference in New Issue
Block a user