mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user