From 60811a191f5bb65e47dc45fbb1b121f9846ee34c Mon Sep 17 00:00:00 2001 From: Social-Moth <117739059+Social-Moth@users.noreply.github.com> Date: Fri, 19 Apr 2024 09:22:07 -0500 Subject: [PATCH] Removes floor from flip message when falling over in space (#25136) * Adds a special message for falling over in space * adds message when falling over in space * Update code/modules/mob/mob_emote.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/modules/mob/mob_emote.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/modules/mob/mob_emote.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/modules/mob/mob_emote.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/modules/mob/mob_emote.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/mob/mob_emote.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * space fall special text now with gooder code --------- Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --- code/modules/mob/mob_emote.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/mob_emote.dm b/code/modules/mob/mob_emote.dm index 497031a8d65..28ad98a0d3b 100644 --- a/code/modules/mob/mob_emote.dm +++ b/code/modules/mob/mob_emote.dm @@ -134,7 +134,8 @@ var/mob/living/L = user if(IS_HORIZONTAL(L)) - message = "flops and flails around on the floor." + var/turf = get_turf(L) + message = "flops and flails around [isspaceturf(turf) ? "in space" : "on the floor"]." return ..() else if(params) message_param = "flips in %t's general direction." @@ -166,10 +167,10 @@ "As you flip your hat falls off!") if(prob(5) && ishuman(user)) - message = "attempts a flip and crashes to the floor!" - sleep(0.3 SECONDS) + var/turf = get_turf(L) + message = "attempts a flip and [isspaceturf(turf) ? "loses balance" : "crashes to the floor"]!" if(istype(L)) - L.Weaken(4 SECONDS) + addtimer(CALLBACK(L, TYPE_PROC_REF(/mob/living, Weaken), 4 SECONDS), 0.3 SECONDS) return ..() . = ..()