mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-12 15:44:57 +00:00
Moved all settings into module Settings
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user