Moved all settings into module Settings

This commit is contained in:
Maruno17
2021-02-01 21:03:58 +00:00
parent 923844fdc7
commit 1209b804e9
88 changed files with 848 additions and 839 deletions

View File

@@ -59,11 +59,11 @@ class PokemonStorage
attr_writer :unlockedWallpapers
BASICWALLPAPERQTY = 16
def initialize(maxBoxes = NUM_STORAGE_BOXES, maxPokemon = PokemonBox::BOX_SIZE)
def initialize(maxBoxes = Settings::NUM_STORAGE_BOXES, maxPokemon = PokemonBox::BOX_SIZE)
@boxes = []
for i in 0...maxBoxes
@boxes[i] = PokemonBox.new(_INTL("Box {1}",i+1),maxPokemon)
@boxes[i].background = i%BASICWALLPAPERQTY
@boxes[i].background = i % BASICWALLPAPERQTY
end
@currentBox = 0
@boxmode = -1
@@ -131,7 +131,7 @@ class PokemonStorage
def maxPokemon(box)
return 0 if box >= self.maxBoxes
return (box < 0) ? MAX_PARTY_SIZE : self[box].length
return (box < 0) ? Settings::MAX_PARTY_SIZE : self[box].length
end
def full?
@@ -144,7 +144,7 @@ class PokemonStorage
def pbFirstFreePos(box)
if box==-1
ret = self.party.length
return (ret >= MAX_PARTY_SIZE) ? -1 : ret
return (ret >= Settings::MAX_PARTY_SIZE) ? -1 : ret
end
for i in 0...maxPokemon(box)
return i if !self[box,i]