Fireman Stair Fixes (#17974)

* Fireman Stair Fixes

* updated cl
This commit is contained in:
Geeves
2023-12-20 15:19:58 +02:00
committed by GitHub
parent 1e73c993b3
commit e68ebfe192
4 changed files with 24 additions and 10 deletions
+12 -9
View File
@@ -233,20 +233,23 @@
return ..()
/obj/structure/stairs/CollidedWith(atom/movable/A)
/obj/structure/stairs/CollidedWith(atom/movable/moving_atom)
// This is hackish but whatever.
var/turf/target = get_step(GetAbove(A), dir)
var/turf/target = get_step(GetAbove(moving_atom), dir)
if(!target)
return
if(target.z > (z + 1)) //Prevents wheelchair fuckery. Basically, you teleport twice because both the wheelchair + your mob collide with the stairs.
return
if(target.Enter(A, src) && A.dir == dir)
A.forceMove(target)
if(isliving(A))
var/mob/living/L = A
if(L.pulling)
L.pulling.forceMove(target)
if(ishuman(A))
if(target.Enter(moving_atom, src) && moving_atom.dir == dir)
moving_atom.forceMove(target)
if(isliving(moving_atom))
var/mob/living/living_mob = moving_atom
if(living_mob.pulling)
living_mob.pulling.forceMove(target)
for(var/obj/item/grab/grab in living_mob)
if(grab.affecting)
grab.affecting.forceMove(target)
if(ishuman(living_mob))
playsound(src, 'sound/effects/stairs_step.ogg', 50)
playsound(target, 'sound/effects/stairs_step.ogg', 50)