mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Yet more Rubocopping
This commit is contained in:
@@ -103,15 +103,14 @@ class PokemonEggHatch_Scene
|
||||
pbMEPlay("Evolution success")
|
||||
@pokemon.name = nil
|
||||
pbMessage(_INTL("\\se[]{1} hatched from the Egg!\\wt[80]", @pokemon.name)) { update }
|
||||
if $PokemonSystem.givenicknames == 0
|
||||
if pbConfirmMessage(
|
||||
_INTL("Would you like to nickname the newly hatched {1}?", @pokemon.name)
|
||||
) { update }
|
||||
nickname = pbEnterPokemonName(_INTL("{1}'s nickname?", @pokemon.name),
|
||||
0, Pokemon::MAX_NAME_SIZE, "", @pokemon, true)
|
||||
@pokemon.name = nickname
|
||||
@nicknamed = true
|
||||
end
|
||||
if $PokemonSystem.givenicknames == 0 &&
|
||||
pbConfirmMessage(
|
||||
_INTL("Would you like to nickname the newly hatched {1}?", @pokemon.name)
|
||||
) { update }
|
||||
nickname = pbEnterPokemonName(_INTL("{1}'s nickname?", @pokemon.name),
|
||||
0, Pokemon::MAX_NAME_SIZE, "", @pokemon, true)
|
||||
@pokemon.name = nickname
|
||||
@nicknamed = true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -209,12 +208,11 @@ def pbHatch(pokemon)
|
||||
pbMessage(_INTL("...\1"))
|
||||
pbMessage(_INTL("... .... .....\1"))
|
||||
pbMessage(_INTL("{1} hatched from the Egg!", speciesname))
|
||||
if $PokemonSystem.givenicknames == 0
|
||||
if pbConfirmMessage(_INTL("Would you like to nickname the newly hatched {1}?", speciesname))
|
||||
nickname = pbEnterPokemonName(_INTL("{1}'s nickname?", speciesname),
|
||||
0, Pokemon::MAX_NAME_SIZE, "", pokemon)
|
||||
pokemon.name = nickname
|
||||
end
|
||||
if $PokemonSystem.givenicknames == 0 &&
|
||||
pbConfirmMessage(_INTL("Would you like to nickname the newly hatched {1}?", speciesname))
|
||||
nickname = pbEnterPokemonName(_INTL("{1}'s nickname?", speciesname),
|
||||
0, Pokemon::MAX_NAME_SIZE, "", pokemon)
|
||||
pokemon.name = nickname
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -138,21 +138,21 @@ class HallOfFame_Scene
|
||||
# Don't use odd numbers!
|
||||
def xpointformula(battlernumber)
|
||||
ret = 0
|
||||
if !SINGLEROW
|
||||
ret = 32 + (160 * xpositionformula(battlernumber))
|
||||
else
|
||||
if SINGLEROW
|
||||
ret = ((60 * (battlernumber / 2)) + 48) * (xpositionformula(battlernumber) - 1)
|
||||
ret += (Graphics.width / 2) - 56
|
||||
else
|
||||
ret = 32 + (160 * xpositionformula(battlernumber))
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
def ypointformula(battlernumber)
|
||||
ret = 0
|
||||
if !SINGLEROW
|
||||
ret = 32 + (128 * ypositionformula(battlernumber) / 2)
|
||||
else
|
||||
if SINGLEROW
|
||||
ret = 96 - (8 * (battlernumber / 2))
|
||||
else
|
||||
ret = 32 + (128 * ypositionformula(battlernumber) / 2)
|
||||
end
|
||||
return ret
|
||||
end
|
||||
@@ -160,20 +160,20 @@ class HallOfFame_Scene
|
||||
# Returns 0, 1 or 2 as the x/y column value
|
||||
def xpositionformula(battlernumber)
|
||||
ret = 0
|
||||
if !SINGLEROW
|
||||
ret = (battlernumber / 3).even? ? (19 - battlernumber) % 3 : (19 + battlernumber) % 3
|
||||
else
|
||||
if SINGLEROW
|
||||
ret = battlernumber % 2 * 2
|
||||
else
|
||||
ret = (battlernumber / 3).even? ? (19 - battlernumber) % 3 : (19 + battlernumber) % 3
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
def ypositionformula(battlernumber)
|
||||
ret = 0
|
||||
if !SINGLEROW
|
||||
ret = (battlernumber / 3) % 2 * 2
|
||||
else
|
||||
if SINGLEROW
|
||||
ret = 1
|
||||
else
|
||||
ret = (battlernumber / 3) % 2 * 2
|
||||
end
|
||||
return ret
|
||||
end
|
||||
@@ -244,12 +244,12 @@ class HallOfFame_Scene
|
||||
def createTrainerBattler
|
||||
@sprites["trainer"] = IconSprite.new(@viewport)
|
||||
@sprites["trainer"].setBitmap(GameData::TrainerType.front_sprite_filename($player.trainer_type))
|
||||
if !SINGLEROW
|
||||
@sprites["trainer"].x = Graphics.width - 96
|
||||
@sprites["trainer"].y = 160
|
||||
else
|
||||
if SINGLEROW
|
||||
@sprites["trainer"].x = Graphics.width / 2
|
||||
@sprites["trainer"].y = 178
|
||||
else
|
||||
@sprites["trainer"].x = Graphics.width - 96
|
||||
@sprites["trainer"].y = 160
|
||||
end
|
||||
@sprites["trainer"].z = 9
|
||||
@sprites["trainer"].ox = @sprites["trainer"].bitmap.width / 2
|
||||
@@ -318,7 +318,7 @@ class HallOfFame_Scene
|
||||
[_INTL("IDNo.{1}", pokemon.egg? ? "?????" : idno),
|
||||
Graphics.width - 192, Graphics.height - 54, 2, BASECOLOR, SHADOWCOLOR]
|
||||
]
|
||||
if (hallNumber > -1)
|
||||
if hallNumber > -1
|
||||
textPositions.push([_INTL("Hall of Fame No."), (Graphics.width / 2) - 104, -6, 0, BASECOLOR, SHADOWCOLOR])
|
||||
textPositions.push([hallNumber.to_s, (Graphics.width / 2) + 104, -6, 1, BASECOLOR, SHADOWCOLOR])
|
||||
end
|
||||
|
||||
@@ -205,7 +205,7 @@ _END_
|
||||
Graphics.transition(8, "fadetoblack")
|
||||
$game_temp.background_bitmap.dispose
|
||||
@background_sprite.dispose
|
||||
@credit_sprites.each { |s| s.dispose if s }
|
||||
@credit_sprites.each { |s| s&.dispose }
|
||||
text_viewport.dispose
|
||||
viewport.dispose
|
||||
$PokemonGlobal.creditsPlayed = true
|
||||
|
||||
@@ -517,8 +517,8 @@ class PokemonPokedex_Scene
|
||||
if System.user_language[3..4] == "US" # If the user is in the United States
|
||||
ht1 = (params[4] >= @heightCommands.length) ? 99 * 12 : (ht1 / 0.254).round
|
||||
ht2 = (params[5] < 0) ? 99 * 12 : (ht2 / 0.254).round
|
||||
wt1 = (params[6] >= @weightCommands.length) ? 99990 : (wt1 / 0.254).round
|
||||
wt2 = (params[7] < 0) ? 99990 : (wt2 / 0.254).round
|
||||
wt1 = (params[6] >= @weightCommands.length) ? 99_990 : (wt1 / 0.254).round
|
||||
wt2 = (params[7] < 0) ? 99_990 : (wt2 / 0.254).round
|
||||
textpos.push([sprintf("%d'%02d''", ht1 / 12, ht1 % 12), 166, 220, 2, base, shadow, 1])
|
||||
textpos.push([sprintf("%d'%02d''", ht2 / 12, ht2 % 12), 294, 220, 2, base, shadow, 1])
|
||||
textpos.push([sprintf("%.1f", wt1 / 10.0), 166, 272, 2, base, shadow, 1])
|
||||
@@ -644,8 +644,8 @@ class PokemonPokedex_Scene
|
||||
wt2 = (sel[1] < 0) ? 9999 : (sel[1] >= @weightCommands.length) ? 0 : @weightCommands[sel[1]]
|
||||
hwoffset = false
|
||||
if System.user_language[3..4] == "US" # If the user is in the United States
|
||||
wt1 = (sel[0] >= @weightCommands.length) ? 99990 : (wt1 / 0.254).round
|
||||
wt2 = (sel[1] < 0) ? 99990 : (wt2 / 0.254).round
|
||||
wt1 = (sel[0] >= @weightCommands.length) ? 99_990 : (wt1 / 0.254).round
|
||||
wt2 = (sel[1] < 0) ? 99_990 : (wt2 / 0.254).round
|
||||
txt1 = sprintf("%.1f", wt1 / 10.0)
|
||||
txt2 = sprintf("%.1f", wt2 / 10.0)
|
||||
hwoffset = true
|
||||
|
||||
@@ -130,17 +130,13 @@ class PokemonPokedexInfo_Scene
|
||||
@gender, @form = $player.pokedex.last_form_seen(@species)
|
||||
metrics_data = GameData::SpeciesMetrics.get_species_form(@species, @form)
|
||||
@sprites["infosprite"].setSpeciesBitmap(@species, @gender, @form)
|
||||
if @sprites["formfront"]
|
||||
@sprites["formfront"].setSpeciesBitmap(@species, @gender, @form)
|
||||
end
|
||||
@sprites["formfront"]&.setSpeciesBitmap(@species, @gender, @form)
|
||||
if @sprites["formback"]
|
||||
@sprites["formback"].setSpeciesBitmap(@species, @gender, @form, false, false, true)
|
||||
@sprites["formback"].y = 256
|
||||
@sprites["formback"].y += metrics_data.back_sprite[1] * 2
|
||||
end
|
||||
if @sprites["formicon"]
|
||||
@sprites["formicon"].pbSetParams(@species, @gender, @form)
|
||||
end
|
||||
@sprites["formicon"]&.pbSetParams(@species, @gender, @form)
|
||||
end
|
||||
|
||||
def pbGetAvailableForms
|
||||
|
||||
@@ -347,12 +347,10 @@ class PokemonPartyPanel < SpriteWrapper
|
||||
@pkmnsprite.color = self.color
|
||||
@pkmnsprite.selected = self.selected
|
||||
end
|
||||
if @helditemsprite && !@helditemsprite.disposed?
|
||||
if @helditemsprite.visible
|
||||
@helditemsprite.x = self.x + 62
|
||||
@helditemsprite.y = self.y + 48
|
||||
@helditemsprite.color = self.color
|
||||
end
|
||||
if @helditemsprite&.visible && !@helditemsprite.disposed?
|
||||
@helditemsprite.x = self.x + 62
|
||||
@helditemsprite.y = self.y + 48
|
||||
@helditemsprite.color = self.color
|
||||
end
|
||||
if @overlaysprite && !@overlaysprite.disposed?
|
||||
@overlaysprite.x = self.x
|
||||
@@ -361,7 +359,7 @@ class PokemonPartyPanel < SpriteWrapper
|
||||
end
|
||||
if @refreshBitmap
|
||||
@refreshBitmap = false
|
||||
@overlaysprite.bitmap.clear if @overlaysprite.bitmap
|
||||
@overlaysprite.bitmap&.clear
|
||||
basecolor = Color.new(248, 248, 248)
|
||||
shadowcolor = Color.new(40, 40, 40)
|
||||
pbSetSystemFont(@overlaysprite.bitmap)
|
||||
@@ -1157,11 +1155,10 @@ class PokemonPartyScreen
|
||||
|
||||
def pbPokemonScreen
|
||||
can_access_storage = false
|
||||
if $player.has_box_link || $bag.has?(:POKEMONBOXLINK)
|
||||
if !$game_switches[Settings::DISABLE_BOX_LINK_SWITCH] &&
|
||||
!$game_map.metadata&.has_flag?("DisableBoxLink")
|
||||
can_access_storage = true
|
||||
end
|
||||
if ($player.has_box_link || $bag.has?(:POKEMONBOXLINK)) &&
|
||||
!$game_switches[Settings::DISABLE_BOX_LINK_SWITCH] &&
|
||||
!$game_map.metadata&.has_flag?("DisableBoxLink")
|
||||
can_access_storage = true
|
||||
end
|
||||
@scene.pbStartScene(@party,
|
||||
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."),
|
||||
@@ -1317,10 +1314,8 @@ class PokemonPartyScreen
|
||||
item = @scene.pbChooseItem($bag) {
|
||||
@scene.pbSetHelpText((@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."))
|
||||
}
|
||||
if item
|
||||
if pbGiveItemToPokemon(item, pkmn, self, pkmnid)
|
||||
pbRefreshSingle(pkmnid)
|
||||
end
|
||||
if item && pbGiveItemToPokemon(item, pkmn, self, pkmnid)
|
||||
pbRefreshSingle(pkmnid)
|
||||
end
|
||||
elsif cmdTakeItem >= 0 && command == cmdTakeItem # Take
|
||||
if pbTakeItemFromPokemon(pkmn, self)
|
||||
|
||||
@@ -205,7 +205,7 @@ class PokemonSummary_Scene
|
||||
pbFadeOutAndHide(@sprites) { pbUpdate }
|
||||
pbDisposeSpriteHash(@sprites)
|
||||
@typebitmap.dispose
|
||||
@markingbitmap.dispose if @markingbitmap
|
||||
@markingbitmap&.dispose
|
||||
@viewport.dispose
|
||||
end
|
||||
|
||||
@@ -519,7 +519,7 @@ class PokemonSummary_Scene
|
||||
# Write Egg Watch blurb
|
||||
memo += _INTL("<c3=404040,B0B0B0>\"The Egg Watch\"\n")
|
||||
eggstate = _INTL("It looks like this Egg will take a long time to hatch.")
|
||||
eggstate = _INTL("What will hatch from this? It doesn't seem close to hatching.") if @pokemon.steps_to_hatch < 10200
|
||||
eggstate = _INTL("What will hatch from this? It doesn't seem close to hatching.") if @pokemon.steps_to_hatch < 10_200
|
||||
eggstate = _INTL("It appears to move occasionally. It may be close to hatching.") if @pokemon.steps_to_hatch < 2550
|
||||
eggstate = _INTL("Sounds can be heard coming from inside! It will hatch soon!") if @pokemon.steps_to_hatch < 1275
|
||||
memo += sprintf("<c3=404040,B0B0B0>%s\n", eggstate)
|
||||
@@ -939,18 +939,18 @@ class PokemonSummary_Scene
|
||||
@sprites["movepresel"].visible = false
|
||||
switching = false
|
||||
elsif !@pokemon.shadowPokemon?
|
||||
if !switching
|
||||
@sprites["movepresel"].index = selmove
|
||||
@sprites["movepresel"].visible = true
|
||||
oldselmove = selmove
|
||||
switching = true
|
||||
else
|
||||
if switching
|
||||
tmpmove = @pokemon.moves[oldselmove]
|
||||
@pokemon.moves[oldselmove] = @pokemon.moves[selmove]
|
||||
@pokemon.moves[selmove] = tmpmove
|
||||
@sprites["movepresel"].visible = false
|
||||
switching = false
|
||||
drawSelectedMove(nil, @pokemon.moves[selmove])
|
||||
else
|
||||
@sprites["movepresel"].index = selmove
|
||||
@sprites["movepresel"].visible = true
|
||||
oldselmove = selmove
|
||||
switching = true
|
||||
end
|
||||
end
|
||||
elsif Input.trigger?(Input::UP)
|
||||
@@ -1003,15 +1003,7 @@ class PokemonSummary_Scene
|
||||
@sprites["ribbonpresel"].visible = false
|
||||
switching = false
|
||||
elsif Input.trigger?(Input::USE)
|
||||
if !switching
|
||||
if @pokemon.ribbons[selribbon]
|
||||
pbPlayDecisionSE
|
||||
@sprites["ribbonpresel"].index = selribbon - (@ribbonOffset * 4)
|
||||
oldselribbon = selribbon
|
||||
@sprites["ribbonpresel"].visible = true
|
||||
switching = true
|
||||
end
|
||||
else
|
||||
if switching
|
||||
pbPlayDecisionSE
|
||||
tmpribbon = @pokemon.ribbons[oldselribbon]
|
||||
@pokemon.ribbons[oldselribbon] = @pokemon.ribbons[selribbon]
|
||||
@@ -1026,6 +1018,14 @@ class PokemonSummary_Scene
|
||||
@sprites["ribbonpresel"].visible = false
|
||||
switching = false
|
||||
drawSelectedRibbon(@pokemon.ribbons[selribbon])
|
||||
else
|
||||
if @pokemon.ribbons[selribbon]
|
||||
pbPlayDecisionSE
|
||||
@sprites["ribbonpresel"].index = selribbon - (@ribbonOffset * 4)
|
||||
oldselribbon = selribbon
|
||||
@sprites["ribbonpresel"].visible = true
|
||||
switching = true
|
||||
end
|
||||
end
|
||||
elsif Input.trigger?(Input::UP)
|
||||
selribbon -= 4
|
||||
|
||||
@@ -148,13 +148,13 @@ class PokemonBag_Scene
|
||||
numfilledpockets = @bag.pockets.length - 1
|
||||
if @choosing
|
||||
numfilledpockets = 0
|
||||
if @filterlist != nil
|
||||
if @filterlist.nil?
|
||||
(1...@bag.pockets.length).each do |i|
|
||||
numfilledpockets += 1 if @filterlist[i].length > 0
|
||||
numfilledpockets += 1 if @bag.pockets[i].length > 0
|
||||
end
|
||||
else
|
||||
(1...@bag.pockets.length).each do |i|
|
||||
numfilledpockets += 1 if @bag.pockets[i].length > 0
|
||||
numfilledpockets += 1 if @filterlist[i].length > 0
|
||||
end
|
||||
end
|
||||
lastpocket = (resetpocket) ? 1 : @bag.last_viewed_pocket
|
||||
@@ -333,7 +333,7 @@ class PokemonBag_Scene
|
||||
def pbRefreshFilter
|
||||
@filterlist = nil
|
||||
return if !@choosing
|
||||
return if @filterproc == nil
|
||||
return if @filterproc.nil?
|
||||
@filterlist = []
|
||||
(1...@bag.pockets.length).each do |i|
|
||||
@filterlist[i] = []
|
||||
@@ -428,14 +428,12 @@ class PokemonBag_Scene
|
||||
# pbRefresh
|
||||
# end
|
||||
elsif Input.trigger?(Input::ACTION) # Start switching the selected item
|
||||
if !@choosing
|
||||
if thispocket.length > 1 && itemwindow.index < thispocket.length &&
|
||||
!Settings::BAG_POCKET_AUTO_SORT[itemwindow.pocket - 1]
|
||||
itemwindow.sorting = true
|
||||
swapinitialpos = itemwindow.index
|
||||
pbPlayDecisionSE
|
||||
pbRefresh
|
||||
end
|
||||
if !@choosing && thispocket.length > 1 && itemwindow.index < thispocket.length &&
|
||||
!Settings::BAG_POCKET_AUTO_SORT[itemwindow.pocket - 1]
|
||||
itemwindow.sorting = true
|
||||
swapinitialpos = itemwindow.index
|
||||
pbPlayDecisionSE
|
||||
pbRefresh
|
||||
end
|
||||
elsif Input.trigger?(Input::BACK) # Cancel the item screen
|
||||
pbPlayCloseMenuSE
|
||||
@@ -647,9 +645,7 @@ class PokemonBagScreen
|
||||
qty = @scene.pbChooseNumber(_INTL("How many do you want to deposit?"), qty)
|
||||
end
|
||||
if qty > 0
|
||||
if !storage.can_add?(item, qty)
|
||||
pbDisplay(_INTL("There's no room to store items."))
|
||||
else
|
||||
if storage.can_add?(item, qty)
|
||||
if !@bag.remove(item, qty)
|
||||
raise "Can't delete items from Bag"
|
||||
end
|
||||
@@ -660,6 +656,8 @@ class PokemonBagScreen
|
||||
dispqty = (itm.is_important?) ? 1 : qty
|
||||
itemname = (dispqty > 1) ? itm.name_plural : itm.name
|
||||
pbDisplay(_INTL("Deposited {1} {2}.", dispqty, itemname))
|
||||
else
|
||||
pbDisplay(_INTL("There's no room to store items."))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -82,17 +82,13 @@ class PokemonPhoneScene
|
||||
j = i + @sprites["list"].top_item
|
||||
next if j >= commands.length
|
||||
trainer = @trainers[j]
|
||||
if trainer.length == 4
|
||||
if trainer[3]
|
||||
@sprites["rematch[#{i}]"].setBitmap("Graphics/Pictures/phoneRematch")
|
||||
end
|
||||
if trainer.length == 4 && trainer[3]
|
||||
@sprites["rematch[#{i}]"].setBitmap("Graphics/Pictures/phoneRematch")
|
||||
end
|
||||
end
|
||||
rematchcount = 0
|
||||
@trainers.each do |trainer|
|
||||
if trainer.length == 4
|
||||
rematchcount += 1 if trainer[3]
|
||||
end
|
||||
rematchcount += 1 if trainer.length == 4 && trainer[3]
|
||||
end
|
||||
infotext = _INTL("Registered<br>")
|
||||
infotext += _INTL(" <r>{1}<br>", @sprites["list"].commands.length)
|
||||
@@ -125,10 +121,8 @@ class PokemonPhoneScene
|
||||
j = i + @sprites["list"].top_item
|
||||
next if j >= commands.length
|
||||
trainer = @trainers[j]
|
||||
if trainer.length == 4
|
||||
if trainer[3]
|
||||
@sprites["rematch[#{i}]"].setBitmap("Graphics/Pictures/phoneRematch")
|
||||
end
|
||||
if trainer.length == 4 && trainer[3]
|
||||
@sprites["rematch[#{i}]"].setBitmap("Graphics/Pictures/phoneRematch")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -137,9 +131,7 @@ class PokemonPhoneScene
|
||||
break
|
||||
elsif Input.trigger?(Input::USE)
|
||||
index = @sprites["list"].index
|
||||
if index >= 0
|
||||
pbCallTrainer(@trainers[index][0], @trainers[index][1])
|
||||
end
|
||||
pbCallTrainer(@trainers[index][0], @trainers[index][1]) if index >= 0
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class PokemonLoadPanel < SpriteWrapper
|
||||
end
|
||||
if @refreshBitmap
|
||||
@refreshBitmap = false
|
||||
self.bitmap.clear if self.bitmap
|
||||
self.bitmap&.clear
|
||||
if @isContinue
|
||||
self.bitmap.blt(0, 0, @bgbitmap.bitmap, Rect.new(0, (@selected) ? 111 * 2 : 0, @bgbitmap.width, 111 * 2))
|
||||
else
|
||||
|
||||
@@ -40,7 +40,7 @@ module PropertyMixin
|
||||
end
|
||||
|
||||
def set(value)
|
||||
@setProc.call(value) if @setProc
|
||||
@setProc&.call(value)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -73,23 +73,21 @@ class ReadyMenuButton < SpriteWrapper
|
||||
textpos = [
|
||||
[@command[1], textx, 16, 2, Color.new(248, 248, 248), Color.new(40, 40, 40), 1]
|
||||
]
|
||||
if !@command[2]
|
||||
if !GameData::Item.get(@command[0]).is_important?
|
||||
qty = $bag.quantity(@command[0])
|
||||
if qty > 99
|
||||
textpos.push([_INTL(">99"), 230, 16, 1,
|
||||
Color.new(248, 248, 248), Color.new(40, 40, 40), 1])
|
||||
else
|
||||
textpos.push([_INTL("x{1}", qty), 230, 16, 1,
|
||||
Color.new(248, 248, 248), Color.new(40, 40, 40), 1])
|
||||
end
|
||||
if !@command[2] && !GameData::Item.get(@command[0]).is_important?
|
||||
qty = $bag.quantity(@command[0])
|
||||
if qty > 99
|
||||
textpos.push([_INTL(">99"), 230, 16, 1,
|
||||
Color.new(248, 248, 248), Color.new(40, 40, 40), 1])
|
||||
else
|
||||
textpos.push([_INTL("x{1}", qty), 230, 16, 1,
|
||||
Color.new(248, 248, 248), Color.new(40, 40, 40), 1])
|
||||
end
|
||||
end
|
||||
pbDrawTextPositions(self.bitmap, textpos)
|
||||
end
|
||||
|
||||
def update
|
||||
@icon.update if @icon
|
||||
@icon&.update
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
@@ -58,9 +58,9 @@ class MosaicPokemonSprite < PokemonSprite
|
||||
|
||||
def dispose
|
||||
super
|
||||
@mosaicbitmap.dispose if @mosaicbitmap
|
||||
@mosaicbitmap&.dispose
|
||||
@mosaicbitmap = nil
|
||||
@mosaicbitmap2.dispose if @mosaicbitmap2
|
||||
@mosaicbitmap2&.dispose
|
||||
@mosaicbitmap2 = nil
|
||||
end
|
||||
|
||||
@@ -80,15 +80,15 @@ class MosaicPokemonSprite < PokemonSprite
|
||||
@inrefresh = true
|
||||
@oldbitmap = bitmap
|
||||
if @mosaic <= 0 || !@oldbitmap
|
||||
@mosaicbitmap.dispose if @mosaicbitmap
|
||||
@mosaicbitmap&.dispose
|
||||
@mosaicbitmap = nil
|
||||
@mosaicbitmap2.dispose if @mosaicbitmap2
|
||||
@mosaicbitmap2&.dispose
|
||||
@mosaicbitmap2 = nil
|
||||
self.bitmap = @oldbitmap
|
||||
else
|
||||
newWidth = [(@oldbitmap.width / @mosaic), 1].max
|
||||
newHeight = [(@oldbitmap.height / @mosaic), 1].max
|
||||
@mosaicbitmap2.dispose if @mosaicbitmap2
|
||||
@mosaicbitmap2&.dispose
|
||||
@mosaicbitmap = pbDoEnsureBitmap(@mosaicbitmap, newWidth, newHeight)
|
||||
@mosaicbitmap.clear
|
||||
@mosaicbitmap2 = pbDoEnsureBitmap(@mosaicbitmap2, @oldbitmap.width, @oldbitmap.height)
|
||||
@@ -145,12 +145,12 @@ class PokemonBoxArrow < SpriteWrapper
|
||||
|
||||
def dispose
|
||||
@handsprite.dispose
|
||||
@heldpkmn.dispose if @heldpkmn
|
||||
@heldpkmn&.dispose
|
||||
super
|
||||
end
|
||||
|
||||
def heldPokemon
|
||||
@heldpkmn = nil if @heldpkmn && @heldpkmn.disposed?
|
||||
@heldpkmn = nil if @heldpkmn&.disposed?
|
||||
@holding = false if !@heldpkmn
|
||||
return @heldpkmn
|
||||
end
|
||||
@@ -231,14 +231,14 @@ class PokemonBoxArrow < SpriteWrapper
|
||||
end
|
||||
|
||||
def release
|
||||
@heldpkmn.release if @heldpkmn
|
||||
@heldpkmn&.release
|
||||
end
|
||||
|
||||
def update
|
||||
@updating = true
|
||||
super
|
||||
heldpkmn = heldPokemon
|
||||
heldpkmn.update if heldpkmn
|
||||
heldpkmn&.update
|
||||
@handsprite.update
|
||||
@holding = false if !heldpkmn
|
||||
if @grabbingState > 0
|
||||
@@ -314,7 +314,7 @@ class PokemonBoxSprite < SpriteWrapper
|
||||
def dispose
|
||||
if !disposed?
|
||||
PokemonBox::BOX_SIZE.times do |i|
|
||||
@pokemonsprites[i].dispose if @pokemonsprites[i]
|
||||
@pokemonsprites[i]&.dispose
|
||||
@pokemonsprites[i] = nil
|
||||
end
|
||||
@boxbitmap.dispose
|
||||
@@ -371,7 +371,7 @@ class PokemonBoxSprite < SpriteWrapper
|
||||
@bg = @boxnumber % PokemonStorage::BASICWALLPAPERQTY
|
||||
@storage[@boxnumber].background = @bg
|
||||
end
|
||||
@boxbitmap.dispose if @boxbitmap
|
||||
@boxbitmap&.dispose
|
||||
@boxbitmap = AnimatedBitmap.new("Graphics/Pictures/Storage/box_#{@bg}")
|
||||
end
|
||||
end
|
||||
@@ -466,7 +466,7 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
|
||||
def dispose
|
||||
Settings::MAX_PARTY_SIZE.times do |i|
|
||||
@pokemonsprites[i].dispose if @pokemonsprites[i]
|
||||
@pokemonsprites[i]&.dispose
|
||||
end
|
||||
@boxbitmap.dispose
|
||||
@contents.dispose
|
||||
@@ -539,8 +539,8 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
xvalues.push(18 + (72 * (i % 2)))
|
||||
yvalues.push(2 + (16 * (i % 2)) + (64 * (i / 2)))
|
||||
end
|
||||
@pokemonsprites.delete_if { |sprite| sprite && sprite.disposed? }
|
||||
@pokemonsprites.each { |sprite| sprite.refresh if sprite }
|
||||
@pokemonsprites.delete_if { |sprite| sprite&.disposed? }
|
||||
@pokemonsprites.each { |sprite| sprite&.refresh }
|
||||
Settings::MAX_PARTY_SIZE.times do |j|
|
||||
sprite = @pokemonsprites[j]
|
||||
if sprite && !sprite.disposed?
|
||||
@@ -615,12 +615,12 @@ class PokemonStorageScene
|
||||
pbSetSystemFont(@sprites["markingoverlay"].bitmap)
|
||||
@sprites["arrow"] = PokemonBoxArrow.new(@arrowviewport)
|
||||
@sprites["arrow"].z += 1
|
||||
if command != 2
|
||||
pbSetArrow(@sprites["arrow"], @selection)
|
||||
pbUpdateOverlay(@selection)
|
||||
else
|
||||
if command == 2
|
||||
pbPartySetArrow(@sprites["arrow"], @selection)
|
||||
pbUpdateOverlay(@selection, @storage.party)
|
||||
else
|
||||
pbSetArrow(@sprites["arrow"], @selection)
|
||||
pbUpdateOverlay(@selection)
|
||||
end
|
||||
pbSetMosaic(@selection)
|
||||
pbSEPlay("PC access")
|
||||
@@ -630,7 +630,7 @@ class PokemonStorageScene
|
||||
def pbCloseBox
|
||||
pbFadeOutAndHide(@sprites)
|
||||
pbDisposeSpriteHash(@sprites)
|
||||
@markingbitmap.dispose if @markingbitmap
|
||||
@markingbitmap&.dispose
|
||||
@boxviewport.dispose
|
||||
@boxsidesviewport.dispose
|
||||
@arrowviewport.dispose
|
||||
@@ -1043,24 +1043,21 @@ class PokemonStorageScene
|
||||
end
|
||||
|
||||
def pbJumpToBox(newbox)
|
||||
if @storage.currentBox != newbox
|
||||
if newbox > @storage.currentBox
|
||||
pbSwitchBoxToRight(newbox)
|
||||
else
|
||||
pbSwitchBoxToLeft(newbox)
|
||||
end
|
||||
@storage.currentBox = newbox
|
||||
return if @storage.currentBox == newbox
|
||||
if newbox > @storage.currentBox
|
||||
pbSwitchBoxToRight(newbox)
|
||||
else
|
||||
pbSwitchBoxToLeft(newbox)
|
||||
end
|
||||
@storage.currentBox = newbox
|
||||
end
|
||||
|
||||
def pbSetMosaic(selection)
|
||||
if !@screen.pbHeldPokemon
|
||||
if @boxForMosaic != @storage.currentBox || @selectionForMosaic != selection
|
||||
@sprites["pokemon"].mosaic = Graphics.frame_rate / 4
|
||||
@boxForMosaic = @storage.currentBox
|
||||
@selectionForMosaic = selection
|
||||
end
|
||||
end
|
||||
return if @screen.pbHeldPokemon
|
||||
return if @boxForMosaic == @storage.currentBox && @selectionForMosaic == selection
|
||||
@sprites["pokemon"].mosaic = Graphics.frame_rate / 4
|
||||
@boxForMosaic = @storage.currentBox
|
||||
@selectionForMosaic = selection
|
||||
end
|
||||
|
||||
def pbSetQuickSwap(value)
|
||||
@@ -1489,7 +1486,7 @@ class PokemonStorageScreen
|
||||
@scene.pbStartBox(self, command)
|
||||
loop do
|
||||
selected = @scene.pbSelectBox(@storage.party)
|
||||
if selected == nil
|
||||
if selected.nil?
|
||||
if pbHeldPokemon
|
||||
pbDisplay(_INTL("You're holding a Pokémon!"))
|
||||
next
|
||||
@@ -1569,7 +1566,7 @@ class PokemonStorageScreen
|
||||
@scene.pbStartBox(self, command)
|
||||
loop do
|
||||
selected = @scene.pbSelectBox(@storage.party)
|
||||
if selected == nil
|
||||
if selected.nil?
|
||||
next if pbConfirm(_INTL("Continue Box operations?"))
|
||||
break
|
||||
else
|
||||
@@ -1713,11 +1710,11 @@ class PokemonStorageScreen
|
||||
if pbAbleCount <= 1 && pbAble?(@storage[box, index]) && !heldpoke
|
||||
pbPlayBuzzerSE
|
||||
pbDisplay(_INTL("That's your last Pokémon!"))
|
||||
elsif heldpoke && heldpoke.mail
|
||||
elsif heldpoke&.mail
|
||||
pbDisplay(_INTL("Please remove the Mail."))
|
||||
elsif !heldpoke && @storage[box, index].mail
|
||||
pbDisplay(_INTL("Please remove the Mail."))
|
||||
elsif heldpoke && heldpoke.cannot_store
|
||||
elsif heldpoke&.cannot_store
|
||||
pbDisplay(_INTL("{1} refuses to go into storage!", heldpoke.name))
|
||||
elsif !heldpoke && @storage[box, index].cannot_store
|
||||
pbDisplay(_INTL("{1} refuses to go into storage!", @storage[box, index].name))
|
||||
@@ -1900,12 +1897,12 @@ class PokemonStorageScreen
|
||||
if pokemon.item
|
||||
itemname = pokemon.item.name
|
||||
if pbConfirm(_INTL("Take this {1}?", itemname))
|
||||
if !$bag.add(pokemon.item)
|
||||
pbDisplay(_INTL("Can't store the {1}.", itemname))
|
||||
else
|
||||
if $bag.add(pokemon.item)
|
||||
pbDisplay(_INTL("Took the {1}.", itemname))
|
||||
pokemon.item = nil
|
||||
@scene.pbHardRefresh
|
||||
else
|
||||
pbDisplay(_INTL("Can't store the {1}.", itemname))
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -1966,7 +1963,7 @@ class PokemonStorageScreen
|
||||
end
|
||||
next
|
||||
end
|
||||
if selected == nil
|
||||
if selected.nil?
|
||||
next if pbConfirm(_INTL("Continue Box operations?"))
|
||||
break
|
||||
elsif selected[0] == -4 # Box name
|
||||
|
||||
@@ -208,10 +208,8 @@ module UIHelper
|
||||
Graphics.update
|
||||
Input.update
|
||||
(block_given?) ? yield : cw.update
|
||||
if !cw.busy?
|
||||
if brief || (Input.trigger?(Input::USE) && cw.resume)
|
||||
break
|
||||
end
|
||||
if !cw.busy? && (brief || (Input.trigger?(Input::USE) && cw.resume))
|
||||
break
|
||||
end
|
||||
end
|
||||
cw.visible = oldvisible
|
||||
@@ -336,7 +334,7 @@ module UIHelper
|
||||
oldvisible = helpwindow.visible
|
||||
helpwindow.visible = helptext ? true : false
|
||||
helpwindow.letterbyletter = false
|
||||
helpwindow.text = helptext ? helptext : ""
|
||||
helpwindow.text = helptext || ""
|
||||
cmdwindow = Window_CommandPokemon.new(commands)
|
||||
cmdwindow.index = initcmd
|
||||
begin
|
||||
@@ -361,7 +359,7 @@ module UIHelper
|
||||
end
|
||||
end
|
||||
ensure
|
||||
cmdwindow.dispose if cmdwindow
|
||||
cmdwindow&.dispose
|
||||
end
|
||||
helpwindow.visible = oldvisible
|
||||
return ret
|
||||
|
||||
@@ -175,7 +175,7 @@ end
|
||||
class PokemonMart_Scene
|
||||
def update
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
@subscene.pbUpdate if @subscene
|
||||
@subscene&.pbUpdate
|
||||
end
|
||||
|
||||
def pbRefresh
|
||||
@@ -296,7 +296,7 @@ class PokemonMart_Scene
|
||||
end
|
||||
|
||||
def pbEndSellScene
|
||||
@subscene.pbEndScene if @subscene
|
||||
@subscene&.pbEndScene
|
||||
pbDisposeSpriteHash(@sprites)
|
||||
if @viewport2
|
||||
numFrames = Graphics.frame_rate * 4 / 10
|
||||
@@ -582,14 +582,7 @@ class PokemonMartScreen
|
||||
break if !@adapter.addItem(item)
|
||||
added += 1
|
||||
end
|
||||
if added != quantity
|
||||
added.times do
|
||||
if !@adapter.removeItem(item)
|
||||
raise _INTL("Failed to delete stored items")
|
||||
end
|
||||
end
|
||||
pbDisplayPaused(_INTL("You have no more room in the Bag."))
|
||||
else
|
||||
if added == quantity
|
||||
$stats.money_spent_at_marts += price
|
||||
$stats.mart_items_bought += quantity
|
||||
@adapter.setMoney(@adapter.getMoney - price)
|
||||
@@ -615,6 +608,13 @@ class PokemonMartScreen
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
added.times do
|
||||
if !@adapter.removeItem(item)
|
||||
raise _INTL("Failed to delete stored items")
|
||||
end
|
||||
end
|
||||
pbDisplayPaused(_INTL("You have no more room in the Bag."))
|
||||
end
|
||||
end
|
||||
@scene.pbEndBuyScene
|
||||
@@ -652,7 +652,8 @@ class PokemonMartScreen
|
||||
qty.times do
|
||||
@adapter.removeItem(item)
|
||||
end
|
||||
pbDisplayPaused(_INTL("Turned over the {1} and received ${2}.", itemname, price.to_s_formatted)) { pbSEPlay("Mart buy item") }
|
||||
pbDisplayPaused(_INTL("Turned over the {1} and received ${2}.",
|
||||
itemname, price.to_s_formatted)) { pbSEPlay("Mart buy item") }
|
||||
@scene.pbRefresh
|
||||
end
|
||||
@scene.pbHideMoney
|
||||
@@ -673,8 +674,7 @@ def pbPokemonMart(stock, speech = nil, cantsell = false)
|
||||
commands[cmdBuy = commands.length] = _INTL("Buy")
|
||||
commands[cmdSell = commands.length] = _INTL("Sell") if !cantsell
|
||||
commands[cmdQuit = commands.length] = _INTL("Quit")
|
||||
cmd = pbMessage(speech ? speech : _INTL("Welcome! How may I serve you?"),
|
||||
commands, cmdQuit + 1)
|
||||
cmd = pbMessage(speech || _INTL("Welcome! How may I serve you?"), commands, cmdQuit + 1)
|
||||
loop do
|
||||
if cmdBuy >= 0 && cmd == cmdBuy
|
||||
scene = PokemonMart_Scene.new
|
||||
@@ -688,8 +688,7 @@ def pbPokemonMart(stock, speech = nil, cantsell = false)
|
||||
pbMessage(_INTL("Please come again!"))
|
||||
break
|
||||
end
|
||||
cmd = pbMessage(_INTL("Is there anything else I can help you with?"),
|
||||
commands, cmdQuit + 1)
|
||||
cmd = pbMessage(_INTL("Is there anything else I can help you with?"), commands, cmdQuit + 1)
|
||||
end
|
||||
$game_temp.clear_mart_prices
|
||||
end
|
||||
|
||||
@@ -72,7 +72,7 @@ class PurifyChamberSet
|
||||
end
|
||||
|
||||
def shadow=(value)
|
||||
if value == nil || value.shadowPokemon?
|
||||
if value.nil? || value.shadowPokemon?
|
||||
@shadow = value
|
||||
end
|
||||
end
|
||||
@@ -123,7 +123,7 @@ class PurifyChamberSet
|
||||
def insertAfter(index, value)
|
||||
return if self.length >= PurifyChamber::SETSIZE
|
||||
return if index < 0 || index >= PurifyChamber::SETSIZE
|
||||
unless value && value.shadowPokemon?
|
||||
unless value&.shadowPokemon?
|
||||
@list.insert(index + 1, value)
|
||||
@list.compact!
|
||||
@facing += 1 if @facing > index && value != nil
|
||||
@@ -133,7 +133,7 @@ class PurifyChamberSet
|
||||
|
||||
def insertAt(index, value)
|
||||
return if index < 0 || index >= PurifyChamber::SETSIZE
|
||||
unless value && value.shadowPokemon?
|
||||
unless value&.shadowPokemon?
|
||||
@list[index] = value
|
||||
@list.compact!
|
||||
@facing = [[@facing, @list.length - 1].min, 0].max
|
||||
@@ -220,7 +220,7 @@ class PurifyChamber
|
||||
end
|
||||
|
||||
def [](chamber, slot = nil)
|
||||
if slot == nil
|
||||
if slot.nil?
|
||||
return @sets[chamber]
|
||||
end
|
||||
return nil if chamber < 0 || chamber >= NUMSETS
|
||||
@@ -249,13 +249,11 @@ class PurifyChamber
|
||||
def update # called each step
|
||||
NUMSETS.times do |set|
|
||||
# If a shadow Pokemon and a regular Pokemon are on the same set
|
||||
if @sets[set].shadow
|
||||
if @sets[set].shadow.heart_gauge > 0
|
||||
flow = self.chamberFlow(set)
|
||||
@sets[set].shadow.adjustHeart(-flow)
|
||||
if isPurifiable?(set)
|
||||
pbMessage(_INTL("Your {1} in the Purify Chamber is ready for purification!", @sets[set].shadow.name))
|
||||
end
|
||||
if @sets[set].shadow && @sets[set].shadow.heart_gauge > 0
|
||||
flow = self.chamberFlow(set)
|
||||
@sets[set].shadow.adjustHeart(-flow)
|
||||
if isPurifiable?(set)
|
||||
pbMessage(_INTL("Your {1} in the Purify Chamber is ready for purification!", @sets[set].shadow.name))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -363,7 +361,7 @@ class PurifyChamberScreen
|
||||
@scene.pbDisplay(_INTL("Can't place an egg there."))
|
||||
return false
|
||||
end
|
||||
if (position == 0)
|
||||
if position == 0
|
||||
if pkmn.shadowPokemon?
|
||||
# Remove from storage and place in set
|
||||
oldpkmn = PurifyChamberHelper.pbGetPokemon(@chamber, position)
|
||||
@@ -378,7 +376,7 @@ class PurifyChamberScreen
|
||||
@scene.pbDisplay(_INTL("Only a Shadow Pokémon can go there."))
|
||||
return false
|
||||
end
|
||||
elsif (position >= 1)
|
||||
elsif position >= 1
|
||||
if pkmn.shadowPokemon?
|
||||
@scene.pbDisplay(_INTL("Can't place a Shadow Pokémon there."))
|
||||
return false
|
||||
@@ -454,12 +452,12 @@ class PurifyChamberScreen
|
||||
if choice == 0
|
||||
if heldpkmn
|
||||
if pbPlace(heldpkmn, cmd[1]) # calls place or shift as appropriate
|
||||
if !curpkmn
|
||||
if curpkmn
|
||||
heldpkmn = curpkmn # Pokemon was shifted
|
||||
else
|
||||
pbOnPlace(heldpkmn)
|
||||
@scene.pbPositionHint(PurifyChamberHelper.adjustOnInsert(cmd[1]))
|
||||
heldpkmn = nil # Pokemon was placed
|
||||
else
|
||||
heldpkmn = curpkmn # Pokemon was shifted
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -498,14 +496,14 @@ class PurifyChamberScreen
|
||||
if pos
|
||||
newpkmn = $PokemonStorage[pos[0], pos[1]]
|
||||
if newpkmn
|
||||
if (newpkmn.shadowPokemon?) != (curpkmn.shadowPokemon?)
|
||||
@scene.pbDisplay(_INTL("That Pokémon can't be placed there."))
|
||||
else
|
||||
if (newpkmn.shadowPokemon?) == (curpkmn.shadowPokemon?)
|
||||
@scene.pbReplace(cmd, pos)
|
||||
PurifyChamberHelper.pbSetPokemon(@chamber, cmd[1], newpkmn)
|
||||
$PokemonStorage[pos[0], pos[1]] = curpkmn
|
||||
@scene.pbRefresh
|
||||
pbOnPlace(curpkmn)
|
||||
else
|
||||
@scene.pbDisplay(_INTL("That Pokémon can't be placed there."))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -920,12 +918,12 @@ class PurifyChamberSetView < SpriteWrapper
|
||||
pos += 1 if button == Input::UP
|
||||
pos = nil if button == Input::RIGHT
|
||||
end
|
||||
if pos != nil
|
||||
if pos.nil?
|
||||
@cursor = 0
|
||||
else
|
||||
pos -= (pos / points).floor * points # modulus
|
||||
pos *= 2 if @chamber.setCount(@set) == PurifyChamber::SETSIZE
|
||||
@cursor = pos + 1
|
||||
else
|
||||
@cursor = 0
|
||||
end
|
||||
end
|
||||
if @cursor != oldcursor
|
||||
@@ -1058,7 +1056,7 @@ class PurifyChamberSetView < SpriteWrapper
|
||||
def update
|
||||
super
|
||||
@__sprites.each do |sprite|
|
||||
sprite.update if sprite
|
||||
sprite&.update
|
||||
end
|
||||
@flows.each do |flow|
|
||||
flow.update
|
||||
@@ -1070,7 +1068,7 @@ class PurifyChamberSetView < SpriteWrapper
|
||||
|
||||
def dispose
|
||||
@__sprites.each do |sprite|
|
||||
sprite.dispose if sprite
|
||||
sprite&.dispose
|
||||
end
|
||||
@flows.each do |flow|
|
||||
flow.dispose
|
||||
|
||||
@@ -42,7 +42,7 @@ def pbEditMysteryGift(type, item, id = 0, giftname = "")
|
||||
end
|
||||
elsif type > 0 # Item
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(1, 99999)
|
||||
params.setRange(1, 99_999)
|
||||
params.setDefaultValue(type)
|
||||
params.setCancelValue(0)
|
||||
loop do
|
||||
@@ -67,7 +67,7 @@ def pbEditMysteryGift(type, item, id = 0, giftname = "")
|
||||
idlist.push(i[0])
|
||||
end
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(0, 99999)
|
||||
params.setRange(0, 99_999)
|
||||
params.setDefaultValue(id)
|
||||
params.setCancelValue(0)
|
||||
loop do
|
||||
@@ -99,9 +99,7 @@ end
|
||||
|
||||
def pbCreateMysteryGift(type, item)
|
||||
gift = pbEditMysteryGift(type, item)
|
||||
if !gift
|
||||
pbMessage(_INTL("Didn't create a gift."))
|
||||
else
|
||||
if gift
|
||||
begin
|
||||
if safeExists?("MysteryGiftMaster.txt")
|
||||
master = IO.read("MysteryGiftMaster.txt")
|
||||
@@ -116,6 +114,8 @@ def pbCreateMysteryGift(type, item)
|
||||
rescue
|
||||
pbMessage(_INTL("Couldn't save the gift to MysteryGiftMaster.txt."))
|
||||
end
|
||||
else
|
||||
pbMessage(_INTL("Didn't create a gift."))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ class PokemonEntryScene
|
||||
end
|
||||
@sprites["helpwindow"].update
|
||||
@sprites["entry"].update
|
||||
@sprites["subject"].update if @sprites["subject"]
|
||||
@sprites["subject"]&.update
|
||||
end
|
||||
Input.update
|
||||
return ret
|
||||
@@ -207,7 +207,7 @@ class PokemonEntryScene
|
||||
@sprites["helpwindow"].update
|
||||
@sprites["entry"].update
|
||||
@sprites["entry2"].update
|
||||
@sprites["subject"].update if @sprites["subject"]
|
||||
@sprites["subject"]&.update
|
||||
if Input.trigger?(Input::USE)
|
||||
index = @sprites["entry2"].command
|
||||
if index == -3 # Confirm text
|
||||
@@ -741,7 +741,7 @@ class PokemonEntryScene2
|
||||
def pbEndScene
|
||||
pbFadeOutAndHide(@sprites) { pbUpdate }
|
||||
@bitmaps.each do |bitmap|
|
||||
bitmap.dispose if bitmap
|
||||
bitmap&.dispose
|
||||
end
|
||||
@bitmaps.clear
|
||||
pbDisposeSpriteHash(@sprites)
|
||||
|
||||
Reference in New Issue
Block a user