More aligning of code

This commit is contained in:
Maruno17
2021-12-19 12:19:08 +00:00
parent 13a238cc6a
commit 33781493f4
121 changed files with 977 additions and 838 deletions

View File

@@ -18,7 +18,7 @@ class PokemonEggHatch_Scene
@viewport.z = 99999
# Create background image
addBackgroundOrColoredPlane(@sprites, "background", "hatchbg",
Color.new(248, 248, 248), @viewport)
Color.new(248, 248, 248), @viewport)
# Create egg sprite/Pokémon sprite
@sprites["pokemon"] = PokemonSprite.new(@viewport)
@sprites["pokemon"].setOffset(PictureOrigin::Bottom)
@@ -46,7 +46,7 @@ class PokemonEggHatch_Scene
@sprites["overlay"].z = 200
@sprites["overlay"].bitmap = Bitmap.new(Graphics.width, Graphics.height)
@sprites["overlay"].bitmap.fill_rect(0, 0, Graphics.width, Graphics.height,
Color.new(255, 255, 255))
Color.new(255, 255, 255))
@sprites["overlay"].opacity = 0
# Start up scene
pbFadeInAndShow(@sprites)
@@ -103,10 +103,10 @@ class PokemonEggHatch_Scene
pbMEPlay("Evolution success")
@pokemon.name = nil
pbMessage(_INTL("\\se[]{1} hatched from the Egg!\\wt[80]", @pokemon.name)) { update }
if pbConfirmMessage(
_INTL("Would you like to nickname the newly hatched {1}?", @pokemon.name)) { update }
if pbConfirmMessage(_INTL("Would you like to nickname the newly hatched {1}?",
@pokemon.name)) { update }
nickname = pbEnterPokemonName(_INTL("{1}'s nickname?", @pokemon.name),
0, Pokemon::MAX_NAME_SIZE, "", @pokemon, true)
0, Pokemon::MAX_NAME_SIZE, "", @pokemon, true)
@pokemon.name = nickname
@nicknamed = true
end

View File

@@ -496,7 +496,7 @@ class PokemonEvolutionScene
@msgviewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@msgviewport.z = 99999
addBackgroundOrColoredPlane(@sprites, "background", "evolutionbg",
Color.new(248, 248, 248), @bgviewport)
Color.new(248, 248, 248), @bgviewport)
rsprite1 = PokemonSprite.new(@viewport)
rsprite1.setOffset(PictureOrigin::Center)
rsprite1.setPokemonBitmap(@pokemon, false)
@@ -534,7 +534,7 @@ class PokemonEvolutionScene
pbBGMStop
@pokemon.play_cry
pbMessageDisplay(@sprites["msgwindow"],
_INTL("\\se[]What? {1} is evolving!\\^", @pokemon.name)) { pbUpdate }
_INTL("\\se[]What? {1} is evolving!\\^", @pokemon.name)) { pbUpdate }
pbMessageWaitForInput(@sprites["msgwindow"], 50, true) { pbUpdate }
pbPlayDecisionSE
oldstate = pbSaveSpriteState(@sprites["rsprite1"])
@@ -560,7 +560,7 @@ class PokemonEvolutionScene
if canceled
$stats.evolutions_cancelled += 1
pbMessageDisplay(@sprites["msgwindow"],
_INTL("Huh? {1} stopped evolving!", @pokemon.name)) { pbUpdate }
_INTL("Huh? {1} stopped evolving!", @pokemon.name)) { pbUpdate }
else
pbEvolutionSuccess
end
@@ -580,8 +580,8 @@ class PokemonEvolutionScene
pbMEPlay("Evolution success")
newspeciesname = GameData::Species.get(@newspecies).name
pbMessageDisplay(@sprites["msgwindow"],
_INTL("\\se[]Congratulations! Your {1} evolved into {2}!\\wt[80]",
@pokemon.name, newspeciesname)) { pbUpdate }
_INTL("\\se[]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
pbEvolutionMethodAfterEvolution

View File

@@ -37,7 +37,7 @@ class PokemonTrade_Scene
@trader1 = trader1
@trader2 = trader2
addBackgroundOrColoredPlane(@sprites, "background", "tradebg",
Color.new(248, 248, 248), @viewport)
Color.new(248, 248, 248), @viewport)
@sprites["rsprite1"] = PokemonSprite.new(@viewport)
@sprites["rsprite1"].setPokemonBitmap(@pokemon, false)
@sprites["rsprite1"].setOffset(PictureOrigin::Bottom)
@@ -176,21 +176,21 @@ class PokemonTrade_Scene
speciesname1 = GameData::Species.get(@pokemon.species).name
speciesname2 = GameData::Species.get(@pokemon2.species).name
pbMessageDisplay(@sprites["msgwindow"],
_ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}\\wtnp[0]",
@pokemon.name, @pokemon.owner.public_id, @pokemon.owner.name)) { pbUpdate }
_ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}\\wtnp[0]",
@pokemon.name, @pokemon.owner.public_id, @pokemon.owner.name)) { pbUpdate }
pbMessageWaitForInput(@sprites["msgwindow"], 50, true) { pbUpdate }
pbPlayDecisionSE
pbScene1
pbMessageDisplay(@sprites["msgwindow"],
_INTL("For {1}'s {2},\r\n{3} sends {4}.\1", @trader1, speciesname1, @trader2, speciesname2)) { pbUpdate }
_INTL("For {1}'s {2},\r\n{3} sends {4}.\1", @trader1, speciesname1, @trader2, speciesname2)) { pbUpdate }
pbMessageDisplay(@sprites["msgwindow"],
_INTL("{1} bids farewell to {2}.", @trader2, speciesname2)) { pbUpdate }
_INTL("{1} bids farewell to {2}.", @trader2, speciesname2)) { pbUpdate }
pbScene2
pbMessageDisplay(@sprites["msgwindow"],
_ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}\1",
@pokemon2.name, @pokemon2.owner.public_id, @pokemon2.owner.name)) { pbUpdate }
_ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}\1",
@pokemon2.name, @pokemon2.owner.public_id, @pokemon2.owner.name)) { pbUpdate }
pbMessageDisplay(@sprites["msgwindow"],
_INTL("Take good care of {1}.", speciesname2)) { pbUpdate }
_INTL("Take good care of {1}.", speciesname2)) { pbUpdate }
end
end

View File

@@ -283,13 +283,13 @@ class HallOfFame_Scene
lefttext += _INTL("IDNo.<r>{1}<br>", pubid)
lefttext += _ISPRINTF("Time<r>{1:02d}:{2:02d}<br>", hour, min)
lefttext += _INTL("Pokédex<r>{1}/{2}<br>",
$player.pokedex.owned_count, $player.pokedex.seen_count)
$player.pokedex.owned_count, $player.pokedex.seen_count)
@sprites["messagebox"] = Window_AdvancedTextPokemon.new(lefttext)
@sprites["messagebox"].viewport = @viewport
@sprites["messagebox"].width = 192 if @sprites["messagebox"].width < 192
@sprites["msgwindow"] = pbCreateMessageWindow(@viewport)
pbMessageDisplay(@sprites["msgwindow"],
_INTL("League champion!\nCongratulations!\\^"))
_INTL("League champion!\nCongratulations!\\^"))
end
def writePokemonData(pokemon, hallNumber = -1)

View File

@@ -130,15 +130,15 @@ class PokemonPauseMenu
@scene.pbShowInfo(_INTL("Balls: {1}", pbSafariState.ballcount))
else
@scene.pbShowInfo(_INTL("Steps: {1}/{2}\nBalls: {3}",
pbSafariState.steps, Settings::SAFARI_STEPS, pbSafariState.ballcount))
pbSafariState.steps, Settings::SAFARI_STEPS, pbSafariState.ballcount))
end
commands[cmdQuit = commands.length] = _INTL("Quit")
elsif pbInBugContest?
if pbBugContestState.lastPokemon
@scene.pbShowInfo(_INTL("Caught: {1}\nLevel: {2}\nBalls: {3}",
pbBugContestState.lastPokemon.speciesName,
pbBugContestState.lastPokemon.level,
pbBugContestState.ballcount))
pbBugContestState.lastPokemon.speciesName,
pbBugContestState.lastPokemon.level,
pbBugContestState.ballcount))
else
@scene.pbShowInfo(_INTL("Caught: None\nBalls: {1}", pbBugContestState.ballcount))
end

View File

@@ -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)
sprintf("%d", @commands2[index][0]), 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)
sprintf("%d", @commands2[index][1]), self.baseColor, self.shadowColor, 1)
allseen = (@commands2[index][0] >= @commands2[index][2])
allown = (@commands2[index][1] >= @commands2[index][2])
pbDrawImagePositions(self.contents, [
@@ -47,7 +47,8 @@ class PokemonPokedexMenu_Scene
@sprites["background"] = IconSprite.new(0, 0, @viewport)
@sprites["background"].setBitmap(_INTL("Graphics/Pictures/Pokedex/bg_menu"))
@sprites["headings"] = Window_AdvancedTextPokemon.newWithSize(
_INTL("<c3=F8F8F8,C02028>SEEN<r>OBTAINED</c3>"), 286, 136, 208, 64, @viewport)
_INTL("<c3=F8F8F8,C02028>SEEN<r>OBTAINED</c3>"), 286, 136, 208, 64, @viewport
)
@sprites["headings"].windowskin = nil
@sprites["commands"] = Window_DexesList.new(commands, commands2, Graphics.width - 84)
@sprites["commands"].x = 40

View File

@@ -49,7 +49,7 @@ class Window_Pokedex < Window_DrawableCommand
text = sprintf("%03d ----------", indexNumber)
end
pbDrawShadowText(self.contents, rect.x + 36, rect.y + 6, rect.width, rect.height,
text, self.baseColor, self.shadowColor)
text, self.baseColor, self.shadowColor)
end
def refresh

View File

@@ -127,7 +127,7 @@ class Window_CommandPokemonColor < Window_CommandPokemon
shadow = Color.new(128, 192, 240)
end
pbDrawShadowText(self.contents, rect.x, rect.y, rect.width, rect.height,
@commands[index], base, shadow)
@commands[index], base, shadow)
end
end
@@ -406,16 +406,14 @@ class PokemonPartyPanel < SpriteWrapper
# Draw shiny icon
if @pokemon.shiny?
pbDrawImagePositions(@overlaysprite.bitmap,
[["Graphics/Pictures/shiny", 80, 48, 0, 0, 16, 16]]
)
[["Graphics/Pictures/shiny", 80, 48, 0, 0, 16, 16]])
end
end
pbDrawTextPositions(@overlaysprite.bitmap, textpos)
# Draw level text
if !@pokemon.egg?
pbDrawImagePositions(@overlaysprite.bitmap,
[["Graphics/Pictures/Party/overlay_lv", 20, 70, 0, 0, 22, 14]]
)
[["Graphics/Pictures/Party/overlay_lv", 20, 70, 0, 0, 22, 14]])
pbSetSmallFont(@overlaysprite.bitmap)
pbDrawTextPositions(@overlaysprite.bitmap, [
[@pokemon.level.to_s, 42, 57, 0, basecolor, shadowcolor]
@@ -461,7 +459,8 @@ class PokemonParty_Scene
@sprites["messagebox"].letterbyletter = true
pbBottomLeftLines(@sprites["messagebox"], 2)
@sprites["storagetext"] = Window_UnformattedTextPokemon.new(
@can_access_storage ? _INTL("[Special]: To Boxes") : "")
@can_access_storage ? _INTL("[Special]: To Boxes") : ""
)
@sprites["storagetext"].x = 32
@sprites["storagetext"].y = Graphics.height - @sprites["messagebox"].height - 16
@sprites["storagetext"].z = 10
@@ -1103,11 +1102,15 @@ class PokemonPartyScreen
annot.push((elig) ? _INTL("ABLE") : _INTL("NOT ABLE"))
end
ret = -1
@scene.pbStartScene(@party,
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."), annot)
@scene.pbStartScene(
@party,
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."),
annot
)
loop do
@scene.pbSetHelpText(
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."))
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel.")
)
pkmnid = @scene.pbChoosePokemon
break if pkmnid < 0
if !eligibility[pkmnid] && !allowIneligible
@@ -1131,11 +1134,15 @@ class PokemonPartyScreen
annot.push((elig) ? _INTL("ABLE") : _INTL("NOT ABLE"))
end
ret = -1
@scene.pbStartScene(@party,
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."), annot)
@scene.pbStartScene(
@party,
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."),
annot
)
loop do
@scene.pbSetHelpText(
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."))
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel.")
)
pkmnid = @scene.pbChoosePokemon
break if pkmnid < 0
if !eligibility[pkmnid] && !allowIneligible
@@ -1158,8 +1165,8 @@ class PokemonPartyScreen
end
end
@scene.pbStartScene(@party,
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."),
nil, false, can_access_storage)
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."),
nil, false, can_access_storage)
loop do
@scene.pbSetHelpText((@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."))
pkmnid = @scene.pbChoosePokemon(false, -1, 1)
@@ -1250,7 +1257,7 @@ class PokemonPartyScreen
return [pkmn, pkmn.moves[i].id]
end
@scene.pbStartScene(@party,
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."))
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."))
break
end
return [pkmn, pkmn.moves[i].id]
@@ -1273,7 +1280,7 @@ class PokemonPartyScreen
end
elsif cmdMail >= 0 && command == cmdMail
command = @scene.pbShowCommands(_INTL("Do what with the mail?"),
[_INTL("Read"), _INTL("Take"), _INTL("Cancel")])
[_INTL("Read"), _INTL("Take"), _INTL("Cancel")])
case command
when 0 # Read
pbFadeOutIn {

View File

@@ -1084,7 +1084,7 @@ class PokemonSummary_Scene
markrect.x = i * MARK_WIDTH
markrect.y = [(markings[i] || 0), mark_variants - 1].min * MARK_HEIGHT
@sprites["markingoverlay"].bitmap.blt(300 + 58 * (i % 3), 154 + 50 * (i / 3),
@markingbitmap.bitmap, markrect)
@markingbitmap.bitmap, markrect)
end
textpos = [
[_INTL("Mark {1}", pokemon.name), 366, 90, 2, base, shadow],

View File

@@ -197,8 +197,9 @@ class PokemonBag_Scene
@sprites["itemlist"].baseColor = ITEMLISTBASECOLOR
@sprites["itemlist"].shadowColor = ITEMLISTSHADOWCOLOR
@sprites["itemicon"] = ItemIconSprite.new(48, Graphics.height - 48, nil, @viewport)
@sprites["itemtext"] = Window_UnformattedTextPokemon.newWithSize("",
72, 270, Graphics.width - 72 - 24, 128, @viewport)
@sprites["itemtext"] = Window_UnformattedTextPokemon.newWithSize(
"", 72, 270, Graphics.width - 72 - 24, 128, @viewport
)
@sprites["itemtext"].baseColor = ITEMTEXTBASECOLOR
@sprites["itemtext"].shadowColor = ITEMTEXTSHADOWCOLOR
@sprites["itemtext"].visible = true
@@ -268,13 +269,16 @@ class PokemonBag_Scene
if @choosing && @filterlist
for i in 1...@bag.pockets.length
if @filterlist[i].length == 0
@sprites["pocketicon"].bitmap.blt(6 + (i - 1) * 22, 6,
@pocketbitmap.bitmap, Rect.new((i - 1) * 20, 28, 20, 20))
@sprites["pocketicon"].bitmap.blt(
6 + (i - 1) * 22, 6, @pocketbitmap.bitmap, Rect.new((i - 1) * 20, 28, 20, 20)
)
end
end
end
@sprites["pocketicon"].bitmap.blt(2 + (@sprites["itemlist"].pocket - 1) * 22, 2,
@pocketbitmap.bitmap, Rect.new((@sprites["itemlist"].pocket - 1) * 28, 0, 28, 28))
@sprites["pocketicon"].bitmap.blt(
2 + (@sprites["itemlist"].pocket - 1) * 22, 2, @pocketbitmap.bitmap,
Rect.new((@sprites["itemlist"].pocket - 1) * 28, 0, 28, 28)
)
# Refresh the item window
@sprites["itemlist"].refresh
# Refresh more things
@@ -552,7 +556,8 @@ class PokemonBagScreen
params.setRange(0, Settings::BAG_MAX_PER_SLOT)
params.setDefaultValue(qty)
newqty = pbMessageChooseNumber(
_INTL("Choose new quantity of {1} (max. #{Settings::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.add(item, newqty - qty)
elsif newqty < qty

View File

@@ -185,7 +185,7 @@ class PokemonRegionMap_Scene
f.write("\#-------------------------------\r\n")
f.write(sprintf("[%d]\r\n", i))
f.write(sprintf("Name = %s\r\nFilename = %s\r\n",
Compiler.csvQuote(map[0]), Compiler.csvQuote(map[1])))
Compiler.csvQuote(map[0]), Compiler.csvQuote(map[1])))
for loc in map[2]
f.write("Point = ")
Compiler.pbWriteCsvRecord(loc, f, [nil, "uussUUUU"])

View File

@@ -43,13 +43,15 @@ class PokemonPhoneScene
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@viewport.z = 99999
@sprites["list"] = Window_PhoneList.newEmpty(152, 32, Graphics.width - 142, Graphics.height - 80, @viewport)
@sprites["header"] = Window_UnformattedTextPokemon.newWithSize(_INTL("Phone"),
2, -18, 128, 64, @viewport)
@sprites["header"] = Window_UnformattedTextPokemon.newWithSize(
_INTL("Phone"), 2, -18, 128, 64, @viewport
)
@sprites["header"].baseColor = Color.new(248, 248, 248)
@sprites["header"].shadowColor = Color.new(0, 0, 0)
mapname = (@trainers[0][2]) ? pbGetMapNameFromId(@trainers[0][2]) : ""
@sprites["bottom"] = Window_AdvancedTextPokemon.newWithSize("",
162, Graphics.height - 64, Graphics.width - 158, 64, @viewport)
@sprites["bottom"] = Window_AdvancedTextPokemon.newWithSize(
"", 162, Graphics.height - 64, Graphics.width - 158, 64, @viewport
)
@sprites["bottom"].text = "<ac>" + mapname
@sprites["info"] = Window_AdvancedTextPokemon.newWithSize("", -8, 224, 180, 160, @viewport)
addBackgroundPlane(@sprites, "bg", "phonebg", @viewport)
@@ -68,8 +70,7 @@ class PokemonPhoneScene
for trainer in @trainers
if trainer.length == 4
displayname = _INTL("{1} {2}", GameData::TrainerType.get(trainer[0]).name,
pbGetMessageFromHash(MessageTypes::TrainerNames, trainer[1])
)
pbGetMessageFromHash(MessageTypes::TrainerNames, trainer[1]))
commands.push(displayname) # trainer's display name
else
commands.push(trainer[1]) # NPC's display name

View File

@@ -14,12 +14,14 @@ class PokemonJukebox_Scene
@sprites["background"] = IconSprite.new(0, 0, @viewport)
@sprites["background"].setBitmap("Graphics/Pictures/jukeboxbg")
@sprites["header"] = Window_UnformattedTextPokemon.newWithSize(
_INTL("Jukebox"), 2, -18, 128, 64, @viewport)
_INTL("Jukebox"), 2, -18, 128, 64, @viewport
)
@sprites["header"].baseColor = Color.new(248, 248, 248)
@sprites["header"].shadowColor = Color.new(0, 0, 0)
@sprites["header"].windowskin = nil
@sprites["commands"] = Window_CommandPokemon.newWithSize(@commands,
94, 92, 324, 224, @viewport)
@sprites["commands"] = Window_CommandPokemon.newWithSize(
@commands, 94, 92, 324, 224, @viewport
)
@sprites["commands"].windowskin = nil
pbFadeInAndShow(@sprites) { pbUpdate }
end

View File

@@ -45,9 +45,9 @@ class PokemonTrainerCard_Scene
time = (hour > 0) ? _INTL("{1}h {2}m", hour, min) : _INTL("{1}m", min)
$PokemonGlobal.startTime = pbGetTimeNow if !$PokemonGlobal.startTime
starttime = _INTL("{1} {2}, {3}",
pbGetAbbrevMonthName($PokemonGlobal.startTime.mon),
$PokemonGlobal.startTime.day,
$PokemonGlobal.startTime.year)
pbGetAbbrevMonthName($PokemonGlobal.startTime.mon),
$PokemonGlobal.startTime.day,
$PokemonGlobal.startTime.year)
textPositions = [
[_INTL("Name"), 34, 58, 0, baseColor, shadowColor],
[$player.name, 302, 58, 1, baseColor, shadowColor],

View File

@@ -106,8 +106,10 @@ class PokemonLoad_Scene
addBackgroundOrColoredPlane(@sprites, "background", "loadbg", Color.new(248, 248, 248), @viewport)
y = 16 * 2
for i in 0...commands.length
@sprites["panel#{i}"] = PokemonLoadPanel.new(i, commands[i],
(show_continue) ? (i == 0) : false, trainer, frame_count, stats, map_id, @viewport)
@sprites["panel#{i}"] = PokemonLoadPanel.new(
i, commands[i], (show_continue) ? (i == 0) : false, trainer,
frame_count, stats, map_id, @viewport
)
@sprites["panel#{i}"].x = 24 * 2
@sprites["panel#{i}"].y = y
@sprites["panel#{i}"].pbRefresh

View File

@@ -87,8 +87,7 @@ class PokemonSaveScreen
pbMessage(_INTL('WARNING!'))
pbMessage(_INTL('There is a different game file that is already saved.'))
pbMessage(_INTL("If you save now, the other file's adventure, including items and Pokémon, will be entirely lost."))
if !pbConfirmMessageSerious(
_INTL('Are you sure you want to save now and overwrite the other save file?'))
if !pbConfirmMessageSerious(_INTL('Are you sure you want to save now and overwrite the other save file?'))
pbSEPlay('GUI save choice')
@scene.pbEndScreen
return false

View File

@@ -205,7 +205,7 @@ class Window_PokemonOption < Window_DrawableCommand
optionname = (index == @options.length) ? _INTL("Cancel") : @options[index].name
optionwidth = rect.width * 9 / 20
pbDrawShadowText(self.contents, rect.x, rect.y, optionwidth, rect.height, optionname,
@nameBaseColor, @nameShadowColor)
@nameBaseColor, @nameShadowColor)
return if index == @options.length
if @options[index].is_a?(EnumOption)
if @options[index].values.length > 1
@@ -219,42 +219,42 @@ class Window_PokemonOption < Window_DrawableCommand
ivalue = 0
for value in @options[index].values
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
(ivalue == self[index]) ? @selBaseColor : self.baseColor,
(ivalue == self[index]) ? @selShadowColor : self.shadowColor
)
(ivalue == self[index]) ? @selBaseColor : self.baseColor,
(ivalue == self[index]) ? @selShadowColor : self.shadowColor)
xpos += self.contents.text_size(value).width
xpos += spacing
ivalue += 1
end
else
pbDrawShadowText(self.contents, rect.x + optionwidth, rect.y, optionwidth, rect.height,
optionname, self.baseColor, self.shadowColor)
optionname, self.baseColor, self.shadowColor)
end
elsif @options[index].is_a?(NumberOption)
value = _INTL("Type {1}/{2}", @options[index].optstart + self[index],
@options[index].optend - @options[index].optstart + 1)
@options[index].optend - @options[index].optstart + 1)
xpos = optionwidth + rect.x
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
@selBaseColor, @selShadowColor)
@selBaseColor, @selShadowColor)
elsif @options[index].is_a?(SliderOption)
value = sprintf(" %d", @options[index].optend)
sliderlength = optionwidth - self.contents.text_size(value).width
xpos = optionwidth + rect.x
self.contents.fill_rect(xpos, rect.y - 2 + rect.height / 2,
optionwidth - self.contents.text_size(value).width, 4, self.baseColor)
optionwidth - self.contents.text_size(value).width, 4, self.baseColor)
self.contents.fill_rect(
xpos + (sliderlength - 8) * (@options[index].optstart + self[index]) / @options[index].optend,
rect.y - 8 + rect.height / 2,
8, 16, @selBaseColor)
xpos + (sliderlength - 8) * (@options[index].optstart + self[index]) / @options[index].optend,
rect.y - 8 + rect.height / 2,
8, 16, @selBaseColor
)
value = sprintf("%d", @options[index].optstart + self[index])
xpos += optionwidth - self.contents.text_size(value).width
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
@selBaseColor, @selShadowColor)
@selBaseColor, @selShadowColor)
else
value = @options[index].values[self[index]]
xpos = optionwidth + rect.x
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
@selBaseColor, @selShadowColor)
@selBaseColor, @selShadowColor)
end
end
@@ -291,7 +291,8 @@ class PokemonOption_Scene
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@viewport.z = 99999
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
_INTL("Options"), 0, 0, Graphics.width, 64, @viewport)
_INTL("Options"), 0, 0, Graphics.width, 64, @viewport
)
@sprites["textbox"] = pbCreateMessageWindow
@sprites["textbox"].text = _INTL("Speech frame {1}.", 1 + $PokemonSystem.textskin)
@sprites["textbox"].letterbyletter = false
@@ -376,9 +377,10 @@ class PokemonOption_Scene
)
]
@PokemonOptions = pbAddOnOptions(@PokemonOptions)
@sprites["option"] = Window_PokemonOption.new(@PokemonOptions, 0,
@sprites["title"].height, Graphics.width,
Graphics.height - @sprites["title"].height - @sprites["textbox"].height)
@sprites["option"] = Window_PokemonOption.new(
@PokemonOptions, 0, @sprites["title"].height, Graphics.width,
Graphics.height - @sprites["title"].height - @sprites["textbox"].height
)
@sprites["option"].viewport = @viewport
@sprites["option"].visible = true
# Get the values of each option

View File

@@ -95,9 +95,9 @@ class MosaicPokemonSprite < PokemonSprite
@mosaicbitmap2.clear
@mosaicbitmap.stretch_blt(Rect.new(0, 0, newWidth, newHeight), @oldbitmap, @oldbitmap.rect)
@mosaicbitmap2.stretch_blt(
Rect.new(-@mosaic / 2 + 1, -@mosaic / 2 + 1,
@mosaicbitmap2.width, @mosaicbitmap2.height),
@mosaicbitmap, Rect.new(0, 0, newWidth, newHeight))
Rect.new(-@mosaic / 2 + 1, -@mosaic / 2 + 1, @mosaicbitmap2.width, @mosaicbitmap2.height),
@mosaicbitmap, Rect.new(0, 0, newWidth, newHeight)
)
self.bitmap = @mosaicbitmap2
end
@inrefresh = false
@@ -410,7 +410,7 @@ class PokemonBoxSprite < SpriteWrapper
widthval = @contents.text_size(boxname).width
xval = 162 - (widthval / 2)
pbDrawShadowText(@contents, xval, 8, widthval, 32,
boxname, Color.new(248, 248, 248), Color.new(40, 48, 48))
boxname, Color.new(248, 248, 248), Color.new(40, 48, 48))
@refreshBox = false
end
yval = self.y + 30
@@ -1326,7 +1326,7 @@ class PokemonStorageScene
markrect.x = i * MARK_WIDTH
markrect.y = [(markings[i] || 0), mark_variants - 1].min * MARK_HEIGHT
@sprites["markingoverlay"].bitmap.blt(336 + 58 * (i % 3), 106 + 50 * (i / 3),
@markingbitmap.bitmap, markrect)
@markingbitmap.bitmap, markrect)
end
textpos = [
[_INTL("OK"), 402, 208, 2, base, shadow, 1],
@@ -1923,13 +1923,12 @@ class PokemonStorageScreen
def pbBoxCommands
commands = [
_INTL("Jump"),
_INTL("Wallpaper"),
_INTL("Name"),
_INTL("Cancel")
_INTL("Jump"),
_INTL("Wallpaper"),
_INTL("Name"),
_INTL("Cancel")
]
command = pbShowCommands(
_INTL("What do you want to do?"), commands)
command = pbShowCommands(_INTL("What do you want to do?"), commands)
case command
when 0
destbox = @scene.pbChooseBox(_INTL("Jump to which Box?"))

View File

@@ -44,8 +44,7 @@ class StorageSystemPC
[_INTL("Organize the Pokémon in Boxes and in your party."),
_INTL("Move Pokémon stored in Boxes to your party."),
_INTL("Store Pokémon in your party in Boxes."),
_INTL("Return to the previous menu.")], -1, command
)
_INTL("Return to the previous menu.")], -1, command)
if command >= 0 && command < 3
case command
when 1 # Withdraw
@@ -123,8 +122,7 @@ def pbPCItemStorage
[_INTL("Take out items from the PC."),
_INTL("Store items in the PC."),
_INTL("Throw away items stored in the PC."),
_INTL("Go back to the previous menu.")], -1, command
)
_INTL("Go back to the previous menu.")], -1, command)
case command
when 0 # Withdraw Item
if !$PokemonGlobal.pcItemStorage
@@ -179,7 +177,7 @@ def pbPCMailbox
if command >= 0 && command < $PokemonGlobal.mailbox.length
mailIndex = command
commandMail = pbMessage(_INTL("What do you want to do with {1}'s Mail?",
$PokemonGlobal.mailbox[mailIndex].sender), [
$PokemonGlobal.mailbox[mailIndex].sender), [
_INTL("Read"),
_INTL("Move to Bag"),
_INTL("Give"),
@@ -241,7 +239,7 @@ def pbPokeCenterPC
loop do
commands = PokemonPCList.getCommandList
command = pbMessage(_INTL("Which PC should be accessed?"), commands,
commands.length, nil, command)
commands.length, nil, command)
break if !PokemonPCList.callCommand(command)
end
pbSEPlay("PC close")

View File

@@ -203,13 +203,15 @@ class PokemonMart_Scene
@sprites["background"].setBitmap("Graphics/Pictures/martScreen")
@sprites["icon"] = ItemIconSprite.new(36, Graphics.height - 50, nil, @viewport)
winAdapter = buying ? BuyAdapter.new(adapter) : SellAdapter.new(adapter)
@sprites["itemwindow"] = Window_PokemonMart.new(stock, winAdapter,
Graphics.width - 316 - 16, 12, 330 + 16, Graphics.height - 126)
@sprites["itemwindow"] = Window_PokemonMart.new(
stock, winAdapter, Graphics.width - 316 - 16, 12, 330 + 16, Graphics.height - 126
)
@sprites["itemwindow"].viewport = @viewport
@sprites["itemwindow"].index = 0
@sprites["itemwindow"].refresh
@sprites["itemtextwindow"] = Window_UnformattedTextPokemon.newWithSize("",
64, Graphics.height - 96 - 16, Graphics.width - 64, 128, @viewport)
@sprites["itemtextwindow"] = Window_UnformattedTextPokemon.newWithSize(
"", 64, Graphics.height - 96 - 16, Graphics.width - 64, 128, @viewport
)
pbPrepareWindow(@sprites["itemtextwindow"])
@sprites["itemtextwindow"].baseColor = Color.new(248, 248, 248)
@sprites["itemtextwindow"].shadowColor = Color.new(0, 0, 0)
@@ -554,7 +556,7 @@ class PokemonMartScreen
end
if GameData::Item.get(item).is_important?
if !pbConfirm(_INTL("Certainly. You want {1}. That will be ${2}. OK?",
itemname, price.to_s_formatted))
itemname, price.to_s_formatted))
next
end
quantity = 1
@@ -562,11 +564,12 @@ class PokemonMartScreen
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)
_INTL("{1}? Certainly. How many would you like?", itemname), item, maxafford
)
next if quantity == 0
price *= quantity
if !pbConfirm(_INTL("{1}, and you want {2}. That will be ${3}. OK?",
itemname, quantity, price.to_s_formatted))
itemname, quantity, price.to_s_formatted))
next
end
end
@@ -633,7 +636,8 @@ class PokemonMartScreen
@scene.pbShowMoney
if qty > 1
qty = @scene.pbChooseNumber(
_INTL("{1}? How many would you like to sell?", itemname), item, qty)
_INTL("{1}? How many would you like to sell?", itemname), item, qty
)
end
if qty == 0
@scene.pbHideMoney
@@ -669,9 +673,8 @@ def pbPokemonMart(stock, speech = nil, cantsell = false)
commands[cmdBuy = commands.length] = _INTL("Buy")
commands[cmdSell = commands.length] = _INTL("Sell") if !cantsell
commands[cmdQuit = commands.length] = _INTL("Quit")
cmd = pbMessage(
speech ? speech : _INTL("Welcome! How may I serve you?"),
commands, cmdQuit + 1)
cmd = pbMessage(speech ? speech : _INTL("Welcome! How may I serve you?"),
commands, cmdQuit + 1)
loop do
if cmdBuy >= 0 && cmd == cmdBuy
scene = PokemonMart_Scene.new
@@ -686,7 +689,7 @@ def pbPokemonMart(stock, speech = nil, cantsell = false)
break
end
cmd = pbMessage(_INTL("Is there anything else I can help you with?"),
commands, cmdQuit + 1)
commands, cmdQuit + 1)
end
$game_temp.clear_mart_prices
end

View File

@@ -105,7 +105,7 @@ class MoveRelearner_Scene
end
pbDrawImagePositions(overlay, imagepos)
drawTextEx(overlay, 272, 214, 230, 5, selMoveData.description,
Color.new(64, 64, 64), Color.new(176, 176, 176))
Color.new(64, 64, 64), Color.new(176, 176, 176))
end
# Processes the scene

View File

@@ -411,7 +411,8 @@ class PurifyChamberScreen
if @chamber.setCount(set) == 0 && @chamber.isPurifiableIgnoreRegular?(set)
pkmn = @chamber.getShadow(set)
@scene.pbDisplay(
_INTL("This {1} is ready to open its heart. However, there must be at least one regular Pokémon in the set to perform a purification ceremony.", pkmn.name))
_INTL("This {1} is ready to open its heart. However, there must be at least one regular Pokémon in the set to perform a purification ceremony.", pkmn.name)
)
end
end
@@ -447,7 +448,8 @@ class PurifyChamberScreen
commands.push(_INTL("CANCEL"))
choice = @scene.pbShowCommands(
_INTL("What shall I do with this {1}?",
heldpkmn ? heldpkmn.name : curpkmn.name), commands)
heldpkmn ? heldpkmn.name : curpkmn.name), commands
)
if choice == 0
if heldpkmn
if pbPlace(heldpkmn, cmd[1]) # calls place or shift as appropriate
@@ -664,7 +666,7 @@ class Window_PurifyChamberSets < Window_DrawableCommand
end
if @chamber.setCount(index) > 0
pbDrawGauge(self.contents, Rect.new(rect.x + 16, rect.y + 6, 48, 8),
Color.new(0, 0, 256), @chamber[index].tempo, PurifyChamber.maximumTempo)
Color.new(0, 0, 256), @chamber[index].tempo, PurifyChamber.maximumTempo)
end
if @chamber.getShadow(index)
pbDrawGauge(self.contents, Rect.new(rect.x + 16, rect.y + 18, 48, 8),
@@ -949,12 +951,12 @@ class PurifyChamberSetView < SpriteWrapper
if pkmn
if pkmn.types.length == 1
textpos.push([_INTL("{1} Lv.{2} {3}", pkmn.name, pkmn.level,
GameData::Type.get(pkmn.types[0]).name),
GameData::Type.get(pkmn.types[0]).name),
2, -6, 0, Color.new(248, 248, 248), Color.new(128, 128, 128)])
else
textpos.push([_INTL("{1} Lv.{2} {3}/{4}", pkmn.name, pkmn.level,
GameData::Type.get(pkmn.types[0]).name,
GameData::Type.get(pkmn.types[1]).name),
GameData::Type.get(pkmn.types[0]).name,
GameData::Type.get(pkmn.types[1]).name),
2, -6, 0, Color.new(248, 248, 248), Color.new(128, 128, 128)])
end
textpos.push([_INTL("FLOW"), 2 + @info.bitmap.width / 2, 18, 0,
@@ -964,15 +966,15 @@ class PurifyChamberSetView < SpriteWrapper
Color.new(192, 0, 256), pkmn.heart_gauge, pkmn.max_gauge_size)
# draw flow gauge
pbDrawGauge(@info.bitmap, Rect.new(@info.bitmap.width * 3 / 4, 24 + 8, @info.bitmap.width * 1 / 4, 8),
Color.new(0, 0, 248), @chamber.chamberFlow(@set), 6)
Color.new(0, 0, 248), @chamber.chamberFlow(@set), 6)
end
if @chamber.setCount(@set) > 0
textpos.push([_INTL("TEMPO"), 2, 18, 0,
Color.new(248, 248, 248), Color.new(128, 128, 128)])
# draw tempo gauge
pbDrawGauge(@info.bitmap, Rect.new(@info.bitmap.width * 1 / 4, 24 + 8, @info.bitmap.width * 1 / 4, 8),
Color.new(0, 0, 248), @chamber[@set].tempo,
PurifyChamber.maximumTempo)
Color.new(0, 0, 248), @chamber[@set].tempo,
PurifyChamber.maximumTempo)
end
pbDrawTextPositions(@info.bitmap, textpos)
@info.x = Graphics.width - @info.bitmap.width
@@ -1111,9 +1113,10 @@ class PurifyChamberScene
@viewportmsg = Viewport.new(0, 0, Graphics.width, Graphics.height)
@viewportmsg.z = 99999
addBackgroundOrColoredPlane(@sprites, "bg", "purifychamberbg",
Color.new(0, 0, 0), @viewport)
Color.new(0, 0, 0), @viewport)
@sprites["setwindow"] = Window_PurifyChamberSets.new(
@chamber, 0, 0, 112, Graphics.height, @viewport)
@chamber, 0, 0, 112, Graphics.height, @viewport
)
@sprites["setview"] = PurifyChamberSetView.new(@chamber, set, @viewport)
@sprites["msgwindow"] = Window_AdvancedTextPokemon.new("")
@sprites["msgwindow"].viewport = @viewportmsg

View File

@@ -23,7 +23,8 @@ def pbEditMysteryGift(type, item, id = 0, giftname = "")
commands.push(_INTL("[Custom]"))
loop do
command = pbMessage(
_INTL("Choose a phrase to be where the gift Pokémon was obtained from."), commands, -1)
_INTL("Choose a phrase to be where the gift Pokémon was obtained from."), commands, -1
)
if command < 0
return nil if pbConfirmMessage(_INTL("Stop editing this gift?"))
elsif command < commands.length - 1
@@ -45,7 +46,7 @@ def pbEditMysteryGift(type, item, id = 0, giftname = "")
params.setCancelValue(0)
loop do
newtype = pbMessageChooseNumber(_INTL("Choose a quantity of {1}.",
GameData::Item.get(item).name), params)
GameData::Item.get(item).name), params)
if newtype == 0
return nil if pbConfirmMessage(_INTL("Stop editing this gift?"))
else
@@ -400,7 +401,7 @@ def pbReceiveMysteryGift(id)
pbMessage(_INTL("\\me[Item get]You obtained some \\c[1]{1}\\c[0]!\\wtnp[30]", itemname))
elsif itm.is_machine? # TM or HM
pbMessage(_INTL("\\me[Item get]You obtained \\c[1]{1} {2}\\c[0]!\\wtnp[30]", itemname,
GameData::Move.get(itm.move).name))
GameData::Move.get(itm.move).name))
elsif qty > 1
pbMessage(_INTL("\\me[Item get]You obtained {1} \\c[1]{2}\\c[0]!\\wtnp[30]", qty, itemname))
elsif itemname.starts_with_vowel?

View File

@@ -50,16 +50,16 @@ class Window_CharacterEntry < Window_DrawableCommand
rect = drawCursor(index, rect)
if index == @charset.length # -1
pbDrawShadowText(self.contents, rect.x, rect.y, rect.width, rect.height, "[ ]",
self.baseColor, self.shadowColor)
self.baseColor, self.shadowColor)
elsif index == @charset.length + 1 # -2
pbDrawShadowText(self.contents, rect.x, rect.y, rect.width, rect.height, @othercharset,
self.baseColor, self.shadowColor)
self.baseColor, self.shadowColor)
elsif index == @charset.length + 2 # -3
pbDrawShadowText(self.contents, rect.x, rect.y, rect.width, rect.height, _INTL("OK"),
self.baseColor, self.shadowColor)
self.baseColor, self.shadowColor)
else
pbDrawShadowText(self.contents, rect.x, rect.y, rect.width, rect.height, @charset[index],
self.baseColor, self.shadowColor)
self.baseColor, self.shadowColor)
end
end
end
@@ -81,8 +81,9 @@ class PokemonEntryScene
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@viewport.z = 99999
if USEKEYBOARD
@sprites["entry"] = Window_TextEntry_Keyboard.new(initialText,
0, 0, 400 - 112, 96, helptext, true)
@sprites["entry"] = Window_TextEntry_Keyboard.new(
initialText, 0, 0, 400 - 112, 96, helptext, true
)
Input.text_input = true
else
@sprites["entry"] = Window_TextEntry.new(initialText, 0, 0, 400, 96, helptext, true)