From 97ffc3b88b1cdd4bc3b9602cdd8aec89ddccec20 Mon Sep 17 00:00:00 2001 From: tonty <39193182+tontyGH@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:19:24 -0500 Subject: [PATCH] Runechat no longer awkwardly fades in if in bulk (#88089) ## About The Pull Request So you know how if you tried to use a ? or ! in a message with signer the second message would very slowly fade in? I fixed that ## Why It's Good For The Game why IS IT good for the game? ## Changelog :cl: fix: runetext fades in correctly in bulk. signers rejoice /:cl: --- code/datums/chatmessage.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/datums/chatmessage.dm b/code/datums/chatmessage.dm index 07afbd9eab2..2c06c1d9405 100644 --- a/code/datums/chatmessage.dm +++ b/code/datums/chatmessage.dm @@ -230,9 +230,12 @@ var/remaining_time = time_before_fade * (CHAT_MESSAGE_EXP_DECAY ** idx++) * (CHAT_MESSAGE_HEIGHT_DECAY ** combined_height) // Ensure we don't accidentially spike alpha up or something silly like that m.message.alpha = m.get_current_alpha(time_spent) - if (remaining_time > 0) + if(remaining_time > 0) + if(time_spent < CHAT_MESSAGE_SPAWN_TIME) + // We haven't even had the time to fade in yet! + animate(m.message, alpha = 255, CHAT_MESSAGE_SPAWN_TIME - time_spent) // Stay faded in for a while, then - animate(m.message, alpha = 255, remaining_time) + animate(m.message, alpha = 255, remaining_time, flags=ANIMATION_CONTINUE) // Fade out animate(alpha = 0, time = CHAT_MESSAGE_EOL_FADE) m.animate_lifespan = remaining_time + CHAT_MESSAGE_EOL_FADE