Fixed long battle messages displaying weirdly

This commit is contained in:
Maruno17
2023-09-23 19:20:44 +01:00
parent b2c66b7b0c
commit d9c3898124
3 changed files with 10 additions and 13 deletions

View File

@@ -259,7 +259,6 @@ module Settings
[0, 51, 16, 15, "hidden_Berth", false],
[0, 52, 20, 14, "hidden_Faraday", false]
]
# Whether the player can use Fly while looking at the Town Map. This is only
# allowed if the player can use Fly normally.
CAN_FLY_FROM_TOWN_MAP = true
@@ -296,7 +295,7 @@ module Settings
# * Level.
# * Game Switch; the Pokémon roams while this is ON.
# * Encounter type (0=any, 1=grass/walking in cave, 2=surfing, 3=fishing,
# 4=surfing/fishing). See the bottom of PField_RoamingPokemon for lists.
# 4=surfing/fishing). See the bottom of Overworld_RoamingPokemon for lists.
# * Name of BGM to play for that encounter (optional).
# * Roaming areas specifically for this Pokémon (optional).
ROAMING_SPECIES = [

View File

@@ -406,19 +406,15 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
return if !busy?
return if @textchars[@curchar] == "\n"
resume
visiblelines = (self.height - self.borderY) / @lineHeight
loop do
curcharSkip(true)
break if @curchar >= @fmtchars.length # End of message
if @textchars[@curchar] == "\1" # Pause message
if curcharSkip(true)
visiblelines = (self.height - self.borderY) / @lineHeight
if @textchars[@curchar] == "\n" && @linesdrawn >= visiblelines - 1
@scroll_timer_start = System.uptime
elsif @textchars[@curchar] == "\1"
@pausing = true if @curchar < @numtextchars - 1
self.startPause
refresh
break
end
break if @textchars[@curchar] != "\n" # Skip past newlines only
break if @linesdrawn >= visiblelines - 1 # No more empty lines to continue to
@linesdrawn += 1
end
end

View File

@@ -188,7 +188,7 @@ class Battle::Scene
cw.setText(msg)
PBDebug.log_message(msg)
yielded = false
timer_start = System.uptime
timer_start = nil
loop do
pbUpdate(cw)
if !cw.busy?
@@ -202,6 +202,7 @@ class Battle::Scene
@briefMessage = true
break
end
timer_start = System.uptime if !timer_start
if System.uptime - timer_start >= MESSAGE_PAUSE_TIME # Autoclose after 1 second
cw.text = ""
cw.visible = false
@@ -233,7 +234,7 @@ class Battle::Scene
cw.text = msg + "\1"
PBDebug.log_message(msg)
yielded = false
timer_start = System.uptime
timer_start = nil
loop do
pbUpdate(cw)
if !cw.busy?
@@ -242,6 +243,7 @@ class Battle::Scene
yielded = true
end
if !@battleEnd
timer_start = System.uptime if !timer_start
if System.uptime - timer_start >= MESSAGE_PAUSE_TIME * 3 # Autoclose after 3 seconds
cw.text = ""
cw.visible = false