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

🆑
fix: runetext fades in correctly in bulk. signers rejoice
/🆑
This commit is contained in:
tonty
2024-12-06 23:19:24 +01:00
committed by GitHub
parent 560d849e04
commit 97ffc3b88b
+5 -2
View File
@@ -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