mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Moved all settings into module Settings
This commit is contained in:
@@ -122,11 +122,11 @@ class PokemonPauseMenu
|
||||
commands[cmdPokegear = commands.length] = _INTL("Pokégear") if $Trainer.pokegear
|
||||
commands[cmdTrainer = commands.length] = $Trainer.name
|
||||
if pbInSafari?
|
||||
if SAFARI_STEPS<=0
|
||||
if Settings::SAFARI_STEPS <= 0
|
||||
@scene.pbShowInfo(_INTL("Balls: {1}",pbSafariState.ballcount))
|
||||
else
|
||||
@scene.pbShowInfo(_INTL("Steps: {1}/{2}\nBalls: {3}",
|
||||
pbSafariState.steps,SAFARI_STEPS,pbSafariState.ballcount))
|
||||
pbSafariState.steps, Settings::SAFARI_STEPS, pbSafariState.ballcount))
|
||||
end
|
||||
commands[cmdQuit = commands.length] = _INTL("Quit")
|
||||
elsif pbInBugContest?
|
||||
@@ -148,7 +148,7 @@ class PokemonPauseMenu
|
||||
loop do
|
||||
command = @scene.pbShowCommands(commands)
|
||||
if cmdPokedex>=0 && command==cmdPokedex
|
||||
if USE_CURRENT_REGION_DEX
|
||||
if Settings::USE_CURRENT_REGION_DEX
|
||||
pbFadeOutIn {
|
||||
scene = PokemonPokedex_Scene.new
|
||||
screen = PokemonPokedexScreen.new(scene)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#===============================================================================
|
||||
# Pokédex Regional Dexes list menu screen
|
||||
# * For choosing which region list to view. Only appears when there is more
|
||||
# than one viable region list to choose from, and if USE_CURRENT_REGION_DEX is
|
||||
# false.
|
||||
# than one viable region list to choose from, and if
|
||||
# Settings::USE_CURRENT_REGION_DEX is false.
|
||||
#===============================================================================
|
||||
class Window_DexesList < Window_CommandPokemon
|
||||
def initialize(commands,commands2,width)
|
||||
@@ -93,7 +93,7 @@ class PokemonPokedexMenuScreen
|
||||
def pbStartScreen
|
||||
commands = []
|
||||
commands2 = []
|
||||
dexnames = pbDexNames
|
||||
dexnames = Settings.pokedex_names
|
||||
for i in 0...$PokemonGlobal.pokedexViable.length
|
||||
index = $PokemonGlobal.pokedexViable[i]
|
||||
if dexnames[index]==nil
|
||||
|
||||
@@ -282,7 +282,7 @@ class PokemonPokedex_Scene
|
||||
# return value of pbGetCurrentRegion, and thus will change according to the
|
||||
# current map's MapPosition metadata setting.
|
||||
def pbGetPokedexRegion
|
||||
if USE_CURRENT_REGION_DEX
|
||||
if Settings::USE_CURRENT_REGION_DEX
|
||||
region = pbGetCurrentRegion
|
||||
region = -1 if region>=$PokemonGlobal.pokedexUnlocked.length-1
|
||||
return region
|
||||
@@ -320,7 +320,7 @@ class PokemonPokedex_Scene
|
||||
regionalSpecies = []
|
||||
GameData::Species.each { |s| regionalSpecies.push(s.id) if s.form == 0 }
|
||||
end
|
||||
shift = DEXES_WITH_OFFSETS.include?(region)
|
||||
shift = Settings::DEXES_WITH_OFFSETS.include?(region)
|
||||
ret = []
|
||||
regionalSpecies.each_with_index do |species, i|
|
||||
next if !species
|
||||
@@ -386,7 +386,7 @@ class PokemonPokedex_Scene
|
||||
# Write various bits of text
|
||||
dexname = _INTL("Pokédex")
|
||||
if $PokemonGlobal.pokedexUnlocked.length>1
|
||||
thisdex = pbDexNames[pbGetSavePositionIndex]
|
||||
thisdex = Settings.pokedex_names[pbGetSavePositionIndex]
|
||||
if thisdex!=nil
|
||||
dexname = (thisdex.is_a?(Array)) ? thisdex[0] : thisdex
|
||||
end
|
||||
@@ -792,8 +792,8 @@ class PokemonPokedex_Scene
|
||||
def pbDexEntry(index)
|
||||
oldsprites = pbFadeOutAndHide(@sprites)
|
||||
region = -1
|
||||
if !USE_CURRENT_REGION_DEX
|
||||
dexnames = pbDexNames
|
||||
if !Settings::USE_CURRENT_REGION_DEX
|
||||
dexnames = Settings.pokedex_names
|
||||
if dexnames[pbGetSavePositionIndex].is_a?(Array)
|
||||
region = dexnames[pbGetSavePositionIndex][1]
|
||||
end
|
||||
|
||||
@@ -26,7 +26,7 @@ class PokemonPokedexInfo_Scene
|
||||
@sprites["areamap"].setBitmap("Graphics/Pictures/#{@mapdata[@region][1]}")
|
||||
@sprites["areamap"].x += (Graphics.width-@sprites["areamap"].bitmap.width)/2
|
||||
@sprites["areamap"].y += (Graphics.height+32-@sprites["areamap"].bitmap.height)/2
|
||||
for hidden in REGION_MAP_EXTRAS
|
||||
for hidden in Settings::REGION_MAP_EXTRAS
|
||||
if hidden[0]==@region && hidden[1]>0 && $game_switches[hidden[1]]
|
||||
pbDrawImagePositions(@sprites["areamap"].bitmap,[
|
||||
["Graphics/Pictures/#{hidden[4]}",
|
||||
@@ -73,7 +73,7 @@ class PokemonPokedexInfo_Scene
|
||||
dexnum = species
|
||||
dexnumshift = false
|
||||
if $PokemonGlobal.pokedexUnlocked[$PokemonGlobal.pokedexUnlocked.length - 1]
|
||||
dexnumshift = true if DEXES_WITH_OFFSETS.include?(-1) # National Dex
|
||||
dexnumshift = true if Settings::DEXES_WITH_OFFSETS.include?(-1) # National Dex
|
||||
else
|
||||
dexnum = 0
|
||||
for i in 0...$PokemonGlobal.pokedexUnlocked.length - 1 # Regional Dexes
|
||||
@@ -81,7 +81,7 @@ class PokemonPokedexInfo_Scene
|
||||
num = pbGetRegionalNumber(i,species)
|
||||
next if num <= 0
|
||||
dexnum = num
|
||||
dexnumshift = true if DEXES_WITH_OFFSETS.include?(i)
|
||||
dexnumshift = true if Settings::DEXES_WITH_OFFSETS.include?(i)
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -153,12 +153,12 @@ class PokemonPokedexInfo_Scene
|
||||
case sp.gender_rate
|
||||
when PBGenderRates::AlwaysMale, PBGenderRates::AlwaysFemale, PBGenderRates::Genderless
|
||||
real_gender = (sp.gender_rate == PBGenderRates::AlwaysFemale) ? 1 : 0
|
||||
next if !$Trainer.seen_forms[@species][real_gender][sp.form] && !DEX_SHOWS_ALL_FORMS
|
||||
next if !$Trainer.seen_forms[@species][real_gender][sp.form] && !Settings::DEX_SHOWS_ALL_FORMS
|
||||
real_gender = 2 if sp.gender_rate == PBGenderRates::Genderless
|
||||
ret.push([sp.form_name, real_gender, sp.form])
|
||||
else # Both male and female
|
||||
for real_gender in 0...2
|
||||
next if !$Trainer.seen_forms[@species][real_gender][sp.form] && !DEX_SHOWS_ALL_FORMS
|
||||
next if !$Trainer.seen_forms[@species][real_gender][sp.form] && !Settings::DEX_SHOWS_ALL_FORMS
|
||||
ret.push([sp.form_name, real_gender, sp.form])
|
||||
break if sp.form_name && !sp.form_name.empty? # Only show 1 entry for each non-0 form
|
||||
end
|
||||
@@ -554,14 +554,14 @@ class PokemonPokedexInfoScreen
|
||||
|
||||
def pbStartSceneSingle(species) # For use from a Pokémon's summary screen
|
||||
region = -1
|
||||
if USE_CURRENT_REGION_DEX
|
||||
if Settings::USE_CURRENT_REGION_DEX
|
||||
region = pbGetCurrentRegion
|
||||
region = -1 if region>=$PokemonGlobal.pokedexUnlocked.length-1
|
||||
else
|
||||
region = $PokemonGlobal.pokedexDex # National Dex -1, regional dexes 0 etc.
|
||||
end
|
||||
dexnum = pbGetRegionalNumber(region,species)
|
||||
dexnumshift = DEXES_WITH_OFFSETS.include?(region)
|
||||
dexnumshift = Settings::DEXES_WITH_OFFSETS.include?(region)
|
||||
dexlist = [[species,GameData::Species.get(species).name,0,0,dexnum,dexnumshift]]
|
||||
@scene.pbStartScene(dexlist,0,region)
|
||||
@scene.pbScene
|
||||
|
||||
@@ -448,7 +448,7 @@ class PokemonParty_Scene
|
||||
pbBottomLeftLines(@sprites["helpwindow"],1)
|
||||
pbSetHelpText(starthelptext)
|
||||
# Add party Pokémon sprites
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
if @party[i]
|
||||
@sprites["pokemon#{i}"] = PokemonPartyPanel.new(@party[i],i,@viewport)
|
||||
else
|
||||
@@ -457,10 +457,10 @@ class PokemonParty_Scene
|
||||
@sprites["pokemon#{i}"].text = annotations[i] if annotations
|
||||
end
|
||||
if @multiselect
|
||||
@sprites["pokemon#{MAX_PARTY_SIZE}"] = PokemonPartyConfirmSprite.new(@viewport)
|
||||
@sprites["pokemon#{MAX_PARTY_SIZE + 1}"] = PokemonPartyCancelSprite2.new(@viewport)
|
||||
@sprites["pokemon#{Settings::MAX_PARTY_SIZE}"] = PokemonPartyConfirmSprite.new(@viewport)
|
||||
@sprites["pokemon#{Settings::MAX_PARTY_SIZE + 1}"] = PokemonPartyCancelSprite2.new(@viewport)
|
||||
else
|
||||
@sprites["pokemon#{MAX_PARTY_SIZE}"] = PokemonPartyCancelSprite.new(@viewport)
|
||||
@sprites["pokemon#{Settings::MAX_PARTY_SIZE}"] = PokemonPartyCancelSprite.new(@viewport)
|
||||
end
|
||||
# Select first Pokémon
|
||||
@activecmd = 0
|
||||
@@ -573,14 +573,14 @@ class PokemonParty_Scene
|
||||
end
|
||||
|
||||
def pbAnnotate(annot)
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@sprites["pokemon#{i}"].text = (annot) ? annot[i] : nil
|
||||
end
|
||||
end
|
||||
|
||||
def pbSelect(item)
|
||||
@activecmd = item
|
||||
numsprites = MAX_PARTY_SIZE + ((@multiselect) ? 2 : 1)
|
||||
numsprites = Settings::MAX_PARTY_SIZE + ((@multiselect) ? 2 : 1)
|
||||
for i in 0...numsprites
|
||||
@sprites["pokemon#{i}"].selected = (i==@activecmd)
|
||||
end
|
||||
@@ -620,7 +620,7 @@ class PokemonParty_Scene
|
||||
Input.update
|
||||
self.update
|
||||
end
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@sprites["pokemon#{i}"].preselected = false
|
||||
@sprites["pokemon#{i}"].switching = false
|
||||
end
|
||||
@@ -628,7 +628,7 @@ class PokemonParty_Scene
|
||||
end
|
||||
|
||||
def pbClearSwitching
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@sprites["pokemon#{i}"].preselected = false
|
||||
@sprites["pokemon#{i}"].switching = false
|
||||
end
|
||||
@@ -674,7 +674,7 @@ class PokemonParty_Scene
|
||||
end
|
||||
|
||||
def pbChoosePokemon(switching=false,initialsel=-1,canswitch=0)
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@sprites["pokemon#{i}"].preselected = (switching && i==@activecmd)
|
||||
@sprites["pokemon#{i}"].switching = switching
|
||||
end
|
||||
@@ -695,12 +695,12 @@ class PokemonParty_Scene
|
||||
end
|
||||
if @activecmd!=oldsel # Changing selection
|
||||
pbPlayCursorSE
|
||||
numsprites = MAX_PARTY_SIZE + ((@multiselect) ? 2 : 1)
|
||||
numsprites = Settings::MAX_PARTY_SIZE + ((@multiselect) ? 2 : 1)
|
||||
for i in 0...numsprites
|
||||
@sprites["pokemon#{i}"].selected = (i==@activecmd)
|
||||
end
|
||||
end
|
||||
cancelsprite = MAX_PARTY_SIZE + ((@multiselect) ? 1 : 0)
|
||||
cancelsprite = Settings::MAX_PARTY_SIZE + ((@multiselect) ? 1 : 0)
|
||||
if Input.trigger?(Input::A) && canswitch==1 && @activecmd!=cancelsprite
|
||||
pbPlayDecisionSE
|
||||
return [1,@activecmd]
|
||||
@@ -722,13 +722,13 @@ class PokemonParty_Scene
|
||||
end
|
||||
|
||||
def pbChangeSelection(key,currentsel)
|
||||
numsprites = MAX_PARTY_SIZE + ((@multiselect) ? 2 : 1)
|
||||
numsprites = Settings::MAX_PARTY_SIZE + ((@multiselect) ? 2 : 1)
|
||||
case key
|
||||
when Input::LEFT
|
||||
begin
|
||||
currentsel -= 1
|
||||
end while currentsel > 0 && currentsel < @party.length && !@party[currentsel]
|
||||
if currentsel >= @party.length && currentsel < MAX_PARTY_SIZE
|
||||
if currentsel >= @party.length && currentsel < Settings::MAX_PARTY_SIZE
|
||||
currentsel = @party.length - 1
|
||||
end
|
||||
currentsel = numsprites - 1 if currentsel < 0
|
||||
@@ -737,12 +737,12 @@ class PokemonParty_Scene
|
||||
currentsel += 1
|
||||
end while currentsel < @party.length && !@party[currentsel]
|
||||
if currentsel == @party.length
|
||||
currentsel = MAX_PARTY_SIZE
|
||||
currentsel = Settings::MAX_PARTY_SIZE
|
||||
elsif currentsel == numsprites
|
||||
currentsel = 0
|
||||
end
|
||||
when Input::UP
|
||||
if currentsel >= MAX_PARTY_SIZE
|
||||
if currentsel >= Settings::MAX_PARTY_SIZE
|
||||
begin
|
||||
currentsel -= 1
|
||||
end while currentsel > 0 && !@party[currentsel]
|
||||
@@ -751,19 +751,19 @@ class PokemonParty_Scene
|
||||
currentsel -= 2
|
||||
end while currentsel > 0 && !@party[currentsel]
|
||||
end
|
||||
if currentsel >= @party.length && currentsel < MAX_PARTY_SIZE
|
||||
if currentsel >= @party.length && currentsel < Settings::MAX_PARTY_SIZE
|
||||
currentsel = @party.length-1
|
||||
end
|
||||
currentsel = numsprites - 1 if currentsel < 0
|
||||
when Input::DOWN
|
||||
if currentsel >= MAX_PARTY_SIZE - 1
|
||||
if currentsel >= Settings::MAX_PARTY_SIZE - 1
|
||||
currentsel += 1
|
||||
else
|
||||
currentsel += 2
|
||||
currentsel = MAX_PARTY_SIZE if currentsel < MAX_PARTY_SIZE && !@party[currentsel]
|
||||
currentsel = Settings::MAX_PARTY_SIZE if currentsel < Settings::MAX_PARTY_SIZE && !@party[currentsel]
|
||||
end
|
||||
if currentsel >= @party.length && currentsel < MAX_PARTY_SIZE
|
||||
currentsel = MAX_PARTY_SIZE
|
||||
if currentsel >= @party.length && currentsel < Settings::MAX_PARTY_SIZE
|
||||
currentsel = Settings::MAX_PARTY_SIZE
|
||||
elsif currentsel >= numsprites
|
||||
currentsel = 0
|
||||
end
|
||||
@@ -774,14 +774,14 @@ class PokemonParty_Scene
|
||||
def pbHardRefresh
|
||||
oldtext = []
|
||||
lastselected = -1
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
oldtext.push(@sprites["pokemon#{i}"].text)
|
||||
lastselected = i if @sprites["pokemon#{i}"].selected
|
||||
@sprites["pokemon#{i}"].dispose
|
||||
end
|
||||
lastselected = @party.length-1 if lastselected>=@party.length
|
||||
lastselected = 0 if lastselected<0
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
if @party[i]
|
||||
@sprites["pokemon#{i}"] = PokemonPartyPanel.new(@party[i],i,@viewport)
|
||||
else
|
||||
@@ -793,7 +793,7 @@ class PokemonParty_Scene
|
||||
end
|
||||
|
||||
def pbRefresh
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
sprite = @sprites["pokemon#{i}"]
|
||||
if sprite
|
||||
if sprite.is_a?(PokemonPartyPanel)
|
||||
@@ -971,7 +971,7 @@ class PokemonPartyScreen
|
||||
positions = [_INTL("FIRST"), _INTL("SECOND"), _INTL("THIRD"), _INTL("FOURTH"),
|
||||
_INTL("FIFTH"), _INTL("SIXTH"), _INTL("SEVENTH"), _INTL("EIGHTH"),
|
||||
_INTL("NINTH"), _INTL("TENTH"), _INTL("ELEVENTH"), _INTL("TWELFTH")]
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
if i < positions.length
|
||||
ordinals.push(positions[i])
|
||||
else
|
||||
@@ -1006,12 +1006,12 @@ class PokemonPartyScreen
|
||||
end
|
||||
@scene.pbAnnotate(annot)
|
||||
if realorder.length==ruleset.number && addedEntry
|
||||
@scene.pbSelect(MAX_PARTY_SIZE)
|
||||
@scene.pbSelect(Settings::MAX_PARTY_SIZE)
|
||||
end
|
||||
@scene.pbSetHelpText(_INTL("Choose Pokémon and confirm."))
|
||||
pkmnid = @scene.pbChoosePokemon
|
||||
addedEntry = false
|
||||
if pkmnid == MAX_PARTY_SIZE # Confirm was chosen
|
||||
if pkmnid == Settings::MAX_PARTY_SIZE # Confirm was chosen
|
||||
ret = []
|
||||
for i in realorder; ret.push(@party[i]); end
|
||||
error = []
|
||||
|
||||
@@ -391,7 +391,7 @@ class PokemonSummary_Scene
|
||||
dexnum = @pokemon.species
|
||||
dexnumshift = false
|
||||
if $PokemonGlobal.pokedexUnlocked[$PokemonGlobal.pokedexUnlocked.length-1]
|
||||
dexnumshift = true if DEXES_WITH_OFFSETS.include?(-1)
|
||||
dexnumshift = true if Settings::DEXES_WITH_OFFSETS.include?(-1)
|
||||
else
|
||||
dexnum = 0
|
||||
for i in 0...$PokemonGlobal.pokedexUnlocked.length-1
|
||||
@@ -399,7 +399,7 @@ class PokemonSummary_Scene
|
||||
num = pbGetRegionalNumber(i,@pokemon.species)
|
||||
next if num<=0
|
||||
dexnum = num
|
||||
dexnumshift = true if DEXES_WITH_OFFSETS.include?(i)
|
||||
dexnumshift = true if Settings::DEXES_WITH_OFFSETS.include?(i)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
@@ -419,7 +419,7 @@ class PokemonBag_Scene
|
||||
elsif Input.trigger?(Input::A) # Start switching the selected item
|
||||
if !@choosing
|
||||
if thispocket.length>1 && itemwindow.index<thispocket.length &&
|
||||
!BAG_POCKET_AUTO_SORT[itemwindow.pocket]
|
||||
!Settings::BAG_POCKET_AUTO_SORT[itemwindow.pocket]
|
||||
itemwindow.sorting = true
|
||||
swapinitialpos = itemwindow.index
|
||||
pbPlayDecisionSE
|
||||
@@ -544,10 +544,10 @@ class PokemonBagScreen
|
||||
qty = @bag.pbQuantity(item)
|
||||
itemplural = itm.name_plural
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(0,BAG_MAX_PER_SLOT)
|
||||
params.setRange(0, Settings::BAG_MAX_PER_SLOT)
|
||||
params.setDefaultValue(qty)
|
||||
newqty = pbMessageChooseNumber(
|
||||
_INTL("Choose new quantity of {1} (max. #{BAG_MAX_PER_SLOT}).",itemplural),params) { @scene.pbUpdate }
|
||||
_INTL("Choose new quantity of {1} (max. #{Settings::BAG_MAX_PER_SLOT}).",itemplural),params) { @scene.pbUpdate }
|
||||
if newqty>qty
|
||||
@bag.pbStoreItem(item,newqty-qty)
|
||||
elsif newqty<qty
|
||||
|
||||
@@ -119,7 +119,7 @@ class PokemonRegionMap_Scene
|
||||
@sprites["map"].setBitmap("Graphics/Pictures/#{@map[1]}")
|
||||
@sprites["map"].x += (Graphics.width-@sprites["map"].bitmap.width)/2
|
||||
@sprites["map"].y += (Graphics.height-@sprites["map"].bitmap.height)/2
|
||||
for hidden in REGION_MAP_EXTRAS
|
||||
for hidden in Settings::REGION_MAP_EXTRAS
|
||||
if hidden[0]==mapindex && ((@wallmap && hidden[5]) ||
|
||||
(!@wallmap && hidden[1]>0 && $game_switches[hidden[1]]))
|
||||
if !@sprites["map2"]
|
||||
|
||||
@@ -323,7 +323,7 @@ class PokemonLoadScreen
|
||||
commands[cmdNewGame = commands.length] = _INTL("New Game")
|
||||
end
|
||||
commands[cmdOption = commands.length] = _INTL("Options")
|
||||
commands[cmdLanguage = commands.length] = _INTL("Language") if LANGUAGES.length>=2
|
||||
commands[cmdLanguage = commands.length] = _INTL("Language") if Settings::LANGUAGES.length>=2
|
||||
commands[cmdDebug = commands.length] = _INTL("Debug") if $DEBUG
|
||||
commands[cmdQuit = commands.length] = _INTL("Quit Game")
|
||||
@scene.pbStartScene(commands,showContinue,trainer,framecount,mapid)
|
||||
@@ -452,7 +452,7 @@ class PokemonLoadScreen
|
||||
pbPlayDecisionSE
|
||||
@scene.pbEndScene
|
||||
$PokemonSystem.language = pbChooseLanguage
|
||||
pbLoadMessages("Data/"+LANGUAGES[$PokemonSystem.language][1])
|
||||
pbLoadMessages("Data/"+Settings::LANGUAGES[$PokemonSystem.language][1])
|
||||
savedata = []
|
||||
if safeExists?(savefile)
|
||||
File.open(savefile,"rb") { |f|
|
||||
|
||||
@@ -19,24 +19,24 @@ class PokemonSystem
|
||||
@textspeed = 1 # Text speed (0=slow, 1=normal, 2=fast)
|
||||
@battlescene = 0 # Battle effects (animations) (0=on, 1=off)
|
||||
@battlestyle = 0 # Battle style (0=switch, 1=set)
|
||||
@frame = 0 # Default window frame (see also $TextFrames)
|
||||
@frame = 0 # Default window frame (see also Settings::MENU_WINDOWSKINS)
|
||||
@textskin = 0 # Speech frame
|
||||
@font = 0 # Font (see also $VersionStyles)
|
||||
@screensize = (SCREEN_SCALE * 2).floor - 1 # 0=half size, 1=full size, 2=full-and-a-half size, 3=double size
|
||||
@language = 0 # Language (see also LANGUAGES in script PokemonSystem)
|
||||
@font = 0 # Font (see also Settings::FONT_OPTIONS)
|
||||
@screensize = (Settings::SCREEN_SCALE * 2).floor - 1 # 0=half size, 1=full size, 2=full-and-a-half size, 3=double size
|
||||
@language = 0 # Language (see also Settings::LANGUAGES in script PokemonSystem)
|
||||
@runstyle = 0 # Run key functionality (0=hold to run, 1=toggle auto-run)
|
||||
@bgmvolume = 100 # Volume of background music and ME
|
||||
@sevolume = 100 # Volume of sound effects
|
||||
@textinput = 0 # Text input mode (0=cursor, 1=keyboard)
|
||||
end
|
||||
|
||||
def textskin; return @textskin || 0; end
|
||||
def language; return @language || 0; end
|
||||
def runstyle; return @runstyle || 0; end
|
||||
def bgmvolume; return @bgmvolume || 100; end
|
||||
def sevolume; return @sevolume || 100; end
|
||||
def textinput; return @textinput || 0; end
|
||||
def tilemap; return MAP_VIEW_MODE; end
|
||||
def textskin; return @textskin || 0; end
|
||||
def language; return @language || 0; end
|
||||
def runstyle; return @runstyle || 0; end
|
||||
def bgmvolume; return @bgmvolume || 100; end
|
||||
def sevolume; return @sevolume || 100; end
|
||||
def textinput; return @textinput || 0; end
|
||||
def tilemap; return Settings::MAP_VIEW_MODE; end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
@@ -364,25 +364,25 @@ class PokemonOption_Scene
|
||||
end
|
||||
}
|
||||
),
|
||||
NumberOption.new(_INTL("Speech Frame"),1,$SpeechFrames.length,
|
||||
NumberOption.new(_INTL("Speech Frame"),1,Settings::SPEECH_WINDOWSKINS.length,
|
||||
proc { $PokemonSystem.textskin },
|
||||
proc { |value|
|
||||
$PokemonSystem.textskin = value
|
||||
MessageConfig.pbSetSpeechFrame("Graphics/Windowskins/" + $SpeechFrames[value])
|
||||
MessageConfig.pbSetSpeechFrame("Graphics/Windowskins/" + Settings::SPEECH_WINDOWSKINS[value])
|
||||
}
|
||||
),
|
||||
NumberOption.new(_INTL("Menu Frame"),1,$TextFrames.length,
|
||||
NumberOption.new(_INTL("Menu Frame"),1,Settings::MENU_WINDOWSKINS.length,
|
||||
proc { $PokemonSystem.frame },
|
||||
proc { |value|
|
||||
$PokemonSystem.frame = value
|
||||
MessageConfig.pbSetSystemFrame("Graphics/Windowskins/" + $TextFrames[value])
|
||||
MessageConfig.pbSetSystemFrame("Graphics/Windowskins/" + Settings::MENU_WINDOWSKINS[value])
|
||||
}
|
||||
),
|
||||
EnumOption.new(_INTL("Font Style"),[_INTL("Em"),_INTL("R/S"),_INTL("FRLG"),_INTL("DP")],
|
||||
proc { $PokemonSystem.font },
|
||||
proc { |value|
|
||||
$PokemonSystem.font = value
|
||||
MessageConfig.pbSetSystemFontName($VersionStyles[value])
|
||||
MessageConfig.pbSetSystemFontName(Settings::FONT_OPTIONS[value])
|
||||
}
|
||||
),
|
||||
EnumOption.new(_INTL("Text Entry"),[_INTL("Cursor"),_INTL("Keyboard")],
|
||||
|
||||
@@ -449,7 +449,7 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
@party = party
|
||||
@boxbitmap = AnimatedBitmap.new("Graphics/Pictures/Storage/overlay_party")
|
||||
@pokemonsprites = []
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@pokemonsprites[i] = nil
|
||||
pokemon = @party[i]
|
||||
if pokemon
|
||||
@@ -465,7 +465,7 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
end
|
||||
|
||||
def dispose
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@pokemonsprites[i].dispose if @pokemonsprites[i]
|
||||
end
|
||||
@boxbitmap.dispose
|
||||
@@ -485,7 +485,7 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
|
||||
def color=(value)
|
||||
super
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
if @pokemonsprites[i] && !@pokemonsprites[i].disposed?
|
||||
@pokemonsprites[i].color = pbSrcOver(@pokemonsprites[i].color,value)
|
||||
end
|
||||
@@ -494,7 +494,7 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
|
||||
def visible=(value)
|
||||
super
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
if @pokemonsprites[i] && !@pokemonsprites[i].disposed?
|
||||
@pokemonsprites[i].visible = value
|
||||
end
|
||||
@@ -535,15 +535,15 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
])
|
||||
xvalues = [] # [18, 90, 18, 90, 18, 90]
|
||||
yvalues = [] # [2, 18, 66, 82, 130, 146]
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
xvalues.push(18 + 72 * (i % 2))
|
||||
yvalues.push(2 + 16 * (i % 2) + 64 * (i / 2))
|
||||
end
|
||||
for j in 0...MAX_PARTY_SIZE
|
||||
for j in 0...Settings::MAX_PARTY_SIZE
|
||||
@pokemonsprites[j] = nil if @pokemonsprites[j] && @pokemonsprites[j].disposed?
|
||||
end
|
||||
@pokemonsprites.compact!
|
||||
for j in 0...MAX_PARTY_SIZE
|
||||
for j in 0...Settings::MAX_PARTY_SIZE
|
||||
sprite = @pokemonsprites[j]
|
||||
if sprite && !sprite.disposed?
|
||||
sprite.viewport = self.viewport
|
||||
@@ -556,7 +556,7 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
|
||||
def update
|
||||
super
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@pokemonsprites[i].update if @pokemonsprites[i] && !@pokemonsprites[i].disposed?
|
||||
end
|
||||
end
|
||||
@@ -773,7 +773,7 @@ class PokemonStorageScene
|
||||
return if selection < 0
|
||||
xvalues = [] # [200, 272, 200, 272, 200, 272, 236]
|
||||
yvalues = [] # [2, 18, 66, 82, 130, 146, 220]
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
xvalues.push(200 + 72 * (i % 2))
|
||||
yvalues.push(2 + 16 * (i % 2) + 64 * (i / 2))
|
||||
end
|
||||
@@ -791,23 +791,23 @@ class PokemonStorageScene
|
||||
case key
|
||||
when Input::LEFT
|
||||
selection -= 1
|
||||
selection = MAX_PARTY_SIZE if selection < 0
|
||||
selection = Settings::MAX_PARTY_SIZE if selection < 0
|
||||
when Input::RIGHT
|
||||
selection += 1
|
||||
selection = 0 if selection > MAX_PARTY_SIZE
|
||||
selection = 0 if selection > Settings::MAX_PARTY_SIZE
|
||||
when Input::UP
|
||||
if selection == MAX_PARTY_SIZE
|
||||
selection = MAX_PARTY_SIZE - 1
|
||||
if selection == Settings::MAX_PARTY_SIZE
|
||||
selection = Settings::MAX_PARTY_SIZE - 1
|
||||
else
|
||||
selection -= 2
|
||||
selection = MAX_PARTY_SIZE if selection < 0
|
||||
selection = Settings::MAX_PARTY_SIZE if selection < 0
|
||||
end
|
||||
when Input::DOWN
|
||||
if selection == MAX_PARTY_SIZE
|
||||
if selection == Settings::MAX_PARTY_SIZE
|
||||
selection = 0
|
||||
else
|
||||
selection += 2
|
||||
selection = MAX_PARTY_SIZE if selection > MAX_PARTY_SIZE
|
||||
selection = Settings::MAX_PARTY_SIZE if selection > Settings::MAX_PARTY_SIZE
|
||||
end
|
||||
end
|
||||
return selection
|
||||
@@ -952,10 +952,10 @@ class PokemonStorageScene
|
||||
@selection = selection
|
||||
return -1
|
||||
elsif Input.trigger?(Input::C)
|
||||
if selection >= 0 && selection < MAX_PARTY_SIZE
|
||||
if selection >= 0 && selection < Settings::MAX_PARTY_SIZE
|
||||
@selection = selection
|
||||
return selection
|
||||
elsif selection == MAX_PARTY_SIZE # Close Box
|
||||
elsif selection == Settings::MAX_PARTY_SIZE # Close Box
|
||||
@selection = selection
|
||||
return (depositing) ? -3 : -1
|
||||
end
|
||||
|
||||
@@ -247,7 +247,7 @@ def pbPokeCenterPC
|
||||
end
|
||||
|
||||
def pbGetStorageCreator
|
||||
creator = pbStorageCreator
|
||||
creator = Settings.storage_creator_name
|
||||
creator = _INTL("Bill") if !creator || creator==""
|
||||
return creator
|
||||
end
|
||||
|
||||
@@ -558,8 +558,8 @@ class PokemonMartScreen
|
||||
end
|
||||
quantity=1
|
||||
else
|
||||
maxafford=(price<=0) ? BAG_MAX_PER_SLOT : @adapter.getMoney/price
|
||||
maxafford=BAG_MAX_PER_SLOT if maxafford>BAG_MAX_PER_SLOT
|
||||
maxafford = (price <= 0) ? Settings::BAG_MAX_PER_SLOT : @adapter.getMoney / price
|
||||
maxafford = Settings::BAG_MAX_PER_SLOT if maxafford > Settings::BAG_MAX_PER_SLOT
|
||||
quantity=@scene.pbChooseNumber(
|
||||
_INTL("{1}? Certainly. How many would you like?",itemname),item,maxafford)
|
||||
next if quantity==0
|
||||
|
||||
Reference in New Issue
Block a user