Fixed replacement battler being invisible if its predecessor fainted and used the same sprite, refactoring

This commit is contained in:
Maruno17
2024-04-01 23:41:54 +01:00
parent a2af2c36f9
commit 494e646fd5
6 changed files with 64 additions and 84 deletions

View File

@@ -452,7 +452,8 @@ def pbMessageDisplay(msgwindow, message, letterbyletter = true, commandProc = ni
end
isDarkSkin = isDarkWindowskin(msgwindow.windowskin)
text.gsub!(/\\c\[([0-9]+)\]/i) do
next getSkinColor(msgwindow.windowskin, $1.to_i, isDarkSkin)
main_color, shadow_color = get_text_colors_for_windowskin(msgwindow.windowskin, $1.to_i, isDarkSkin)
next shadowc3tag(main_color, shadow_color)
end
loop do
last_text = text.clone
@@ -469,9 +470,11 @@ def pbMessageDisplay(msgwindow, message, letterbyletter = true, commandProc = ni
end
colortag = ""
if $game_system && $game_system.message_frame != 0
colortag = getSkinColor(msgwindow.windowskin, 0, true)
main_color, shadow_color = get_text_colors_for_windowskin(msgwindow.windowskin, 0, true)
colortag = shadowc3tag(main_color, shadow_color)
else
colortag = getSkinColor(msgwindow.windowskin, 0, isDarkSkin)
main_color, shadow_color = get_text_colors_for_windowskin(msgwindow.windowskin, 0, isDarkSkin)
colortag = shadowc3tag(main_color, shadow_color)
end
text = colortag + text
### Controls