mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Rewrote mkxp.json, fix crash when entering a map with no map metadata, fixed Battle Factory menu text misalignment
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
# https://github.com/mkxp-z/mkxp-z/actions/runs/5107184579
|
||||
$VERBOSE = nil
|
||||
Font.default_shadow = false if Font.respond_to?(:default_shadow)
|
||||
Graphics.frame_rate = 40
|
||||
Encoding.default_internal = Encoding::UTF_8
|
||||
Encoding.default_external = Encoding::UTF_8
|
||||
|
||||
|
||||
@@ -1351,11 +1351,11 @@ class Window_AdvancedCommandPokemon < Window_DrawableCommand
|
||||
rect = drawCursor(index, rect)
|
||||
if toUnformattedText(@commands[index]).gsub(/\n/, "") == @commands[index]
|
||||
# Use faster alternative for unformatted text without line breaks
|
||||
pbDrawShadowText(self.contents, rect.x, rect.y, rect.width, rect.height,
|
||||
@commands[index], self.baseColor, self.shadowColor)
|
||||
pbDrawShadowText(self.contents, rect.x, rect.y + (self.contents.text_offset_y || 0),
|
||||
rect.width, rect.height, @commands[index], self.baseColor, self.shadowColor)
|
||||
else
|
||||
chars = getFormattedText(self.contents, rect.x, rect.y + 4, rect.width, rect.height,
|
||||
@commands[index], rect.height, true, true)
|
||||
chars = getFormattedText(self.contents, rect.x, rect.y + (self.contents.text_offset_y || 0),
|
||||
rect.width, rect.height, @commands[index], rect.height, true, true)
|
||||
drawFormattedChars(self.contents, chars)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -257,7 +257,7 @@ def pbGetBasicMapNameFromId(id)
|
||||
end
|
||||
|
||||
def pbGetMapNameFromId(id)
|
||||
name = GameData::MapMetadata.get(id)&.name
|
||||
name = GameData::MapMetadata.try_get(id)&.name
|
||||
if nil_or_empty?(name)
|
||||
name = pbGetBasicMapNameFromId(id)
|
||||
name.gsub!(/\\PN/, $player.name) if $player
|
||||
|
||||
Reference in New Issue
Block a user