[MIRROR] Fix slimepeople soft landing showing message for stairs and self [MDB IGNORE] (#15959)

* Fix slimepeople soft landing showing message for stairs and self (#69263)

* Fix soft landing showing messages for self and stairs

* Fix syntax error

* Fix missing return syntax

* Move turf check out of loop

* Fix slimepeople soft landing showing message for stairs and self

Co-authored-by: Tim <timothymtorres@gmail.com>
This commit is contained in:
SkyratBot
2022-09-04 03:47:03 +01:00
committed by GitHub
co-authored by Tim
parent 5f646fb6c0
commit 89dd3c3892
+11 -3
View File
@@ -17,9 +17,17 @@
UnregisterSignal(target, COMSIG_ATOM_INTERCEPT_Z_FALL)
///signal called by the stat of the target changing
/datum/element/soft_landing/proc/intercept_z_fall(obj/soft_object, falling_movables, levels)
/datum/element/soft_landing/proc/intercept_z_fall(atom/soft_object, falling_movables, levels)
SIGNAL_HANDLER
for (var/mob/living/falling_victim in falling_movables)
to_chat(falling_victim, span_notice("[soft_object] provides a soft landing for you!"))
var/turf/falling_spot = get_turf(soft_object)
if(locate(/obj/structure/stairs) in falling_spot)
return FALL_INTERCEPTED | FALL_NO_MESSAGE
for(var/mob/living/falling_victim in falling_movables)
if(soft_object == falling_victim)
to_chat(falling_victim, span_notice("Your fall is cushioned by your body to provide a soft landing!"))
else
to_chat(falling_victim, span_notice("[soft_object] provides a soft landing for you!"))
return FALL_INTERCEPTED | FALL_NO_MESSAGE