mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-03-10 02:12:01 +00:00
Moved all settings into module Settings
This commit is contained in:
@@ -449,7 +449,7 @@ DebugMenuCommands.register("additem", {
|
||||
pbListScreenBlock(_INTL("ADD ITEM"), ItemLister.new) { |button, item|
|
||||
if button == Input::C && item
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(1, BAG_MAX_PER_SLOT)
|
||||
params.setRange(1, Settings::BAG_MAX_PER_SLOT)
|
||||
params.setInitialValue(1)
|
||||
params.setCancelValue(0)
|
||||
qty = pbMessageChooseNumber(_INTL("Add how many {1}?",
|
||||
@@ -469,7 +469,7 @@ DebugMenuCommands.register("fillbag", {
|
||||
"description" => _INTL("Add a certain number of every item to the Bag."),
|
||||
"effect" => proc {
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(1, BAG_MAX_PER_SLOT)
|
||||
params.setRange(1, Settings::BAG_MAX_PER_SLOT)
|
||||
params.setInitialValue(1)
|
||||
params.setCancelValue(0)
|
||||
qty = pbMessageChooseNumber(_INTL("Choose the number of items."), params)
|
||||
@@ -613,7 +613,7 @@ DebugMenuCommands.register("fillboxes", {
|
||||
end
|
||||
# Add Pokémon (if form 0)
|
||||
next if f != 0
|
||||
if added >= NUM_STORAGE_BOXES * box_qty
|
||||
if added >= Settings::NUM_STORAGE_BOXES * box_qty
|
||||
completed = false
|
||||
next
|
||||
end
|
||||
@@ -622,7 +622,8 @@ DebugMenuCommands.register("fillboxes", {
|
||||
end
|
||||
pbMessage(_INTL("Storage boxes were filled with one Pokémon of each species."))
|
||||
if !completed
|
||||
pbMessage(_INTL("Note: The number of storage spaces ({1} boxes of {2}) is less than the number of species.", NUM_STORAGE_BOXES, box_qty))
|
||||
pbMessage(_INTL("Note: The number of storage spaces ({1} boxes of {2}) is less than the number of species.",
|
||||
Settings::NUM_STORAGE_BOXES, box_qty))
|
||||
end
|
||||
}
|
||||
})
|
||||
@@ -695,7 +696,7 @@ DebugMenuCommands.register("setmoney", {
|
||||
"description" => _INTL("Edit how much money you have."),
|
||||
"effect" => proc {
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(0, MAX_MONEY)
|
||||
params.setRange(0, Settings::MAX_MONEY)
|
||||
params.setDefaultValue($Trainer.money)
|
||||
$Trainer.money = pbMessageChooseNumber(_INTL("Set the player's money."), params)
|
||||
pbMessage(_INTL("You now have ${1}.", $Trainer.money.to_s_formatted))
|
||||
@@ -708,7 +709,7 @@ DebugMenuCommands.register("setcoins", {
|
||||
"description" => _INTL("Edit how many Game Corner Coins you have."),
|
||||
"effect" => proc {
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(0, MAX_COINS)
|
||||
params.setRange(0, Settings::MAX_COINS)
|
||||
params.setDefaultValue($PokemonGlobal.coins)
|
||||
$PokemonGlobal.coins = pbMessageChooseNumber(_INTL("Set the player's Coin amount."), params)
|
||||
pbMessage(_INTL("You now have {1} Coins.", $PokemonGlobal.coins.to_s_formatted))
|
||||
@@ -746,7 +747,7 @@ DebugMenuCommands.register("dexlists", {
|
||||
loop do
|
||||
dexescmds = []
|
||||
dexescmds.push(_INTL("Have Pokédex: {1}", $Trainer.pokedex ? "[YES]" : "[NO]"))
|
||||
d = pbDexNames
|
||||
d = Settings.pokedex_names
|
||||
for i in 0...d.length
|
||||
name = d[i]
|
||||
name = name[0] if name.is_a?(Array)
|
||||
@@ -816,7 +817,7 @@ DebugMenuCommands.register("renameplayer", {
|
||||
"name" => _INTL("Set Player Name"),
|
||||
"description" => _INTL("Rename the player."),
|
||||
"effect" => proc {
|
||||
trname = pbEnterPlayerName("Your name?", 0, MAX_PLAYER_NAME_SIZE, $Trainer.name)
|
||||
trname = pbEnterPlayerName("Your name?", 0, Settings::MAX_PLAYER_NAME_SIZE, $Trainer.name)
|
||||
if trname == "" && pbConfirmMessage(_INTL("Give yourself a default name?"))
|
||||
trainertype = $Trainer.trainer_type
|
||||
gender = pbGetTrainerTypeGender(trainertype)
|
||||
|
||||
@@ -373,7 +373,7 @@ class SpriteWindow_DebugRoamers < Window_DrawableCommand
|
||||
end
|
||||
|
||||
def roamerCount
|
||||
return ROAMING_SPECIES.length
|
||||
return Settings::ROAMING_SPECIES.length
|
||||
end
|
||||
|
||||
def itemCount
|
||||
@@ -405,7 +405,7 @@ class SpriteWindow_DebugRoamers < Window_DrawableCommand
|
||||
# Advance roaming
|
||||
self.shadowtext(_INTL("[Clear all current roamer locations]"),rect.x,text_y,nameWidth,rect.height)
|
||||
else
|
||||
pkmn = ROAMING_SPECIES[index]
|
||||
pkmn = Settings::ROAMING_SPECIES[index]
|
||||
name = GameData::Species.get(pkmn[0]).name + " (Lv. #{pkmn[1]})"
|
||||
status = ""
|
||||
statuscolor = 0
|
||||
@@ -480,7 +480,7 @@ def pbDebugRoamers
|
||||
if cmdwindow.index<cmdwindow.roamerCount
|
||||
pbPlayDecisionSE
|
||||
# Toggle through roaming, not roaming, defeated
|
||||
pkmn = ROAMING_SPECIES[cmdwindow.index]
|
||||
pkmn = Settings::ROAMING_SPECIES[cmdwindow.index]
|
||||
if pkmn[2]>0 && !$game_switches[pkmn[2]]
|
||||
# not roaming -> roaming
|
||||
$game_switches[pkmn[2]] = true
|
||||
@@ -500,7 +500,7 @@ def pbDebugRoamers
|
||||
end
|
||||
cmdwindow.refresh
|
||||
elsif cmdwindow.index==cmdwindow.itemCount-2 # All roam
|
||||
if ROAMING_SPECIES.length==0
|
||||
if Settings::ROAMING_SPECIES.length==0
|
||||
pbPlayBuzzerSE
|
||||
else
|
||||
pbPlayDecisionSE
|
||||
@@ -509,11 +509,11 @@ def pbDebugRoamers
|
||||
cmdwindow.refresh
|
||||
end
|
||||
else # Clear all roaming locations
|
||||
if ROAMING_SPECIES.length==0
|
||||
if Settings::ROAMING_SPECIES.length==0
|
||||
pbPlayBuzzerSE
|
||||
else
|
||||
pbPlayDecisionSE
|
||||
for i in 0...ROAMING_SPECIES.length
|
||||
for i in 0...Settings::ROAMING_SPECIES.length
|
||||
$PokemonGlobal.roamPosition[i] = nil
|
||||
end
|
||||
$PokemonGlobal.roamedAlready = false
|
||||
@@ -638,7 +638,7 @@ def pbCompileTextUI
|
||||
begin
|
||||
pbCompileText
|
||||
pbMessageDisplay(msgwindow,_INTL("Successfully compiled text and saved it to intl.dat.\1"))
|
||||
pbMessageDisplay(msgwindow,_INTL("To use the file in a game, place the file in the Data folder under a different name, and edit the LANGUAGES array in the Settings script."))
|
||||
pbMessageDisplay(msgwindow,_INTL("To use the file in a game, place the file in the Data folder under a different name, and edit the Settings::LANGUAGES array in the scripts."))
|
||||
rescue RuntimeError
|
||||
pbMessageDisplay(msgwindow,_INTL("Failed to compile text: {1}",$!.message))
|
||||
end
|
||||
|
||||
@@ -918,7 +918,7 @@ PokemonDebugMenuCommands.register("ownership", {
|
||||
when 0 # Make player's
|
||||
pkmn.owner = Pokemon::Owner.new_from_trainer($Trainer)
|
||||
when 1 # Set OT's name
|
||||
pkmn.owner.name = pbEnterPlayerName(_INTL("{1}'s OT's name?", pkmn.name), 1, MAX_PLAYER_NAME_SIZE)
|
||||
pkmn.owner.name = pbEnterPlayerName(_INTL("{1}'s OT's name?", pkmn.name), 1, Settings::MAX_PLAYER_NAME_SIZE)
|
||||
when 2 # Set OT's gender
|
||||
cmd2 = screen.pbShowCommands(_INTL("Set OT's gender."),
|
||||
[_INTL("Male"), _INTL("Female"), _INTL("Unknown")], pkmn.owner.gender)
|
||||
@@ -958,7 +958,7 @@ PokemonDebugMenuCommands.register("setegg", {
|
||||
when 0 # Make egg
|
||||
if !pkmn.egg? && (pbHasEgg?(pkmn.species) ||
|
||||
screen.pbConfirm(_INTL("{1} cannot legally be an egg. Make egg anyway?", pkmn.speciesName)))
|
||||
pkmn.level = EGG_LEVEL
|
||||
pkmn.level = Settings::EGG_LEVEL
|
||||
pkmn.calcStats
|
||||
pkmn.name = _INTL("Egg")
|
||||
pkmn.steps_to_hatch = pkmn.species_data.hatch_steps
|
||||
|
||||
@@ -967,7 +967,7 @@ end
|
||||
# Main
|
||||
################################################################################
|
||||
def animationEditorMain(animation)
|
||||
viewport=Viewport.new(0, 0, SCREEN_WIDTH + 288, SCREEN_HEIGHT + 288)
|
||||
viewport=Viewport.new(0, 0, Settings::SCREEN_WIDTH + 288, Settings::SCREEN_HEIGHT + 288)
|
||||
viewport.z=99999
|
||||
# Canvas
|
||||
canvas=AnimationCanvas.new(animation[animation.selected],viewport)
|
||||
@@ -1184,10 +1184,10 @@ def pbAnimationEditor
|
||||
animation=PBAnimations.new
|
||||
animation[0].graphic=""
|
||||
end
|
||||
Graphics.resize_screen(SCREEN_WIDTH + 288, SCREEN_HEIGHT + 288)
|
||||
Graphics.resize_screen(Settings::SCREEN_WIDTH + 288, Settings::SCREEN_HEIGHT + 288)
|
||||
pbSetResizeFactor(1)
|
||||
animationEditorMain(animation)
|
||||
Graphics.resize_screen(SCREEN_WIDTH, SCREEN_HEIGHT)
|
||||
Graphics.resize_screen(Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT)
|
||||
pbSetResizeFactor($PokemonSystem.screensize)
|
||||
$game_map.autoplay if $game_map
|
||||
end
|
||||
|
||||
@@ -480,7 +480,7 @@ module TrainerBattleProperty
|
||||
[_INTL("Version"), LimitProperty.new(9999), _INTL("Number used to distinguish Trainers with the same name and trainer type.")],
|
||||
[_INTL("Lose Text"), StringProperty, _INTL("Message shown in battle when the Trainer is defeated.")]
|
||||
]
|
||||
MAX_PARTY_SIZE.times do |i|
|
||||
Settings::MAX_PARTY_SIZE.times do |i|
|
||||
properties.push([_INTL("Pokémon {1}", i + 1), TrainerPokemonProperty, _INTL("A Pokémon owned by the Trainer.")])
|
||||
end
|
||||
NUM_ITEMS.times do |i|
|
||||
@@ -524,7 +524,7 @@ def pbTrainerBattleEditor
|
||||
tr_data.version,
|
||||
tr_data.real_lose_text
|
||||
]
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
data.push(tr_data.pokemon[i])
|
||||
end
|
||||
for i in 0...TrainerBattleProperty::NUM_ITEMS
|
||||
@@ -535,11 +535,11 @@ def pbTrainerBattleEditor
|
||||
break if !data
|
||||
party = []
|
||||
items = []
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
party.push(data[4 + i]) if data[4 + i] && data[4 + i][:species]
|
||||
end
|
||||
for i in 0...TrainerBattleProperty::NUM_ITEMS
|
||||
items.push(data[4 + MAX_PARTY_SIZE + i]) if data[4 + MAX_PARTY_SIZE + i]
|
||||
items.push(data[4 + Settings::MAX_PARTY_SIZE + i]) if data[4 + Settings::MAX_PARTY_SIZE + i]
|
||||
end
|
||||
if !data[0]
|
||||
pbMessage(_INTL("Can't save. No trainer type was chosen."))
|
||||
|
||||
@@ -791,7 +791,7 @@ end
|
||||
|
||||
module PocketProperty
|
||||
def self.set(_settingname, oldsetting)
|
||||
commands = pbPocketNames.clone
|
||||
commands = Settings.bag_pocket_names.clone
|
||||
commands.shift
|
||||
cmd = pbMessage(_INTL("Choose a pocket for this item."), commands, -1)
|
||||
return (cmd >= 0) ? cmd + 1 : oldsetting
|
||||
@@ -803,7 +803,7 @@ module PocketProperty
|
||||
|
||||
def self.format(value)
|
||||
return _INTL("No Pocket") if value == 0
|
||||
return (value) ? pbPocketNames[value] : value.inspect
|
||||
return (value) ? Settings.bag_pocket_names[value] : value.inspect
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user