mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Fixed some bad usage of sprintf, cleaned up some translatable messages
This commit is contained in:
@@ -317,7 +317,7 @@ end
|
||||
# NOTE: load_data checks anything added in MKXP's RTP setting, and matching
|
||||
# mount points added through System.mount.
|
||||
def pbRgssOpen(file, mode = nil)
|
||||
# File.open("debug.txt","ab") { |fw| fw.write([file,mode,Time.now.to_f].inspect+"\r\n") }
|
||||
# File.open("debug.txt", "ab") { |fw| fw.write([file, mode, Time.now.to_f].inspect + "\r\n") }
|
||||
if !safeExists?("./Game.rgssad")
|
||||
if block_given?
|
||||
File.open(file, mode) { |f| yield f }
|
||||
|
||||
@@ -284,8 +284,8 @@ module Translator
|
||||
f.write(0xEF.chr)
|
||||
f.write(0xBB.chr)
|
||||
f.write(0xBF.chr)
|
||||
f.write("# To localize this text for a particular language, please\r\n")
|
||||
f.write("# translate every second line of this file.\r\n")
|
||||
f.write("# To localize this text for a particular language, please" + "\r\n")
|
||||
f.write("# translate every second line of this file." + "\r\n")
|
||||
f.write("\#-------------------------------\r\n") if with_line
|
||||
end
|
||||
# Extract the text
|
||||
|
||||
@@ -104,24 +104,24 @@ class Battle::Scene
|
||||
messageFilename = @battle.backdrop
|
||||
if time
|
||||
trialName = sprintf("%s_%s", backdropFilename, time)
|
||||
if pbResolveBitmap(sprintf("Graphics/Battlebacks/" + trialName + "_bg"))
|
||||
if pbResolveBitmap(sprintf("Graphics/Battlebacks/%s_bg", trialName))
|
||||
backdropFilename = trialName
|
||||
end
|
||||
trialName = sprintf("%s_%s", baseFilename, time)
|
||||
if pbResolveBitmap(sprintf("Graphics/Battlebacks/" + trialName + "_base0"))
|
||||
if pbResolveBitmap(sprintf("Graphics/Battlebacks/%s_base0", trialName))
|
||||
baseFilename = trialName
|
||||
end
|
||||
trialName = sprintf("%s_%s", messageFilename, time)
|
||||
if pbResolveBitmap(sprintf("Graphics/Battlebacks/" + trialName + "_message"))
|
||||
if pbResolveBitmap(sprintf("Graphics/Battlebacks/%s_message", trialName))
|
||||
messageFilename = trialName
|
||||
end
|
||||
end
|
||||
if !pbResolveBitmap(sprintf("Graphics/Battlebacks/" + baseFilename + "_base0")) &&
|
||||
if !pbResolveBitmap(sprintf("Graphics/Battlebacks/%s_base0", baseFilename)) &&
|
||||
@battle.backdropBase
|
||||
baseFilename = @battle.backdropBase
|
||||
if time
|
||||
trialName = sprintf("%s_%s", baseFilename, time)
|
||||
if pbResolveBitmap(sprintf("Graphics/Battlebacks/" + trialName + "_base0"))
|
||||
if pbResolveBitmap(sprintf("Graphics/Battlebacks/%s_base0", trialName))
|
||||
baseFilename = trialName
|
||||
end
|
||||
end
|
||||
|
||||
@@ -241,9 +241,9 @@ class Battle::Scene
|
||||
[_INTL("Mind"), 144, 54, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[_INTL("Skill"), 144, 86, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[_INTL("Body"), 144, 118, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[sprintf("%d", total1), 64, 166, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[total1.to_s, 64, 166, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[_INTL("Judgment"), 144, 166, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[sprintf("%d", total2), 224, 166, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)]
|
||||
[total2.to_s, 224, 166, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)]
|
||||
]
|
||||
pbDrawTextPositions(window.contents, textpos)
|
||||
images = []
|
||||
|
||||
@@ -88,9 +88,11 @@ def pbStartOver(gameover = false)
|
||||
$player.heal_party
|
||||
if $PokemonGlobal.pokecenterMapId && $PokemonGlobal.pokecenterMapId >= 0
|
||||
if gameover
|
||||
pbMessage(_INTL("\\w[]\\wm\\c[8]\\l[3]After the unfortunate defeat, you scurry back to a Pokémon Center."))
|
||||
pbMessage("\\w[]\\wm\\c[8]\\l[3]" +
|
||||
_INTL("After the unfortunate defeat, you scurry back to a Pokémon Center."))
|
||||
else
|
||||
pbMessage(_INTL("\\w[]\\wm\\c[8]\\l[3]You scurry back to a Pokémon Center, protecting your exhausted Pokémon from any further harm..."))
|
||||
pbMessage("\\w[]\\wm\\c[8]\\l[3]" +
|
||||
_INTL("You scurry back to a Pokémon Center, protecting your exhausted Pokémon from any further harm..."))
|
||||
end
|
||||
pbCancelVehicles
|
||||
Followers.clear
|
||||
@@ -113,9 +115,11 @@ def pbStartOver(gameover = false)
|
||||
return
|
||||
end
|
||||
if gameover
|
||||
pbMessage(_INTL("\\w[]\\wm\\c[8]\\l[3]After the unfortunate defeat, you scurry back home."))
|
||||
pbMessage("\\w[]\\wm\\c[8]\\l[3]" +
|
||||
_INTL("After the unfortunate defeat, you scurry back home."))
|
||||
else
|
||||
pbMessage(_INTL("\\w[]\\wm\\c[8]\\l[3]You scurry back home, protecting your exhausted Pokémon from any further harm..."))
|
||||
pbMessage("\\w[]\\wm\\c[8]\\l[3]" +
|
||||
_INTL("You scurry back home, protecting your exhausted Pokémon from any further harm..."))
|
||||
end
|
||||
if homedata
|
||||
pbCancelVehicles
|
||||
|
||||
@@ -56,7 +56,7 @@ def pbFishing(hasEncounter, rodType = 1)
|
||||
if hasEncounter && rand(100) < biteChance
|
||||
$scene.spriteset.addUserAnimation(Settings::EXCLAMATION_ANIMATION_ID, $game_player.x, $game_player.y, true, 3)
|
||||
frames = Graphics.frame_rate - rand(Graphics.frame_rate / 2) # 0.5-1 second
|
||||
if !pbWaitForInput(msgWindow, message + _INTL("\r\nOh! A bite!"), frames)
|
||||
if !pbWaitForInput(msgWindow, message + "\r\n" + _INTL("Oh! A bite!"), frames)
|
||||
pbFishingEnd { pbMessageDisplay(msgWindow, _INTL("The Pokémon got away...")) }
|
||||
break
|
||||
end
|
||||
|
||||
@@ -591,7 +591,7 @@ def pbLearnMove(pkmn, move, ignore_if_known = false, by_machine = false, &block)
|
||||
return false
|
||||
elsif pkmn.numMoves < Pokemon::MAX_MOVES
|
||||
pkmn.learn_move(move)
|
||||
pbMessage(_INTL("\\se[]{1} learned {2}!\\se[Pkmn move learnt]", pkmn_name, move_name), &block)
|
||||
pbMessage("\\se[]" + _INTL("{1} learned {2}!\\se[Pkmn move learnt]", pkmn_name, move_name), &block)
|
||||
return true
|
||||
end
|
||||
pbMessage(_INTL("{1} wants to learn {2}, but it already knows {3} moves.\1",
|
||||
@@ -608,7 +608,7 @@ def pbLearnMove(pkmn, move, ignore_if_known = false, by_machine = false, &block)
|
||||
end
|
||||
pbMessage(_INTL("1, 2, and...\\wt[16] ...\\wt[16] ...\\wt[16] Ta-da!\\se[Battle ball drop]\1"), &block)
|
||||
pbMessage(_INTL("{1} forgot how to use {2}.\\nAnd...\1", pkmn_name, old_move_name), &block)
|
||||
pbMessage(_INTL("\\se[]{1} learned {2}!\\se[Pkmn move learnt]", pkmn_name, move_name), &block)
|
||||
pbMessage("\\se[]" + _INTL("{1} learned {2}!\\se[Pkmn move learnt]", pkmn_name, move_name), &block)
|
||||
pkmn.changeHappiness("machine") if by_machine
|
||||
return true
|
||||
elsif pbConfirmMessage(_INTL("Give up on learning {1}?", move_name), &block)
|
||||
|
||||
@@ -255,7 +255,7 @@ MultipleForms.register(:ROTOM, {
|
||||
pkmn.moves[old_move_index].id = new_move_id
|
||||
new_move_name = pkmn.moves[old_move_index].name
|
||||
pbMessage(_INTL("{1} forgot {2}...\1", pkmn.name, old_move_name))
|
||||
pbMessage(_INTL("\\se[]{1} learned {2}!\\se[Pkmn move learnt]\1", pkmn.name, new_move_name))
|
||||
pbMessage("\\se[]" + _INTL("{1} learned {2}!\\se[Pkmn move learnt]\1", pkmn.name, new_move_name))
|
||||
end
|
||||
elsif !new_move_id.nil?
|
||||
# Just learn the new move
|
||||
|
||||
@@ -99,7 +99,7 @@ class PokemonEggHatch_Scene
|
||||
pbBGMStop
|
||||
pbMEPlay("Evolution success")
|
||||
@pokemon.name = nil
|
||||
pbMessage(_INTL("\\se[]{1} hatched from the Egg!\\wt[80]", @pokemon.name)) { update }
|
||||
pbMessage("\\se[]" + _INTL("{1} hatched from the Egg!\\wt[80]", @pokemon.name)) { update }
|
||||
# Record the Pokémon's species as owned in the Pokédex
|
||||
was_owned = $player.owned?(@pokemon.species)
|
||||
$player.pokedex.register(@pokemon)
|
||||
|
||||
@@ -591,7 +591,7 @@ class PokemonEvolutionScene
|
||||
pbMEPlay("Evolution success")
|
||||
newspeciesname = GameData::Species.get(@newspecies).name
|
||||
pbMessageDisplay(@sprites["msgwindow"],
|
||||
_INTL("\\se[]Congratulations! Your {1} evolved into {2}!\\wt[80]",
|
||||
"\\se[]" + _INTL("Congratulations! Your {1} evolved into {2}!\\wt[80]",
|
||||
@pokemon.name, newspeciesname)) { pbUpdate }
|
||||
@sprites["msgwindow"].text = ""
|
||||
# Check for consumed item and check if Pokémon should be duplicated
|
||||
|
||||
@@ -18,9 +18,9 @@ class Window_DexesList < Window_CommandPokemon
|
||||
super(index, count, rect)
|
||||
if index >= 0 && index < @commands2.length
|
||||
pbDrawShadowText(self.contents, rect.x + 254, rect.y, 64, rect.height,
|
||||
sprintf("%d", @commands2[index][0]), self.baseColor, self.shadowColor, 1)
|
||||
@commands2[index][0].to_s, self.baseColor, self.shadowColor, 1)
|
||||
pbDrawShadowText(self.contents, rect.x + 350, rect.y, 64, rect.height,
|
||||
sprintf("%d", @commands2[index][1]), self.baseColor, self.shadowColor, 1)
|
||||
@commands2[index][1].to_s, self.baseColor, self.shadowColor, 1)
|
||||
allseen = (@commands2[index][0] >= @commands2[index][2])
|
||||
allown = (@commands2[index][1] >= @commands2[index][2])
|
||||
pbDrawImagePositions(
|
||||
|
||||
@@ -376,7 +376,7 @@ class PokemonPokedexInfo_Scene
|
||||
if points.length == 0
|
||||
pbDrawImagePositions(
|
||||
overlay,
|
||||
[[sprintf("Graphics/UI/Pokedex/overlay_areanone"), 108, 188]]
|
||||
[["Graphics/UI/Pokedex/overlay_areanone", 108, 188]]
|
||||
)
|
||||
textpos.push([_INTL("Area unknown"), Graphics.width / 2, (Graphics.height / 2) + 6, 2, base, shadow])
|
||||
end
|
||||
|
||||
@@ -325,10 +325,10 @@ class PokemonSummary_Scene
|
||||
end
|
||||
# Show Pokérus cured icon
|
||||
if @pokemon.pokerusStage == 2
|
||||
imagepos.push([sprintf("Graphics/UI/Summary/icon_pokerus"), 176, 100])
|
||||
imagepos.push(["Graphics/UI/Summary/icon_pokerus", 176, 100])
|
||||
end
|
||||
# Show shininess star
|
||||
imagepos.push([sprintf("Graphics/UI/shiny"), 2, 134]) if @pokemon.shiny?
|
||||
imagepos.push(["Graphics/UI/shiny", 2, 134]) if @pokemon.shiny?
|
||||
# Draw all images
|
||||
pbDrawImagePositions(overlay, imagepos)
|
||||
# Write various bits of text
|
||||
@@ -640,15 +640,15 @@ class PokemonSummary_Scene
|
||||
[_INTL("HP"), 292, 82, 2, base, statshadows[:HP]],
|
||||
[sprintf("%d/%d", @pokemon.hp, @pokemon.totalhp), 462, 82, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[_INTL("Attack"), 248, 126, 0, base, statshadows[:ATTACK]],
|
||||
[sprintf("%d", @pokemon.attack), 456, 126, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[@pokemon.attack.to_s, 456, 126, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[_INTL("Defense"), 248, 158, 0, base, statshadows[:DEFENSE]],
|
||||
[sprintf("%d", @pokemon.defense), 456, 158, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[@pokemon.defense.to_s, 456, 158, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[_INTL("Sp. Atk"), 248, 190, 0, base, statshadows[:SPECIAL_ATTACK]],
|
||||
[sprintf("%d", @pokemon.spatk), 456, 190, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[@pokemon.spatk.to_s, 456, 190, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[_INTL("Sp. Def"), 248, 222, 0, base, statshadows[:SPECIAL_DEFENSE]],
|
||||
[sprintf("%d", @pokemon.spdef), 456, 222, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[@pokemon.spdef.to_s, 456, 222, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[_INTL("Speed"), 248, 254, 0, base, statshadows[:SPEED]],
|
||||
[sprintf("%d", @pokemon.speed), 456, 254, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[@pokemon.speed.to_s, 456, 254, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[_INTL("Ability"), 224, 290, 0, base, shadow]
|
||||
]
|
||||
# Draw ability name and description
|
||||
|
||||
@@ -258,13 +258,13 @@ class PokemonBag_Scene
|
||||
|
||||
def pbRefresh
|
||||
# Set the background image
|
||||
@sprites["background"].setBitmap(sprintf("Graphics/UI/Bag/bg_#{@bag.last_viewed_pocket}"))
|
||||
@sprites["background"].setBitmap(sprintf("Graphics/UI/Bag/bg_%d", @bag.last_viewed_pocket))
|
||||
# Set the bag sprite
|
||||
fbagexists = pbResolveBitmap(sprintf("Graphics/UI/Bag/bag_#{@bag.last_viewed_pocket}_f"))
|
||||
fbagexists = pbResolveBitmap(sprintf("Graphics/UI/Bag/bag_%d_f", @bag.last_viewed_pocket))
|
||||
if $player.female? && fbagexists
|
||||
@sprites["bagsprite"].setBitmap("Graphics/UI/Bag/bag_#{@bag.last_viewed_pocket}_f")
|
||||
@sprites["bagsprite"].setBitmap(sprintf("Graphics/UI/Bag/bag_%d_f", @bag.last_viewed_pocket"))
|
||||
else
|
||||
@sprites["bagsprite"].setBitmap("Graphics/UI/Bag/bag_#{@bag.last_viewed_pocket}")
|
||||
@sprites["bagsprite"].setBitmap(sprintf("Graphics/UI/Bag/bag_%d", @bag.last_viewed_pocket))
|
||||
end
|
||||
# Draw the pocket icons
|
||||
@sprites["pocketicon"].bitmap.clear
|
||||
|
||||
@@ -14,7 +14,7 @@ class PokegearButton < Sprite
|
||||
@image = command[0]
|
||||
@name = command[1]
|
||||
@selected = false
|
||||
if $player.female? && pbResolveBitmap(sprintf("Graphics/UI/Pokegear/icon_button_f"))
|
||||
if $player.female? && pbResolveBitmap("Graphics/UI/Pokegear/icon_button_f")
|
||||
@button = AnimatedBitmap.new("Graphics/UI/Pokegear/icon_button_f")
|
||||
else
|
||||
@button = AnimatedBitmap.new("Graphics/UI/Pokegear/icon_button")
|
||||
@@ -49,7 +49,7 @@ class PokegearButton < Sprite
|
||||
]
|
||||
pbDrawTextPositions(self.bitmap, textpos)
|
||||
imagepos = [
|
||||
[sprintf("Graphics/UI/Pokegear/icon_" + @image), 18, 10]
|
||||
[sprintf("Graphics/UI/Pokegear/icon_%s", @image), 18, 10]
|
||||
]
|
||||
pbDrawImagePositions(self.bitmap, imagepos)
|
||||
end
|
||||
@@ -73,7 +73,7 @@ class PokemonPokegear_Scene
|
||||
@viewport.z = 99999
|
||||
@sprites = {}
|
||||
@sprites["background"] = IconSprite.new(0, 0, @viewport)
|
||||
if $player.female? && pbResolveBitmap(sprintf("Graphics/UI/Pokegear/bg_f"))
|
||||
if $player.female? && pbResolveBitmap("Graphics/UI/Pokegear/bg_f")
|
||||
@sprites["background"].setBitmap("Graphics/UI/Pokegear/bg_f")
|
||||
else
|
||||
@sprites["background"].setBitmap("Graphics/UI/Pokegear/bg")
|
||||
|
||||
@@ -10,13 +10,13 @@ class PokemonTrainerCard_Scene
|
||||
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||
@viewport.z = 99999
|
||||
@sprites = {}
|
||||
background = pbResolveBitmap(sprintf("Graphics/UI/Trainer Card/bg_f"))
|
||||
background = pbResolveBitmap("Graphics/UI/Trainer Card/bg_f")
|
||||
if $player.female? && background
|
||||
addBackgroundPlane(@sprites, "bg", "Trainer Card/bg_f", @viewport)
|
||||
else
|
||||
addBackgroundPlane(@sprites, "bg", "Trainer Card/bg", @viewport)
|
||||
end
|
||||
cardexists = pbResolveBitmap(sprintf("Graphics/UI/Trainer Card/card_f"))
|
||||
cardexists = pbResolveBitmap("Graphics/UI/Trainer Card/card_f")
|
||||
@sprites["card"] = IconSprite.new(0, 0, @viewport)
|
||||
if $player.female? && cardexists
|
||||
@sprites["card"].setBitmap("Graphics/UI/Trainer Card/card_f")
|
||||
|
||||
@@ -15,9 +15,10 @@ def pbEmergencySave
|
||||
end
|
||||
end
|
||||
if Game.save
|
||||
pbMessage(_INTL("\\se[]The game was saved.\\me[GUI save game] The previous save file has been backed up.\\wtnp[30]"))
|
||||
pbMessage("\\se[]" +
|
||||
_INTL("The game was saved.\\me[GUI save game] The previous save file has been backed up.\\wtnp[30]"))
|
||||
else
|
||||
pbMessage(_INTL("\\se[]Save failed.\\wtnp[30]"))
|
||||
pbMessage("\\se[]" + _INTL("Save failed.\\wtnp[30]"))
|
||||
end
|
||||
$scene = oldscene
|
||||
end
|
||||
@@ -98,10 +99,10 @@ class PokemonSaveScreen
|
||||
$game_temp.begun_new_game = false
|
||||
pbSEPlay("GUI save choice")
|
||||
if Game.save
|
||||
pbMessage(_INTL("\\se[]{1} saved the game.\\me[GUI save game]\\wtnp[30]", $player.name))
|
||||
pbMessage("\\se[]" +_INTL("{1} saved the game.\\me[GUI save game]\\wtnp[30]", $player.name))
|
||||
ret = true
|
||||
else
|
||||
pbMessage(_INTL("\\se[]Save failed.\\wtnp[30]"))
|
||||
pbMessage("\\se[]" +_INTL("Save failed.\\wtnp[30]"))
|
||||
ret = false
|
||||
end
|
||||
else
|
||||
|
||||
@@ -230,7 +230,7 @@ class Window_PokemonOption < Window_DrawableCommand
|
||||
rect.y - 8 + (rect.height / 2),
|
||||
8, 16, SEL_VALUE_BASE_COLOR
|
||||
)
|
||||
value = sprintf("%d", @options[index].lowest_value + self[index])
|
||||
value = (@options[index].lowest_value + self[index]).to_s
|
||||
xpos += (rect.width - rect.x - optionwidth) - self.contents.text_size(value).width
|
||||
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
||||
SEL_VALUE_BASE_COLOR, SEL_VALUE_SHADOW_COLOR)
|
||||
|
||||
@@ -89,7 +89,7 @@ class MoveRelearner_Scene
|
||||
accuracy = selMoveData.display_accuracy(@pokemon)
|
||||
textpos.push([_INTL("CATEGORY"), 272, 120, 0, Color.new(248, 248, 248), Color.black])
|
||||
textpos.push([_INTL("POWER"), 272, 152, 0, Color.new(248, 248, 248), Color.black])
|
||||
textpos.push([power <= 1 ? power == 1 ? "???" : "---" : sprintf("%d", power),
|
||||
textpos.push([power <= 1 ? power == 1 ? "???" : "---" : power.to_s,
|
||||
468, 152, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)])
|
||||
textpos.push([_INTL("ACCURACY"), 272, 184, 0, Color.new(248, 248, 248), Color.black])
|
||||
textpos.push([accuracy == 0 ? "---" : "#{accuracy}%",
|
||||
|
||||
@@ -154,7 +154,7 @@ def pbManageMysteryGifts
|
||||
command = 0
|
||||
loop do
|
||||
commands = pbRefreshMGCommands(master, online)
|
||||
command = pbMessage(_INTL("\\ts[]Manage Mystery Gifts (X=online)."), commands, -1, nil, command)
|
||||
command = pbMessage("\\ts[]" + _INTL("Manage Mystery Gifts (X=online)."), commands, -1, nil, command)
|
||||
# Gift chosen
|
||||
if command == -1 || command == commands.length - 1 # Cancel
|
||||
break
|
||||
|
||||
@@ -376,7 +376,7 @@ class PokemonEntryScene2
|
||||
# Create bitmaps
|
||||
@bitmaps = []
|
||||
@@Characters.length.times do |i|
|
||||
@bitmaps[i] = AnimatedBitmap.new(sprintf("Graphics/UI/Naming/overlay_tab_#{i + 1}"))
|
||||
@bitmaps[i] = AnimatedBitmap.new(sprintf("Graphics/UI/Naming/overlay_tab_%d", i + 1))
|
||||
b = @bitmaps[i].bitmap.clone
|
||||
pbSetSystemFont(b)
|
||||
textPos = []
|
||||
|
||||
@@ -183,10 +183,10 @@ class SlotMachineScene
|
||||
Input.update
|
||||
update
|
||||
@sprites["window2"].bitmap&.clear
|
||||
@sprites["window1"].setBitmap(sprintf("Graphics/UI/Slot Machine/win"))
|
||||
@sprites["window1"].setBitmap("Graphics/UI/Slot Machine/win")
|
||||
@sprites["window1"].src_rect.set(152 * ((frame / timePerFrame) % 4), 0, 152, 208)
|
||||
if bonus > 0
|
||||
@sprites["window2"].setBitmap(sprintf("Graphics/UI/Slot Machine/bonus"))
|
||||
@sprites["window2"].setBitmap("Graphics/UI/Slot Machine/bonus")
|
||||
@sprites["window2"].src_rect.set(152 * (bonus - 1), 0, 152, 208)
|
||||
end
|
||||
@sprites["light1"].visible = true
|
||||
@@ -231,7 +231,7 @@ class SlotMachineScene
|
||||
Input.update
|
||||
update
|
||||
@sprites["window2"].bitmap&.clear
|
||||
@sprites["window1"].setBitmap(sprintf("Graphics/UI/Slot Machine/lose"))
|
||||
@sprites["window1"].setBitmap("Graphics/UI/Slot Machine/lose")
|
||||
@sprites["window1"].src_rect.set(152 * ((frame / timePerFrame) % 2), 0, 152, 208)
|
||||
frame += 1
|
||||
end
|
||||
@@ -249,7 +249,7 @@ class SlotMachineScene
|
||||
@sprites["reel3"] = SlotMachineReel.new(224, 112, difficulty)
|
||||
(1..3).each do |i|
|
||||
@sprites["button#{i}"] = IconSprite.new(68 + (80 * (i - 1)), 260, @viewport)
|
||||
@sprites["button#{i}"].setBitmap(sprintf("Graphics/UI/Slot Machine/button"))
|
||||
@sprites["button#{i}"].setBitmap("Graphics/UI/Slot Machine/button")
|
||||
@sprites["button#{i}"].visible = false
|
||||
end
|
||||
(1..5).each do |i|
|
||||
@@ -260,14 +260,14 @@ class SlotMachineScene
|
||||
@sprites["row#{i}"].visible = false
|
||||
end
|
||||
@sprites["light1"] = IconSprite.new(16, 32, @viewport)
|
||||
@sprites["light1"].setBitmap(sprintf("Graphics/UI/Slot Machine/lights"))
|
||||
@sprites["light1"].setBitmap("Graphics/UI/Slot Machine/lights")
|
||||
@sprites["light1"].visible = false
|
||||
@sprites["light2"] = IconSprite.new(240, 32, @viewport)
|
||||
@sprites["light2"].setBitmap(sprintf("Graphics/UI/Slot Machine/lights"))
|
||||
@sprites["light2"].setBitmap("Graphics/UI/Slot Machine/lights")
|
||||
@sprites["light2"].mirror = true
|
||||
@sprites["light2"].visible = false
|
||||
@sprites["window1"] = IconSprite.new(358, 96, @viewport)
|
||||
@sprites["window1"].setBitmap(sprintf("Graphics/UI/Slot Machine/insert"))
|
||||
@sprites["window1"].setBitmap("Graphics/UI/Slot Machine/insert")
|
||||
@sprites["window1"].src_rect.set(0, 0, 152, 208)
|
||||
@sprites["window2"] = IconSprite.new(358, 96, @viewport)
|
||||
@sprites["credit"] = SlotMachineScore.new(360, 66, $player.coins)
|
||||
@@ -294,7 +294,7 @@ class SlotMachineScene
|
||||
pbMessage(_INTL("You've run out of Coins.\nGame over!"))
|
||||
break
|
||||
elsif @gameRunning # Reels are spinning
|
||||
@sprites["window1"].setBitmap(sprintf("Graphics/UI/Slot Machine/stop"))
|
||||
@sprites["window1"].setBitmap("Graphics/UI/Slot Machine/stop")
|
||||
@sprites["window1"].src_rect.set(152 * ((frame / spinFrameTime) % 4), 0, 152, 208)
|
||||
if Input.trigger?(Input::USE)
|
||||
pbSEPlay("Slots stop")
|
||||
@@ -324,10 +324,10 @@ class SlotMachineScene
|
||||
end
|
||||
@gameEnd = false
|
||||
else # Awaiting coins for the next spin
|
||||
@sprites["window1"].setBitmap(sprintf("Graphics/UI/Slot Machine/insert"))
|
||||
@sprites["window1"].setBitmap("Graphics/UI/Slot Machine/insert")
|
||||
@sprites["window1"].src_rect.set(152 * ((frame / insertFrameTime) % 2), 0, 152, 208)
|
||||
if @wager > 0
|
||||
@sprites["window2"].setBitmap(sprintf("Graphics/UI/Slot Machine/press"))
|
||||
@sprites["window2"].setBitmap("Graphics/UI/Slot Machine/press")
|
||||
@sprites["window2"].src_rect.set(152 * ((frame / insertFrameTime) % 2), 0, 152, 208)
|
||||
end
|
||||
if Input.trigger?(Input::DOWN) && @wager < 3 && @sprites["credit"].score > 0
|
||||
|
||||
@@ -250,7 +250,7 @@ class MiningGameScene
|
||||
@sprites["crack"] = MiningGameCounter.new(0, 4)
|
||||
@sprites["cursor"] = MiningGameCursor.new(58, 0) # central position, pick
|
||||
@sprites["tool"] = IconSprite.new(434, 254, @viewport)
|
||||
@sprites["tool"].setBitmap(sprintf("Graphics/UI/Mining/toolicons"))
|
||||
@sprites["tool"].setBitmap("Graphics/UI/Mining/toolicons")
|
||||
@sprites["tool"].src_rect.set(0, 0, 68, 100)
|
||||
update
|
||||
pbFadeInAndShow(@sprites)
|
||||
|
||||
@@ -1049,7 +1049,7 @@ def pbRegionalDexEditor(dex)
|
||||
end
|
||||
when 0
|
||||
if cmd[1] >= 0 # Edit entry
|
||||
case pbMessage(_INTL("\\ts[]Do what with this entry?"),
|
||||
case pbMessage("\\ts[]" + _INTL("Do what with this entry?"),
|
||||
[_INTL("Change species"), _INTL("Clear"),
|
||||
_INTL("Insert entry"), _INTL("Delete entry"),
|
||||
_INTL("Cancel")], 5)
|
||||
@@ -1166,7 +1166,7 @@ def pbRegionalDexEditorMain
|
||||
refresh_list = true
|
||||
end
|
||||
elsif cmd[1] > 0 # Edit a Dex
|
||||
case pbMessage(_INTL("\\ts[]Do what with this Dex?"),
|
||||
case pbMessage("\\ts[]" + _INTL("Do what with this Dex?"),
|
||||
[_INTL("Edit"), _INTL("Copy"), _INTL("Delete"), _INTL("Cancel")], 4)
|
||||
when 0 # Edit
|
||||
dex_lists[cmd[1] - 1] = pbRegionalDexEditor(dex_lists[cmd[1] - 1])
|
||||
|
||||
@@ -212,7 +212,7 @@ class PokemonTilesetScene
|
||||
cmds.push("#{tag.id_number}: #{tag.real_name}")
|
||||
ids.push(tag.id_number)
|
||||
end
|
||||
val = pbMessage(_INTL("\\l[1]\\ts[]Set the terrain tag."), cmds, -1, nil, old_idx)
|
||||
val = pbMessage("\\l[1]\\ts[]" + _INTL("Set the terrain tag."), cmds, -1, nil, old_idx)
|
||||
if val >= 0 && val != old_tag
|
||||
set_terrain_tag_for_tile_ID(selected, ids[val])
|
||||
draw_overlay
|
||||
|
||||
@@ -350,12 +350,12 @@ class MapScreenScene
|
||||
end
|
||||
|
||||
def helpWindow
|
||||
helptext = _INTL("A: Add map to canvas\r\n")
|
||||
helptext += _INTL("DEL: Delete map from canvas\r\n")
|
||||
helptext += _INTL("S: Go to another map\r\n")
|
||||
helptext += _INTL("Click to select a map\r\n")
|
||||
helptext += _INTL("Double-click: Edit map's metadata\r\n")
|
||||
helptext += _INTL("Drag map to move it\r\n")
|
||||
helptext = _INTL("A: Add map to canvas") + "\r\n"
|
||||
helptext += _INTL("DEL: Delete map from canvas") + "\r\n"
|
||||
helptext += _INTL("S: Go to another map") + "\r\n"
|
||||
helptext += _INTL("Click to select a map") + "\r\n"
|
||||
helptext += _INTL("Double-click: Edit map's metadata") + "\r\n"
|
||||
helptext += _INTL("Drag map to move it") + "\r\n"
|
||||
helptext += _INTL("Arrow keys/drag canvas: Move around canvas")
|
||||
title = Window_UnformattedTextPokemon.newWithSize(
|
||||
helptext, 0, 0, Graphics.width * 8 / 10, Graphics.height, @viewport
|
||||
|
||||
@@ -380,9 +380,7 @@ module BattleAnimationEditor
|
||||
cmdEditBG = -1
|
||||
cmdNewFO = -1
|
||||
cmdEditFO = -1
|
||||
canvas.animation.timing.each do |i|
|
||||
commands.push(sprintf("%s", i))
|
||||
end
|
||||
canvas.animation.timing.each { |i| commands.push(i.to_s) }
|
||||
commands[cmdNewSound = commands.length] = _INTL("Add: Play Sound...")
|
||||
commands[cmdNewBG = commands.length] = _INTL("Add: Set Background Graphic...")
|
||||
commands[cmdEditBG = commands.length] = _INTL("Add: Edit Background Color/Location...")
|
||||
@@ -413,7 +411,7 @@ module BattleAnimationEditor
|
||||
cmdwin.index != cmdEditFO
|
||||
if framewindow.changed?(1) # Set Frame
|
||||
canvas.animation.timing[cmdwin.index].frame = framewindow.value(0) - 1
|
||||
cmdwin.commands[cmdwin.index] = sprintf("%s", canvas.animation.timing[cmdwin.index])
|
||||
cmdwin.commands[cmdwin.index] = canvas.animation.timing[cmdwin.index].to_s
|
||||
cmdwin.refresh
|
||||
next
|
||||
end
|
||||
@@ -476,7 +474,7 @@ module BattleAnimationEditor
|
||||
when 2, 4
|
||||
pbEditBG(canvas, canvas.animation.timing[cmdwin.index])
|
||||
end
|
||||
cmdwin.commands[cmdwin.index] = sprintf("%s", canvas.animation.timing[cmdwin.index])
|
||||
cmdwin.commands[cmdwin.index] = canvas.animation.timing[cmdwin.index].to_s
|
||||
cmdwin.refresh
|
||||
end
|
||||
if redrawcmds
|
||||
@@ -486,7 +484,7 @@ module BattleAnimationEditor
|
||||
cmdwin.commands[cmdNewFO] = nil if cmdNewFO >= 0
|
||||
cmdwin.commands[cmdEditFO] = nil if cmdEditFO >= 0
|
||||
cmdwin.commands.compact!
|
||||
cmdwin.commands.push(sprintf("%s", canvas.animation.timing[canvas.animation.timing.length - 1]))
|
||||
cmdwin.commands.push(canvas.animation.timing[canvas.animation.timing.length - 1].to_s)
|
||||
cmdwin.commands[cmdNewSound = cmdwin.commands.length] = _INTL("Add: Play Sound...")
|
||||
cmdwin.commands[cmdNewBG = cmdwin.commands.length] = _INTL("Add: Set Background Graphic...")
|
||||
cmdwin.commands[cmdEditBG = cmdwin.commands.length] = _INTL("Add: Edit Background Color/Location...")
|
||||
|
||||
@@ -287,7 +287,7 @@ class StringListProperty
|
||||
do_refresh = true
|
||||
end
|
||||
else # Edit value
|
||||
case pbMessage(_INTL("\\ts[]Do what with this value?"),
|
||||
case pbMessage("\\ts[]" + _INTL("Do what with this value?"),
|
||||
[_INTL("Edit"), _INTL("Delete"), _INTL("Cancel")], 3)
|
||||
when 0 # Edit
|
||||
new_value = pbMessageFreeText(_INTL("Enter the new value."),
|
||||
@@ -1096,7 +1096,7 @@ class GameDataPoolProperty
|
||||
need_refresh = true
|
||||
end
|
||||
else # Edit existing value
|
||||
case pbMessage(_INTL("\\ts[]Do what with this value?"),
|
||||
case pbMessage("\\ts[]" + _INTL("Do what with this value?"),
|
||||
[_INTL("Change value"), _INTL("Delete"), _INTL("Cancel")], 3)
|
||||
when 0 # Change value
|
||||
new_value = pbChooseFromGameDataList(@game_data, entry[0])
|
||||
@@ -1250,7 +1250,7 @@ module LevelUpMovesProperty
|
||||
end
|
||||
end
|
||||
else # Edit existing move
|
||||
case pbMessage(_INTL("\\ts[]Do what with this move?"),
|
||||
case pbMessage("\\ts[]" + _INTL("Do what with this move?"),
|
||||
[_INTL("Change level"), _INTL("Change move"), _INTL("Delete"), _INTL("Cancel")], 4)
|
||||
when 0 # Change level
|
||||
params = ChooseNumberParams.new
|
||||
@@ -1457,7 +1457,7 @@ class EvolutionsProperty
|
||||
end
|
||||
end
|
||||
else # Edit evolution
|
||||
case pbMessage(_INTL("\\ts[]Do what with this evolution?"),
|
||||
case pbMessage("\\ts[]" + _INTL("Do what with this evolution?"),
|
||||
[_INTL("Change species"), _INTL("Change method"),
|
||||
_INTL("Change parameter"), _INTL("Delete"), _INTL("Cancel")], 5)
|
||||
when 0 # Change species
|
||||
|
||||
@@ -206,8 +206,8 @@ MenuHandlers.add(:battle_debug_menu, :mega_evolution, {
|
||||
next if !trainers[i]
|
||||
text = (side == 0) ? "Your side:" : "Foe side:"
|
||||
text += sprintf(" %d: %s", i, trainers[i].name)
|
||||
text += sprintf(" [ABLE]") if value == -1
|
||||
text += sprintf(" [UNABLE]") if value == -2
|
||||
text += " [ABLE]" if value == -1
|
||||
text += " [UNABLE]" if value == -2
|
||||
commands.push(text)
|
||||
cmds.push([side, i])
|
||||
end
|
||||
|
||||
@@ -40,12 +40,12 @@ module FileLineData
|
||||
def self.linereport
|
||||
if @section
|
||||
if @key.nil?
|
||||
return _INTL("File {1}, section {2}\r\n{3}\r\n\r\n", @file, @section, @value)
|
||||
return _INTL("File {1}, section {2}\r\n{3}", @file, @section, @value) + "\r\n\r\n"
|
||||
else
|
||||
return _INTL("File {1}, section {2}, key {3}\r\n{4}\r\n\r\n", @file, @section, @key, @value)
|
||||
return _INTL("File {1}, section {2}, key {3}\r\n{4}", @file, @section, @key, @value) + "\r\n\r\n"
|
||||
end
|
||||
else
|
||||
return _INTL("File {1}, line {2}\r\n{3}\r\n\r\n", @file, @lineno, @linedata)
|
||||
return _INTL("File {1}, line {2}\r\n{3}", @file, @lineno, @linedata) + "\r\n\r\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -560,7 +560,7 @@ module Compiler
|
||||
else
|
||||
pbWriteCsvRecord(record, f, schema)
|
||||
end
|
||||
f.write(sprintf("\r\n"))
|
||||
f.write("\r\n")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -574,7 +574,7 @@ module Compiler
|
||||
trainerid = GameData::TrainerType.get(trtype).id
|
||||
filename = GameData::TrainerType.charset_filename_brief(trainerid)
|
||||
if FileTest.image_exist?("Graphics/Characters/" + filename)
|
||||
firstpage.graphic.character_name = sprintf(filename)
|
||||
firstpage.graphic.character_name = filename
|
||||
end
|
||||
end
|
||||
# Create strings that will be used repeatedly
|
||||
|
||||
Reference in New Issue
Block a user