Applied most Rubocop-suggested layout fixes

This commit is contained in:
Maruno17
2021-12-18 01:56:10 +00:00
parent 5dc64f1709
commit 2480ab0f9e
88 changed files with 839 additions and 783 deletions

View File

@@ -131,7 +131,7 @@ class HallOfFame_Scene
$PokemonGlobal.hallOfFame.push(@hallEntry)
$PokemonGlobal.hallOfFameLastNumber+=1
$PokemonGlobal.hallOfFame.delete_at(0) if HALLLIMIT>-1 &&
$PokemonGlobal.hallOfFame.size>HALLLIMIT
$PokemonGlobal.hallOfFame.size>HALLLIMIT
end
# Return the x/y point position in screen for battler index number
@@ -314,9 +314,9 @@ class HallOfFame_Scene
[dexnumber,32,Graphics.height-86,0,BASECOLOR,SHADOWCOLOR],
[pokename,Graphics.width-192,Graphics.height-86,2,BASECOLOR,SHADOWCOLOR],
[_INTL("Lv. {1}",pokemon.egg? ? "?" : pokemon.level),
64,Graphics.height-54,0,BASECOLOR,SHADOWCOLOR],
64,Graphics.height-54,0,BASECOLOR,SHADOWCOLOR],
[_INTL("IDNo.{1}",pokemon.egg? ? "?????" : idno),
Graphics.width-192,Graphics.height-54,2,BASECOLOR,SHADOWCOLOR]
Graphics.width-192,Graphics.height-54,2,BASECOLOR,SHADOWCOLOR]
]
if (hallNumber>-1)
textPositions.push([_INTL("Hall of Fame No."),Graphics.width/2-104,-6,0,BASECOLOR,SHADOWCOLOR])
@@ -329,7 +329,7 @@ class HallOfFame_Scene
overlay=@sprites["overlay"].bitmap
overlay.clear
pbDrawTextPositions(overlay,[[_INTL("Welcome to the Hall of Fame!"),
Graphics.width/2,Graphics.height-80,2,BASECOLOR,SHADOWCOLOR]])
Graphics.width/2,Graphics.height-80,2,BASECOLOR,SHADOWCOLOR]])
end
def pbAnimationLoop

View File

@@ -715,7 +715,7 @@ class PokemonPokedex_Scene
end
if mode!=0
textpos.push([(mode==1) ? "-" : "----",
xstart+halfwidth+(cols-1)*xgap,ystart+6+(cmds.length/cols).floor*ygap,2,base,shadow,1])
xstart+halfwidth+(cols-1)*xgap,ystart+6+(cmds.length/cols).floor*ygap,2,base,shadow,1])
end
when 2 # Type
typerect = Rect.new(0,0,96,32)
@@ -724,7 +724,7 @@ class PokemonPokedex_Scene
overlay.blt(xstart+14+(i%cols)*xgap,ystart+6+(i/cols).floor*ygap,@typebitmap.bitmap,typerect)
end
textpos.push(["----",
xstart+halfwidth+(cols-1)*xgap,ystart+6+(cmds.length/cols).floor*ygap,2,base,shadow,1])
xstart+halfwidth+(cols-1)*xgap,ystart+6+(cmds.length/cols).floor*ygap,2,base,shadow,1])
when 5 # Color
for i in 0...cmds.length
x = xstart+halfwidth+(i%cols)*xgap
@@ -732,7 +732,7 @@ class PokemonPokedex_Scene
textpos.push([cmds[i].name,x,y,2,base,shadow,1])
end
textpos.push(["----",
xstart+halfwidth+(cols-1)*xgap,ystart+6+(cmds.length/cols).floor*ygap,2,base,shadow,1])
xstart+halfwidth+(cols-1)*xgap,ystart+6+(cmds.length/cols).floor*ygap,2,base,shadow,1])
when 6 # Shape
shaperect = Rect.new(0, 0, 60, 60)
for i in 0...cmds.length
@@ -1085,11 +1085,11 @@ class PokemonPokedex_Scene
@orderCommands[MODETALLEST] = _INTL("Tallest")
@orderCommands[MODESMALLEST] = _INTL("Smallest")
@nameCommands = [_INTL("A"),_INTL("B"),_INTL("C"),_INTL("D"),_INTL("E"),
_INTL("F"),_INTL("G"),_INTL("H"),_INTL("I"),_INTL("J"),
_INTL("K"),_INTL("L"),_INTL("M"),_INTL("N"),_INTL("O"),
_INTL("P"),_INTL("Q"),_INTL("R"),_INTL("S"),_INTL("T"),
_INTL("U"),_INTL("V"),_INTL("W"),_INTL("X"),_INTL("Y"),
_INTL("Z")]
_INTL("F"),_INTL("G"),_INTL("H"),_INTL("I"),_INTL("J"),
_INTL("K"),_INTL("L"),_INTL("M"),_INTL("N"),_INTL("O"),
_INTL("P"),_INTL("Q"),_INTL("R"),_INTL("S"),_INTL("T"),
_INTL("U"),_INTL("V"),_INTL("W"),_INTL("X"),_INTL("Y"),
_INTL("Z")]
@typeCommands = []
GameData::Type.each { |t| @typeCommands.push(t) if !t.pseudo_type }
@heightCommands = [1,2,3,4,5,6,7,8,9,10,

View File

@@ -30,8 +30,8 @@ class PokemonPokedexInfo_Scene
if hidden[0]==@region && hidden[1]>0 && $game_switches[hidden[1]]
pbDrawImagePositions(@sprites["areamap"].bitmap,[
["Graphics/Pictures/#{hidden[4]}",
hidden[2]*PokemonRegionMap_Scene::SQUARE_WIDTH,
hidden[3]*PokemonRegionMap_Scene::SQUARE_HEIGHT]
hidden[2]*PokemonRegionMap_Scene::SQUARE_WIDTH,
hidden[3]*PokemonRegionMap_Scene::SQUARE_HEIGHT]
])
end
end
@@ -219,7 +219,7 @@ class PokemonPokedexInfo_Scene
end
textpos = [
[_INTL("{1}{2} {3}", indexText, " ", species_data.name),
246, 36, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)]
246, 36, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)]
]
if @show_battled_count
textpos.push([_INTL("Number Battled"), 314, 152, 0, base, shadow])
@@ -364,7 +364,7 @@ class PokemonPokedexInfo_Scene
end
textpos.push([pbGetMessage(MessageTypes::RegionNames,@region),414,38,2,base,shadow])
textpos.push([_INTL("{1}'s area",GameData::Species.get(@species).name),
Graphics.width/2,346,2,base,shadow])
Graphics.width/2,346,2,base,shadow])
pbDrawTextPositions(overlay,textpos)
end

View File

@@ -405,15 +405,17 @@ class PokemonPartyPanel < SpriteWrapper
end
# Draw shiny icon
if @pokemon.shiny?
pbDrawImagePositions(@overlaysprite.bitmap,[[
"Graphics/Pictures/shiny",80,48,0,0,16,16]])
pbDrawImagePositions(@overlaysprite.bitmap,
[["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]])
pbDrawImagePositions(@overlaysprite.bitmap,
[["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]

View File

@@ -262,24 +262,24 @@ class PokemonSummary_Scene
def pbShowCommands(commands,index=0)
ret = -1
using(cmdwindow = Window_CommandPokemon.new(commands)) {
cmdwindow.z = @viewport.z+1
cmdwindow.index = index
pbBottomRight(cmdwindow)
loop do
Graphics.update
Input.update
cmdwindow.update
pbUpdate
if Input.trigger?(Input::BACK)
pbPlayCancelSE
ret = -1
break
elsif Input.trigger?(Input::USE)
pbPlayDecisionSE
ret = cmdwindow.index
break
end
end
cmdwindow.z = @viewport.z+1
cmdwindow.index = index
pbBottomRight(cmdwindow)
loop do
Graphics.update
Input.update
cmdwindow.update
pbUpdate
if Input.trigger?(Input::BACK)
pbPlayCancelSE
ret = -1
break
elsif Input.trigger?(Input::USE)
pbPlayDecisionSE
ret = cmdwindow.index
break
end
end
}
return ret
end
@@ -556,8 +556,7 @@ class PokemonSummary_Scene
_INTL("Egg received."),
_INTL("Traded at Lv. {1}.",@pokemon.obtain_level),
"",
_INTL("Had a fateful encounter at Lv. {1}.",@pokemon.obtain_level)
][@pokemon.obtain_method]
_INTL("Had a fateful encounter at Lv. {1}.",@pokemon.obtain_level)][@pokemon.obtain_method]
memo += sprintf("<c3=404040,B0B0B0>%s\n",mettext) if mettext && mettext!=""
# If Pokémon was hatched, write when and where it hatched
if @pokemon.obtain_method == 1
@@ -849,8 +848,8 @@ class PokemonSummary_Scene
ribbon_data = GameData::Ribbon.get(@pokemon.ribbons[i])
ribn = ribbon_data.icon_position
imagepos.push(["Graphics/Pictures/ribbons",
230 + 68 * (coord % 4), 78 + 68 * (coord / 4).floor,
64 * (ribn % 8), 64 * (ribn / 8).floor, 64, 64])
230 + 68 * (coord % 4), 78 + 68 * (coord / 4).floor,
64 * (ribn % 8), 64 * (ribn / 8).floor, 64, 64])
coord += 1
end
# Draw all images

View File

@@ -99,7 +99,7 @@ class Window_PokemonBag < Window_DrawableCommand
end
def refresh
@item_max = itemCount()
@item_max = itemCount
self.update_cursor_rect
dwidth = self.width-self.borderX
dheight = self.height-self.borderY
@@ -320,7 +320,7 @@ class PokemonBag_Scene
@sprites["itemicon"].item = itemlist.item
# Set the selected item's description
@sprites["itemtext"].text =
(itemlist.item) ? GameData::Item.get(itemlist.item).description : _INTL("Close bag.")
(itemlist.item) ? GameData::Item.get(itemlist.item).description : _INTL("Close bag.")
end
def pbRefreshFilter

View File

@@ -78,10 +78,10 @@ class ReadyMenuButton < SpriteWrapper
qty = $bag.quantity(@command[0])
if qty>99
textpos.push([_INTL(">99"),230,16,1,
Color.new(248,248,248),Color.new(40,40,40),1])
Color.new(248,248,248),Color.new(40,40,40),1])
else
textpos.push([_INTL("x{1}",qty),230,16,1,
Color.new(248,248,248),Color.new(40,40,40),1])
Color.new(248,248,248),Color.new(40,40,40),1])
end
end
end

View File

@@ -564,6 +564,7 @@ end
#===============================================================================
class PokemonStorageScene
attr_reader :quickswap
MARK_WIDTH = 16
MARK_HEIGHT = 16

View File

@@ -38,13 +38,13 @@ class StorageSystemPC
loop do
command = pbShowCommandsWithHelp(nil,
[_INTL("Organize Boxes"),
_INTL("Withdraw Pokémon"),
_INTL("Deposit Pokémon"),
_INTL("See ya!")],
_INTL("Withdraw Pokémon"),
_INTL("Deposit Pokémon"),
_INTL("See ya!")],
[_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("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
)
if command>=0 && command<3
if command==1 # Withdraw
@@ -116,13 +116,13 @@ def pbPCItemStorage
loop do
command = pbShowCommandsWithHelp(nil,
[_INTL("Withdraw Item"),
_INTL("Deposit Item"),
_INTL("Toss Item"),
_INTL("Exit")],
_INTL("Deposit Item"),
_INTL("Toss Item"),
_INTL("Exit")],
[_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("Store items in the PC."),
_INTL("Throw away items stored in the PC."),
_INTL("Go back to the previous menu.")],-1,command
)
case command
when 0 # Withdraw Item

View File

@@ -185,7 +185,7 @@ class PokemonMart_Scene
itemwindow = @sprites["itemwindow"]
@sprites["icon"].item = itemwindow.item
@sprites["itemtextwindow"].text =
(itemwindow.item) ? @adapter.getDescription(itemwindow.item) : _INTL("Quit shopping.")
(itemwindow.item) ? @adapter.getDescription(itemwindow.item) : _INTL("Quit shopping.")
itemwindow.refresh
end
@sprites["moneywindow"].text = _INTL("Money:\r\n<r>{1}", @adapter.getMoneyString)
@@ -491,7 +491,7 @@ class PokemonMart_Scene
if itemwindow.item != olditem
@sprites["icon"].item = itemwindow.item
@sprites["itemtextwindow"].text =
(itemwindow.item) ? @adapter.getDescription(itemwindow.item) : _INTL("Quit shopping.")
(itemwindow.item) ? @adapter.getDescription(itemwindow.item) : _INTL("Quit shopping.")
end
if Input.trigger?(Input::BACK)
pbPlayCloseMenuSE

View File

@@ -73,7 +73,7 @@ class MoveRelearner_Scene
if moveData.total_pp>0
textpos.push([_INTL("PP"),112,yPos+32,0,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push([_INTL("{1}/{1}",moveData.total_pp),230,yPos+32,1,
Color.new(64,64,64),Color.new(176,176,176)])
Color.new(64,64,64),Color.new(176,176,176)])
else
textpos.push(["-",80,yPos,0,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push(["--",228,yPos+32,1,Color.new(64,64,64),Color.new(176,176,176)])
@@ -82,8 +82,8 @@ class MoveRelearner_Scene
yPos+=64
end
imagepos.push(["Graphics/Pictures/reminderSel",
0,78+(@sprites["commands"].index-@sprites["commands"].top_item)*64,
0,0,258,72])
0,78+(@sprites["commands"].index-@sprites["commands"].top_item)*64,
0,0,258,72])
selMoveData=GameData::Move.get(@moves[@sprites["commands"].index])
basedamage = selMoveData.display_damage(@pokemon)
category = selMoveData.display_category(@pokemon)
@@ -91,10 +91,10 @@ class MoveRelearner_Scene
textpos.push([_INTL("CATEGORY"),272,108,0,Color.new(248,248,248),Color.new(0,0,0)])
textpos.push([_INTL("POWER"),272,140,0,Color.new(248,248,248),Color.new(0,0,0)])
textpos.push([basedamage<=1 ? basedamage==1 ? "???" : "---" : sprintf("%d",basedamage),
468,140,2,Color.new(64,64,64),Color.new(176,176,176)])
468,140,2,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push([_INTL("ACCURACY"),272,172,0,Color.new(248,248,248),Color.new(0,0,0)])
textpos.push([accuracy==0 ? "---" : "#{accuracy}%",
468,172,2,Color.new(64,64,64),Color.new(176,176,176)])
468,172,2,Color.new(64,64,64),Color.new(176,176,176)])
pbDrawTextPositions(overlay,textpos)
imagepos.push(["Graphics/Pictures/category",436,116,0,category*28,64,28])
if @sprites["commands"].index<@moves.length-1

View File

@@ -17,7 +17,7 @@ class PokemonGlobalMetadata
attr_writer :purifyChamber
def purifyChamber
@purifyChamber = PurifyChamber.new() if !@purifyChamber
@purifyChamber = PurifyChamber.new if !@purifyChamber
return @purifyChamber
end
end
@@ -157,10 +157,11 @@ end
class PurifyChamber
attr_reader :sets
attr_reader :currentSet
NUMSETS = 9
SETSIZE = 4
def self.maximumTempo() # Calculates the maximum possible tempo
def self.maximumTempo # Calculates the maximum possible tempo
x=SETSIZE+1
return ((x*x+x)/2)-1
end
@@ -233,7 +234,7 @@ class PurifyChamber
return false if shadow.heart_gauge != 0
# Define an exception for Lugia
if shadow.isSpecies?(:LUGIA)
maxtempo=PurifyChamber.maximumTempo()
maxtempo=PurifyChamber.maximumTempo
for i in 0...NUMSETS
return false if @sets[i].tempo!=maxtempo
end
@@ -423,13 +424,13 @@ class PurifyChamberScreen
# array[0]==0 - a position was chosen
# array[0]==1 - a new set was chosen
# array[0]==2 - choose Pokemon command
cmd=@scene.pbSetScreen()
cmd=@scene.pbSetScreen
if cmd[0]==0
# Place Pokemon in the set
curpkmn=PurifyChamberHelper.pbGetPokemon(@chamber,cmd[1])
if curpkmn || heldpkmn
commands=[_INTL("MOVE"),_INTL("SUMMARY"),
_INTL("WITHDRAW")]
_INTL("WITHDRAW")]
if curpkmn && heldpkmn
commands[0]=_INTL("EXCHANGE")
elsif heldpkmn
@@ -519,7 +520,7 @@ class PurifyChamberScreen
@scene.pbChangeSet(cmd[1])
chamber.currentSet=cmd[1]
elsif cmd[0]==2 # Choose a Pokemon
pos=@scene.pbChoosePokemon()
pos=@scene.pbChoosePokemon
pkmn=pos ? $PokemonStorage[pos[0],pos[1]] : nil
heldpkmn=pkmn if pkmn
else # cancel
@@ -532,13 +533,13 @@ class PurifyChamberScreen
end
end
end
if pbCheckPurify()
if pbCheckPurify
@scene.pbDisplay(_INTL("There is a Pokémon that is ready to open its heart!\1"))
@scene.pbCloseSetDetail()
pbDoPurify()
@scene.pbCloseSetDetail
pbDoPurify
return false
else
@scene.pbCloseSetDetail()
@scene.pbCloseSetDetail
return true
end
end
@@ -576,27 +577,27 @@ class PurifyChamberScreen
set=purifiables[i]
@chamber.currentSet=set
@scene.pbOpenSet(set)
@scene.pbPurify()
@scene.pbPurify
pbPurify(@chamber[set].shadow,self)
pbStorePokemon(@chamber[set].shadow)
@chamber.setShadow(set,nil) # Remove shadow Pokemon from set
if (i+1)!=purifiables.length
@scene.pbDisplay(_INTL("There is another Pokémon that is ready to open its heart!"))
if !@scene.pbConfirm("Would you like to switch sets?")
@scene.pbCloseSet()
@scene.pbCloseSet
break
end
end
@scene.pbCloseSet()
@scene.pbCloseSet
end
end
def pbStartPurify
chamber=@chamber
@scene.pbStart(chamber)
if pbCheckPurify()
pbDoPurify()
@scene.pbEnd()
if pbCheckPurify
pbDoPurify
@scene.pbEnd
return
end
@scene.pbOpenSet(chamber.currentSet)
@@ -609,23 +610,24 @@ class PurifyChamberScreen
else
chamber.currentSet=set
cmd=@scene.pbShowCommands(
_INTL("What do you want to do?"),[
_INTL("EDIT"),_INTL("SWITCH"),_INTL("CANCEL")])
if cmd==0 # edit
if !pbOpenSetDetail()
_INTL("What do you want to do?"),
[_INTL("EDIT"), _INTL("SWITCH"), _INTL("CANCEL")]
)
if cmd==0 # edit
if !pbOpenSetDetail
break
end
elsif cmd==1 # switch
elsif cmd==1 # switch
chamber.currentSet=set
newSet=@scene.pbSwitch(set)
chamber.switch(set,newSet)
chamber.currentSet=newSet
@scene.pbRefresh()
@scene.pbRefresh
end
end
end
@scene.pbCloseSet()
@scene.pbEnd()
@scene.pbCloseSet
@scene.pbEnd
end
end
@@ -655,14 +657,14 @@ class Window_PurifyChamberSets < Window_DrawableCommand
rect=drawCursor(index,rect)
if index==@switching
textpos.push([(index+1).to_s,rect.x,
rect.y-6,false,Color.new(248,0,0),self.shadowColor])
rect.y-6,false,Color.new(248,0,0),self.shadowColor])
else
textpos.push([(index+1).to_s,rect.x,
rect.y-6,false,self.baseColor,self.shadowColor])
rect.y-6,false,self.baseColor,self.shadowColor])
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),
@@ -792,7 +794,7 @@ class FlowDiagram
def withinRange(angle,startAngle,endAngle)
if startAngle>endAngle
return (angle>=startAngle || angle<=endAngle) &&
(angle>=0 && angle<=360)
(angle>=0 && angle<=360)
else
return (angle>=startAngle && angle<=endAngle)
end
@@ -822,7 +824,7 @@ class FlowDiagram
def color=(value)
for point in @points
point.color=value
point.color=value
end
end
@@ -867,7 +869,7 @@ class PurifyChamberSetView < SpriteWrapper
refresh
end
def refreshFlows()
def refreshFlows
for flow in @flows
flow.setFlowStrength(0)
end
@@ -947,15 +949,15 @@ class PurifyChamberSetView < SpriteWrapper
if pkmn.types.length == 1
textpos.push([_INTL("{1} Lv.{2} {3}", pkmn.name, pkmn.level,
GameData::Type.get(pkmn.types[0]).name),
2, -6, 0, Color.new(248, 248, 248), Color.new(128, 128, 128)])
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),
2, -6, 0, Color.new(248, 248, 248), Color.new(128, 128, 128)])
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,
Color.new(248,248,248),Color.new(128,128,128)])
Color.new(248,248,248),Color.new(128,128,128)])
# draw heart gauge
pbDrawGauge(@info.bitmap, Rect.new(@info.bitmap.width*3/4,8,@info.bitmap.width*1/4,8),
Color.new(192,0,256), pkmn.heart_gauge, pkmn.max_gauge_size)
@@ -965,11 +967,11 @@ class PurifyChamberSetView < SpriteWrapper
end
if @chamber.setCount(@set)>0
textpos.push([_INTL("TEMPO"),2,18,0,
Color.new(248,248,248),Color.new(128,128,128)])
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())
PurifyChamber.maximumTempo)
end
pbDrawTextPositions(@info.bitmap,textpos)
@info.x=Graphics.width-@info.bitmap.width
@@ -983,7 +985,7 @@ class PurifyChamberSetView < SpriteWrapper
checkCursor(0)
points=[@chamber.setCount(@set)*2,1].max
setList=@chamber.setList(@set)
refreshFlows()
refreshFlows
for i in 0...PurifyChamber::SETSIZE*2
pkmn=(i%2==1 || i>=points) ? nil : setList[i/2]
angle=360-(i*360/points)
@@ -1083,11 +1085,11 @@ end
#
#===============================================================================
class PurifyChamberScene
def pbUpdate()
def pbUpdate
pbUpdateSpriteHash(@sprites)
end
def pbRefresh()
def pbRefresh
if @sprites["setview"]
@sprites["setview"].refresh
@sprites["setwindow"].refresh
@@ -1098,7 +1100,7 @@ class PurifyChamberScene
@chamber=chamber
end
def pbEnd()
def pbEnd
end
def pbOpenSet(set)
@@ -1120,7 +1122,7 @@ class PurifyChamberScene
pbFadeInAndShow(@sprites) { pbUpdate }
end
def pbCloseSet()
def pbCloseSet
pbFadeOutAndHide(@sprites) { pbUpdate }
pbDisposeSpriteHash(@sprites)
@viewport.dispose
@@ -1133,20 +1135,20 @@ class PurifyChamberScene
@sprites["setview"].cursor=0
end
def pbCloseSetDetail()
def pbCloseSetDetail
end
def pbPurify()
def pbPurify
pbRefresh
end
def pbMove(_pos)
@sprites["setview"].heldpkmn=@sprites["setview"].getCurrent()
@sprites["setview"].heldpkmn=@sprites["setview"].getCurrent
pbRefresh
end
def pbShift(_pos,_heldpoke)
@sprites["setview"].heldpkmn=@sprites["setview"].getCurrent()
@sprites["setview"].heldpkmn=@sprites["setview"].getCurrent
pbRefresh
end
@@ -1191,29 +1193,29 @@ class PurifyChamberScene
btn=Input::RIGHT if Input.repeat?(Input::RIGHT)
btn=Input::LEFT if Input.repeat?(Input::LEFT)
if btn!=0
pbPlayCursorSE()
pbPlayCursorSE
@sprites["setview"].moveCursor(btn)
end
if Input.repeat?(Input::JUMPUP)
nextset=(@sprites["setview"].set==0) ? PurifyChamber::NUMSETS-1 : @sprites["setview"].set-1
pbPlayCursorSE()
pbPlayCursorSE
return [1,nextset]
elsif Input.repeat?(Input::JUMPDOWN)
nextset=(@sprites["setview"].set==PurifyChamber::NUMSETS-1) ? 0 : @sprites["setview"].set+1
pbPlayCursorSE()
pbPlayCursorSE
return [1,nextset]
elsif Input.trigger?(Input::USE)
pbPlayDecisionSE()
pbPlayDecisionSE
return [0,@sprites["setview"].cursor]
elsif Input.trigger?(Input::BACK)
pbPlayCancelSE()
pbPlayCancelSE
return [3,0]
end
end
}
end
def pbChooseSet()
def pbChooseSet
pbActivateWindow(@sprites,"setwindow") {
oldindex=@sprites["setwindow"].index
loop do
@@ -1225,11 +1227,11 @@ class PurifyChamberScene
Input.update
pbUpdate
if Input.trigger?(Input::USE)
pbPlayDecisionSE()
pbPlayDecisionSE
return @sprites["setwindow"].index
end
if Input.trigger?(Input::BACK)
pbPlayCancelSE()
pbPlayCancelSE
return -1
end
end
@@ -1238,7 +1240,7 @@ class PurifyChamberScene
def pbSwitch(set)
@sprites["setwindow"].switching=set
ret=pbChooseSet()
ret=pbChooseSet
@sprites["setwindow"].switching=-1
return ret<0 ? set : ret
end
@@ -1285,11 +1287,11 @@ class PurifyChamberScene
pbRefresh
end
def pbChoosePokemon()
def pbChoosePokemon
visible=pbFadeOutAndHide(@sprites)
scene=PokemonStorageScene.new()
scene=PokemonStorageScene.new
screen=PokemonStorageScreen.new(scene,$PokemonStorage)
pos=screen.pbChoosePokemon()
pos=screen.pbChoosePokemon
pbRefresh
pbFadeInAndShow(@sprites,visible)
return pos
@@ -1322,7 +1324,7 @@ class PurifyChamberPC
def access
pbMessage(_INTL("\\se[PC access]Accessed the Purify Chamber."))
pbPurifyChamber()
pbPurifyChamber
end
end

View File

@@ -389,7 +389,7 @@ class PokemonEntryScene2
for x in 0...ROWS
pos = y * ROWS + x
textPos.push([@@Characters[i][0][pos], 44 + x * 32, 12 + y * 38, 2,
Color.new(16, 24, 32), Color.new(160, 160, 160)])
Color.new(16, 24, 32), Color.new(160, 160, 160)])
end
end
pbDrawTextPositions(b, textPos)
@@ -773,15 +773,15 @@ def pbEnterText(helptext,minlength,maxlength,initialText="",mode=0,pokemon=nil,n
ret=""
if ($PokemonSystem.textinput==1 rescue false) # Keyboard
pbFadeOutIn(99999,nofadeout) {
sscene=PokemonEntryScene.new
sscreen=PokemonEntry.new(sscene)
ret=sscreen.pbStartScreen(helptext,minlength,maxlength,initialText,mode,pokemon)
sscene=PokemonEntryScene.new
sscreen=PokemonEntry.new(sscene)
ret=sscreen.pbStartScreen(helptext,minlength,maxlength,initialText,mode,pokemon)
}
else # Cursor
pbFadeOutIn(99999,nofadeout) {
sscene=PokemonEntryScene2.new
sscreen=PokemonEntry.new(sscene)
ret=sscreen.pbStartScreen(helptext,minlength,maxlength,initialText,mode,pokemon)
sscene=PokemonEntryScene2.new
sscreen=PokemonEntry.new(sscene)
ret=sscreen.pbStartScreen(helptext,minlength,maxlength,initialText,mode,pokemon)
}
end
return ret