Tidying up from previous commit

This commit is contained in:
Maruno17
2021-12-29 18:53:39 +00:00
parent 13cc9790ce
commit ca9df4177a
2 changed files with 49 additions and 66 deletions

View File

@@ -65,9 +65,6 @@ module Settings
#============================================================================= #=============================================================================
# An array of items which act as Mega Rings for the player (NPCs don't need a
# Mega Ring item, just a Mega Stone held by their Pokémon).
MEGA_RINGS = [:MEGARING, :MEGABRACELET, :MEGACUFF, :MEGACHARM]
# The Game Switch which, while ON, prevents all Pokémon in battle from Mega # The Game Switch which, while ON, prevents all Pokémon in battle from Mega
# Evolving even if they otherwise could. # Evolving even if they otherwise could.
NO_MEGA_EVOLUTION = 34 NO_MEGA_EVOLUTION = 34

View File

@@ -187,8 +187,8 @@ class PokemonMart_Scene
@sprites["itemtextwindow"].text = @sprites["itemtextwindow"].text =
(itemwindow.item) ? @adapter.getDescription(itemwindow.item) : _INTL("Quit shopping.") (itemwindow.item) ? @adapter.getDescription(itemwindow.item) : _INTL("Quit shopping.")
@sprites["qtywindow"].visible = !itemwindow.item.nil? @sprites["qtywindow"].visible = !itemwindow.item.nil?
@sprites["qtywindow"].text = _INTL("In Bag:<r>x{1}", @adapter.getQuantity(itemwindow.item)) @sprites["qtywindow"].text = _INTL("In Bag:<r>{1}", @adapter.getQuantity(itemwindow.item))
@sprites["qtywindow"].y = Graphics.height - 108 - @sprites["qtywindow"].height @sprites["qtywindow"].y = Graphics.height - 102 - @sprites["qtywindow"].height
itemwindow.refresh itemwindow.refresh
end end
@sprites["moneywindow"].text = _INTL("Money:\r\n<r>{1}", @adapter.getMoneyString) @sprites["moneywindow"].text = _INTL("Money:\r\n<r>{1}", @adapter.getMoneyString)
@@ -243,8 +243,8 @@ class PokemonMart_Scene
@sprites["qtywindow"].height = 64 @sprites["qtywindow"].height = 64
@sprites["qtywindow"].baseColor = Color.new(88, 88, 80) @sprites["qtywindow"].baseColor = Color.new(88, 88, 80)
@sprites["qtywindow"].shadowColor = Color.new(168, 184, 184) @sprites["qtywindow"].shadowColor = Color.new(168, 184, 184)
@sprites["qtywindow"].text = _INTL("In Bag:<r>x{1}", @adapter.getQuantity(@sprites["itemwindow"].item)) @sprites["qtywindow"].text = _INTL("In Bag:<r>{1}", @adapter.getQuantity(@sprites["itemwindow"].item))
@sprites["qtywindow"].y = Graphics.height - 108 - @sprites["qtywindow"].height @sprites["qtywindow"].y = Graphics.height - 102 - @sprites["qtywindow"].height
pbDeactivateWindows(@sprites) pbDeactivateWindows(@sprites)
@buying = buying @buying = buying
pbRefresh pbRefresh
@@ -439,34 +439,21 @@ class PokemonMart_Scene
itemprice = @adapter.getPrice(item, !@buying) itemprice = @adapter.getPrice(item, !@buying)
itemprice /= 2 if !@buying itemprice /= 2 if !@buying
pbDisplay(helptext, true) pbDisplay(helptext, true)
using(numwindow = Window_AdvancedTextPokemon.new("")) { # Showing number of items using(numwindow = Window_AdvancedTextPokemon.new("")) do # Showing number of items
qty = @adapter.getQuantity(item)
using(inbagwindow = Window_AdvancedTextPokemon.new("")) { # Showing quantity in bag
pbPrepareWindow(numwindow) pbPrepareWindow(numwindow)
pbPrepareWindow(inbagwindow)
numwindow.viewport = @viewport numwindow.viewport = @viewport
numwindow.width = 224 numwindow.width = 224
numwindow.height = 64 numwindow.height = 64
numwindow.baseColor = Color.new(88, 88, 80) numwindow.baseColor = Color.new(88, 88, 80)
numwindow.shadowColor = Color.new(168, 184, 184) numwindow.shadowColor = Color.new(168, 184, 184)
inbagwindow.visible = @buying
inbagwindow.viewport = @viewport
inbagwindow.width = 190
inbagwindow.height = 64
inbagwindow.baseColor = Color.new(88, 88, 80)
inbagwindow.shadowColor = Color.new(168, 184, 184)
inbagwindow.text = _INTL("In Bag:<r>{1} ", qty)
numwindow.text = _INTL("x{1}<r>$ {2}", curnumber, (curnumber * itemprice).to_s_formatted) numwindow.text = _INTL("x{1}<r>$ {2}", curnumber, (curnumber * itemprice).to_s_formatted)
pbBottomRight(numwindow) pbBottomRight(numwindow)
numwindow.y -= helpwindow.height numwindow.y -= helpwindow.height
pbBottomLeft(inbagwindow)
inbagwindow.y -= helpwindow.height
loop do loop do
Graphics.update Graphics.update
Input.update Input.update
numwindow.update numwindow.update
inbagwindow.update update
self.update
if Input.repeat?(Input::LEFT) if Input.repeat?(Input::LEFT)
pbPlayCursorSE pbPlayCursorSE
curnumber -= 10 curnumber -= 10
@@ -497,8 +484,7 @@ class PokemonMart_Scene
break break
end end
end end
} end
}
helpwindow.visible = false helpwindow.visible = false
return ret return ret
end end