The Great Enspacening begins!

This commit is contained in:
Maruno17
2021-12-18 12:20:31 +00:00
parent 2480ab0f9e
commit f7b76ae62e
138 changed files with 567 additions and 567 deletions

View File

@@ -123,7 +123,7 @@ class PokemonEggHatch_Scene
@sprites["hatch"].src_rect.x = index*@sprites["hatch"].src_rect.width
end
def swingEgg(speed,swingTimes=1)
def swingEgg(speed,swingTimes = 1)
@sprites["hatch"].visible = true
speed = speed.to_f*20/Graphics.frame_rate
amplitude = 8
@@ -147,7 +147,7 @@ class PokemonEggHatch_Scene
@sprites["hatch"].x = @sprites["pokemon"].x
end
def updateScene(frames=1) # Can be used for "wait" effect
def updateScene(frames = 1) # Can be used for "wait" effect
frames.times do
Graphics.update
Input.update

View File

@@ -31,7 +31,7 @@ class SpriteMetafile
return @metafile[i]
end
def initialize(viewport=nil)
def initialize(viewport = nil)
@metafile=[]
@values=[
viewport,
@@ -230,7 +230,7 @@ end
#
#===============================================================================
class SpriteMetafilePlayer
def initialize(metafile,sprite=nil)
def initialize(metafile,sprite = nil)
@metafile=metafile
@sprites=[]
@playing=false
@@ -411,7 +411,7 @@ class PokemonEvolutionScene
public
def pbUpdate(animating=false)
def pbUpdate(animating = false)
if animating # Pokémon shouldn't animate during the evolution animation
@sprites["background"].update
else
@@ -526,7 +526,7 @@ class PokemonEvolutionScene
end
# Opens the evolution screen
def pbEvolution(cancancel=true)
def pbEvolution(cancancel = true)
metaplayer1 = SpriteMetafilePlayer.new(@metafile1,@sprites["rsprite1"])
metaplayer2 = SpriteMetafilePlayer.new(@metafile2,@sprites["rsprite2"])
metaplayer1.play

View File

@@ -197,7 +197,7 @@ end
#===============================================================================
#
#===============================================================================
def pbStartTrade(pokemonIndex,newpoke,nickname,trainerName,trainerGender=0)
def pbStartTrade(pokemonIndex,newpoke,nickname,trainerName,trainerGender = 0)
$stats.trade_count += 1
myPokemon = $player.party[pokemonIndex]
yourPokemon = nil

View File

@@ -116,7 +116,7 @@ class HallOfFame_Scene
end
# Change the pokémon sprites opacity except the index one
def setPokemonSpritesOpacity(index,opacity=255)
def setPokemonSpritesOpacity(index,opacity = 255)
for n in 0...@hallEntry.size
@sprites["pokemon#{n}"].opacity=(n==index) ? 255 : opacity if @sprites["pokemon#{n}"]
end
@@ -199,7 +199,7 @@ class HallOfFame_Scene
end
end
def createBattlers(hide=true)
def createBattlers(hide = true)
# Movement in animation
for i in 0...6
# Clear all 6 pokémon sprites and dispose the ones that exists every time
@@ -292,7 +292,7 @@ class HallOfFame_Scene
_INTL("League champion!\nCongratulations!\\^"))
end
def writePokemonData(pokemon,hallNumber=-1)
def writePokemonData(pokemon,hallNumber = -1)
overlay=@sprites["overlay"].bitmap
overlay.clear
pokename=pokemon.name

View File

@@ -80,7 +80,7 @@ class PokedexSearchSelectionSprite < SpriteWrapper
attr_accessor :cmds
attr_accessor :minmax
def initialize(viewport=nil)
def initialize(viewport = nil)
super(viewport)
@selbitmap = AnimatedBitmap.new("Graphics/Pictures/Pokedex/cursor_search")
self.bitmap = @selbitmap.bitmap
@@ -369,7 +369,7 @@ class PokemonPokedex_Scene
return ret
end
def pbRefreshDexList(index=0)
def pbRefreshDexList(index = 0)
dexlist = pbGetDexList
case $PokemonGlobal.pokedexMode
when MODENUMERICAL

View File

@@ -4,7 +4,7 @@
class PokemonPartyConfirmCancelSprite < SpriteWrapper
attr_reader :selected
def initialize(text,x,y,narrowbox=false,viewport=nil)
def initialize(text,x,y,narrowbox = false,viewport = nil)
super(viewport)
@refreshBitmap = true
@bgsprite = ChangelingSprite.new(0,0,viewport)
@@ -79,7 +79,7 @@ end
#
#===============================================================================
class PokemonPartyCancelSprite < PokemonPartyConfirmCancelSprite
def initialize(viewport=nil)
def initialize(viewport = nil)
super(_INTL("CANCEL"),398,328,false,viewport)
end
end
@@ -88,7 +88,7 @@ end
#
#===============================================================================
class PokemonPartyConfirmSprite < PokemonPartyConfirmCancelSprite
def initialize(viewport=nil)
def initialize(viewport = nil)
super(_INTL("CONFIRM"),398,308,true,viewport)
end
end
@@ -97,7 +97,7 @@ end
#
#===============================================================================
class PokemonPartyCancelSprite2 < PokemonPartyConfirmCancelSprite
def initialize(viewport=nil)
def initialize(viewport = nil)
super(_INTL("CANCEL"),398,346,true,viewport)
end
end
@@ -106,7 +106,7 @@ end
#
#===============================================================================
class Window_CommandPokemonColor < Window_CommandPokemon
def initialize(commands,width=nil)
def initialize(commands,width = nil)
@colorKey = []
for i in 0...commands.length
if commands[i].is_a?(Array)
@@ -137,7 +137,7 @@ end
class PokemonPartyBlankPanel < SpriteWrapper
attr_accessor :text
def initialize(_pokemon,index,viewport=nil)
def initialize(_pokemon,index,viewport = nil)
super(viewport)
self.x = (index % 2) * Graphics.width / 2
self.y = 16 * (index % 2) + 96 * (index / 2)
@@ -171,7 +171,7 @@ class PokemonPartyPanel < SpriteWrapper
attr_reader :switching
attr_reader :text
def initialize(pokemon,index,viewport=nil)
def initialize(pokemon,index,viewport = nil)
super(viewport)
@pokemon = pokemon
@active = (index==0) # true = rounded panel, false = rectangular panel
@@ -557,7 +557,7 @@ class PokemonParty_Scene
return ret
end
def pbShowCommands(helptext,commands,index=0)
def pbShowCommands(helptext,commands,index = 0)
ret = -1
helpwindow = @sprites["helpwindow"]
helpwindow.visible = true
@@ -665,7 +665,7 @@ class PokemonParty_Scene
end
end
def pbSummary(pkmnid,inbattle=false)
def pbSummary(pkmnid,inbattle = false)
oldsprites = pbFadeOutAndHide(@sprites)
scene = PokemonSummary_Scene.new
screen = PokemonSummaryScreen.new(scene,inbattle)
@@ -704,7 +704,7 @@ class PokemonParty_Scene
return ret
end
def pbChoosePokemon(switching=false,initialsel=-1,canswitch=0)
def pbChoosePokemon(switching = false,initialsel = -1,canswitch = 0)
for i in 0...Settings::MAX_PARTY_SIZE
@sprites["pokemon#{i}"].preselected = (switching && i==@activecmd)
@sprites["pokemon#{i}"].switching = switching
@@ -873,11 +873,11 @@ class PokemonPartyScreen
@party = party
end
def pbStartScene(helptext,_numBattlersOut,annotations=nil)
def pbStartScene(helptext,_numBattlersOut,annotations = nil)
@scene.pbStartScene(@party,helptext,annotations)
end
def pbChoosePokemon(helptext=nil)
def pbChoosePokemon(helptext = nil)
@scene.pbSetHelpText(helptext) if helptext
return @scene.pbChoosePokemon
end
@@ -942,7 +942,7 @@ class PokemonPartyScreen
return @scene.pbDisplayConfirm(text)
end
def pbShowCommands(helptext,commands,index=0)
def pbShowCommands(helptext,commands,index = 0)
return @scene.pbShowCommands(helptext,commands,index)
end
@@ -977,7 +977,7 @@ class PokemonPartyScreen
end
end
def pbChooseMove(pokemon,helptext,index=0)
def pbChooseMove(pokemon,helptext,index = 0)
movenames = []
for i in pokemon.moves
next if !i || !i.id
@@ -1096,7 +1096,7 @@ class PokemonPartyScreen
return ret
end
def pbChooseAblePokemon(ableProc,allowIneligible=false)
def pbChooseAblePokemon(ableProc,allowIneligible = false)
annot = []
eligibility = []
for pkmn in @party
@@ -1123,7 +1123,7 @@ class PokemonPartyScreen
return ret
end
def pbChooseTradablePokemon(ableProc,allowIneligible=false)
def pbChooseTradablePokemon(ableProc,allowIneligible = false)
annot = []
eligibility = []
for pkmn in @party
@@ -1390,7 +1390,7 @@ end
# Choose a Pokémon/egg from the party.
# Stores result in variable _variableNumber_ and the chosen Pokémon's name in
# variable _nameVarNumber_; result is -1 if no Pokémon was chosen
def pbChoosePokemon(variableNumber,nameVarNumber,ableProc=nil,allowIneligible=false)
def pbChoosePokemon(variableNumber,nameVarNumber,ableProc = nil,allowIneligible = false)
chosen = 0
pbFadeOutIn {
scene = PokemonParty_Scene.new
@@ -1420,7 +1420,7 @@ def pbChooseAblePokemon(variableNumber,nameVarNumber)
end
# Same as pbChoosePokemon, but prevents choosing an egg or a Shadow Pokémon.
def pbChooseTradablePokemon(variableNumber,nameVarNumber,ableProc=nil,allowIneligible=false)
def pbChooseTradablePokemon(variableNumber,nameVarNumber,ableProc = nil,allowIneligible = false)
chosen = 0
pbFadeOutIn {
scene = PokemonParty_Scene.new

View File

@@ -5,7 +5,7 @@ class MoveSelectionSprite < SpriteWrapper
attr_reader :preselected
attr_reader :index
def initialize(viewport=nil,fifthmove=false)
def initialize(viewport = nil,fifthmove = false)
super(viewport)
@movesel = AnimatedBitmap.new("Graphics/Pictures/Summary/cursor_move")
@frame = 0
@@ -59,7 +59,7 @@ end
#
#===============================================================================
class RibbonSelectionSprite < MoveSelectionSprite
def initialize(viewport=nil)
def initialize(viewport = nil)
super(viewport)
@movesel = AnimatedBitmap.new("Graphics/Pictures/Summary/cursor_ribbon")
@frame = 0
@@ -109,7 +109,7 @@ class PokemonSummary_Scene
pbUpdateSpriteHash(@sprites)
end
def pbStartScene(party,partyindex,inbattle=false)
def pbStartScene(party,partyindex,inbattle = false)
@viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z = 99999
@party = party
@@ -259,7 +259,7 @@ class PokemonSummary_Scene
return ret
end
def pbShowCommands(commands,index=0)
def pbShowCommands(commands,index = 0)
ret = -1
using(cmdwindow = Window_CommandPokemon.new(commands)) {
cmdwindow.z = @viewport.z+1
@@ -1331,7 +1331,7 @@ end
#
#===============================================================================
class PokemonSummaryScreen
def initialize(scene,inbattle=false)
def initialize(scene,inbattle = false)
@scene = scene
@inbattle = inbattle
end

View File

@@ -135,7 +135,7 @@ class PokemonBag_Scene
pbUpdateSpriteHash(@sprites)
end
def pbStartScene(bag,choosing=false,filterproc=nil,resetpocket=true)
def pbStartScene(bag,choosing = false,filterproc = nil,resetpocket = true)
@viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z = 99999
@bag = bag
@@ -237,7 +237,7 @@ class PokemonBag_Scene
@viewport.dispose
end
def pbDisplay(msg,brief=false)
def pbDisplay(msg,brief = false)
UIHelper.pbDisplay(@sprites["msgwindow"],msg,brief) { pbUpdate }
end
@@ -245,11 +245,11 @@ class PokemonBag_Scene
UIHelper.pbConfirm(@sprites["msgwindow"],msg) { pbUpdate }
end
def pbChooseNumber(helptext,maximum,initnum=1)
def pbChooseNumber(helptext,maximum,initnum = 1)
return UIHelper.pbChooseNumber(@sprites["helpwindow"],helptext,maximum,initnum) { pbUpdate }
end
def pbShowCommands(helptext,commands,index=0)
def pbShowCommands(helptext,commands,index = 0)
return UIHelper.pbShowCommands(@sprites["helpwindow"],helptext,commands,index) { pbUpdate }
end
@@ -580,7 +580,7 @@ class PokemonBagScreen
end
# UI logic for the item screen for choosing an item.
def pbChooseItemScreen(proc=nil)
def pbChooseItemScreen(proc = nil)
oldlastpocket = @bag.last_viewed_pocket
oldchoices = @bag.last_pocket_selections.clone
@scene.pbStartScene(@bag,true,proc)

View File

@@ -6,7 +6,7 @@ class PokegearButton < SpriteWrapper
attr_reader :name
attr_reader :selected
def initialize(command,x,y,viewport=nil)
def initialize(command,x,y,viewport = nil)
super(viewport)
@image = command[0]
@name = command[1]

View File

@@ -58,7 +58,7 @@ class PokemonRegionMap_Scene
SQUARE_WIDTH = 16
SQUARE_HEIGHT = 16
def initialize(region =- 1, wallmap = true)
def initialize(region = - 1, wallmap = true)
@region = region
@wallmap = wallmap
end

View File

@@ -67,7 +67,7 @@ class PokemonSaveScreen
@scene=scene
end
def pbDisplay(text,brief=false)
def pbDisplay(text,brief = false)
@scene.pbDisplay(text,brief)
end

View File

@@ -286,7 +286,7 @@ class PokemonOption_Scene
pbUpdateSpriteHash(@sprites)
end
def pbStartScene(inloadscreen=false)
def pbStartScene(inloadscreen = false)
@sprites = {}
@viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z = 99999
@@ -449,7 +449,7 @@ class PokemonOptionScreen
@scene = scene
end
def pbStartScreen(inloadscreen=false)
def pbStartScreen(inloadscreen = false)
@scene.pbStartScene(inloadscreen)
@scene.pbOptions
@scene.pbEndScene

View File

@@ -6,7 +6,7 @@ class ReadyMenuButton < SpriteWrapper
attr_reader :selected
attr_reader :side
def initialize(index,command,selected,side,viewport=nil)
def initialize(index,command,selected,side,viewport = nil)
super(viewport)
@index = index
@command = command # Item/move ID, name, mode (T move/F item), pkmnIndex

View File

@@ -2,7 +2,7 @@
# Pokémon icons
#===============================================================================
class PokemonBoxIcon < IconSprite
def initialize(pokemon,viewport=nil)
def initialize(pokemon,viewport = nil)
super(0,0,viewport)
@pokemon = pokemon
@release = Interpolator.new
@@ -120,7 +120,7 @@ end
class PokemonBoxArrow < SpriteWrapper
attr_accessor :quickswap
def initialize(viewport=nil)
def initialize(viewport = nil)
super(viewport)
@frame = 0
@holding = false
@@ -292,7 +292,7 @@ class PokemonBoxSprite < SpriteWrapper
attr_accessor :refreshBox
attr_accessor :refreshSprites
def initialize(storage,boxnumber,viewport=nil)
def initialize(storage,boxnumber,viewport = nil)
super(viewport)
@storage = storage
@boxnumber = boxnumber
@@ -444,7 +444,7 @@ end
# Party pop-up panel
#===============================================================================
class PokemonBoxPartySprite < SpriteWrapper
def initialize(party,viewport=nil)
def initialize(party,viewport = nil)
super(viewport)
@party = party
@boxbitmap = AnimatedBitmap.new("Graphics/Pictures/Storage/overlay_party")
@@ -657,7 +657,7 @@ class PokemonStorageScene
Input.update
end
def pbShowCommands(message,commands,index=0)
def pbShowCommands(message,commands,index = 0)
ret = -1
msgwindow = Window_UnformattedTextPokemon.newWithSize("",180,0,Graphics.width-180,32)
msgwindow.viewport = @viewport
@@ -1392,7 +1392,7 @@ class PokemonStorageScene
end
end
def pbUpdateOverlay(selection,party=nil)
def pbUpdateOverlay(selection,party = nil)
overlay = @sprites["overlay"].bitmap
overlay.clear
buttonbase = Color.new(248,248,248)
@@ -1659,7 +1659,7 @@ class PokemonStorageScreen
return pbShowCommands(str,[_INTL("Yes"),_INTL("No")])==0
end
def pbShowCommands(msg,commands,index=0)
def pbShowCommands(msg,commands,index = 0)
return @scene.pbShowCommands(msg,commands,index)
end
@@ -1862,7 +1862,7 @@ class PokemonStorageScreen
return
end
def pbChooseMove(pkmn,helptext,index=0)
def pbChooseMove(pkmn,helptext,index = 0)
movenames = []
for i in pkmn.moves
if i.total_pp<=0
@@ -1949,7 +1949,7 @@ class PokemonStorageScreen
end
end
def pbChoosePokemon(_party=nil)
def pbChoosePokemon(_party = nil)
$game_temp.in_storage = true
@heldpkmn = nil
@scene.pbStartBox(self,1)

View File

@@ -117,7 +117,7 @@ class ItemStorage_Scene
return UIHelper.pbChooseNumber(@sprites["helpwindow"],helptext,maximum) { update }
end
def pbDisplay(msg,brief=false)
def pbDisplay(msg,brief = false)
UIHelper.pbDisplay(@sprites["msgwindow"],msg,brief) { update }
end
@@ -275,7 +275,7 @@ module UIHelper
return ret
end
def self.pbChooseNumber(helpwindow,helptext,maximum,initnum=1)
def self.pbChooseNumber(helpwindow,helptext,maximum,initnum = 1)
oldvisible = helpwindow.visible
helpwindow.visible = true
helpwindow.text = helptext
@@ -331,7 +331,7 @@ module UIHelper
return ret
end
def self.pbShowCommands(helpwindow,helptext,commands,initcmd=0)
def self.pbShowCommands(helpwindow,helptext,commands,initcmd = 0)
ret = -1
oldvisible = helpwindow.visible
helpwindow.visible = helptext ? true : false

View File

@@ -660,7 +660,7 @@ end
#===============================================================================
#
#===============================================================================
def pbPokemonMart(stock,speech=nil,cantsell=false)
def pbPokemonMart(stock,speech = nil,cantsell = false)
stock.delete_if { |item| GameData::Item.get(item).is_important? && $bag.has?(item) }
commands = []
cmdBuy = -1

View File

@@ -4,7 +4,7 @@
class MoveRelearner_Scene
VISIBLEMOVES = 4
def pbDisplay(msg,brief=false)
def pbDisplay(msg,brief = false)
UIHelper.pbDisplay(@sprites["msgwindow"],msg,brief) { pbUpdate }
end

View File

@@ -219,7 +219,7 @@ class PurifyChamber
@sets[set].insertAt(index,value)
end
def [](chamber,slot=nil)
def [](chamber,slot = nil)
if slot==nil
return @sets[chamber]
end
@@ -272,7 +272,7 @@ class PurifyChamber
insertAfter(set,setCount(set),pkmn)
end
def debugAdd(set,shadow,type1,type2=nil)
def debugAdd(set,shadow,type1,type2 = nil)
pkmn = PseudoPokemon.new(shadow, type1, type2 || type1)
if pkmn.shadowPokemon?
self.setShadow(set,pkmn)
@@ -637,7 +637,7 @@ end
class Window_PurifyChamberSets < Window_DrawableCommand
attr_reader :switching
def initialize(chamber,x,y,width,height,viewport=nil)
def initialize(chamber,x,y,width,height,viewport = nil)
@chamber=chamber
@switching=-1
super(x,y,width,height,viewport)
@@ -680,7 +680,7 @@ end
#
#===============================================================================
class DirectFlowDiagram
def initialize(viewport=nil)
def initialize(viewport = nil)
@points=[]
@angles=[]
@viewport=viewport
@@ -754,7 +754,7 @@ end
#
#===============================================================================
class FlowDiagram
def initialize(viewport=nil)
def initialize(viewport = nil)
@points=[]
@angles=[]
@viewport=viewport
@@ -846,7 +846,7 @@ class PurifyChamberSetView < SpriteWrapper
attr_reader :cursor
attr_reader :heldpkmn
def initialize(chamber,set,viewport=nil)
def initialize(chamber,set,viewport = nil)
super(viewport)
@set=set
@heldpkmn=nil

View File

@@ -14,7 +14,7 @@ end
#===============================================================================
# type: 0=Pokémon; 1 or higher=item (is the item's quantity).
# item: The thing being turned into a Mystery Gift (Pokémon object or item ID).
def pbEditMysteryGift(type,item,id=0,giftname="")
def pbEditMysteryGift(type,item,id = 0,giftname = "")
begin
if type==0 # Pokémon
commands=[_INTL("Mystery Gift"),

View File

@@ -5,7 +5,7 @@ class Window_CharacterEntry < Window_DrawableCommand
XSIZE=13
YSIZE=4
def initialize(charset,viewport=nil)
def initialize(charset,viewport = nil)
@viewport=viewport
@charset=charset
@othercharset=""
@@ -76,7 +76,7 @@ class PokemonEntryScene
]
USEKEYBOARD=true
def pbStartScene(helptext,minlength,maxlength,initialText,subject=0,pokemon=nil)
def pbStartScene(helptext,minlength,maxlength,initialText,subject = 0,pokemon = nil)
@sprites={}
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@@ -373,7 +373,7 @@ class PokemonEntryScene2
def pbStartScene(helptext,minlength,maxlength,initialText,subject=0,pokemon=nil)
def pbStartScene(helptext,minlength,maxlength,initialText,subject = 0,pokemon = nil)
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@viewport.z = 99999
@helptext = helptext
@@ -756,7 +756,7 @@ class PokemonEntry
@scene=scene
end
def pbStartScreen(helptext,minlength,maxlength,initialText,mode=-1,pokemon=nil)
def pbStartScreen(helptext,minlength,maxlength,initialText,mode = -1,pokemon = nil)
@scene.pbStartScene(helptext,minlength,maxlength,initialText,mode,pokemon)
ret=@scene.pbEntry
@scene.pbEndScene
@@ -769,7 +769,7 @@ end
#===============================================================================
#
#===============================================================================
def pbEnterText(helptext,minlength,maxlength,initialText="",mode=0,pokemon=nil,nofadeout=false)
def pbEnterText(helptext,minlength,maxlength,initialText = "",mode = 0,pokemon = nil,nofadeout = false)
ret=""
if ($PokemonSystem.textinput==1 rescue false) # Keyboard
pbFadeOutIn(99999,nofadeout) {
@@ -787,18 +787,18 @@ def pbEnterText(helptext,minlength,maxlength,initialText="",mode=0,pokemon=nil,n
return ret
end
def pbEnterPlayerName(helptext,minlength,maxlength,initialText="",nofadeout=false)
def pbEnterPlayerName(helptext,minlength,maxlength,initialText = "",nofadeout = false)
return pbEnterText(helptext,minlength,maxlength,initialText,1,nil,nofadeout)
end
def pbEnterPokemonName(helptext,minlength,maxlength,initialText="",pokemon=nil,nofadeout=false)
def pbEnterPokemonName(helptext,minlength,maxlength,initialText = "",pokemon = nil,nofadeout = false)
return pbEnterText(helptext,minlength,maxlength,initialText,2,pokemon,nofadeout)
end
def pbEnterNPCName(helptext,minlength,maxlength,initialText="",id=0,nofadeout=false)
def pbEnterNPCName(helptext,minlength,maxlength,initialText = "",id = 0,nofadeout = false)
return pbEnterText(helptext,minlength,maxlength,initialText,3,id,nofadeout)
end
def pbEnterBoxName(helptext,minlength,maxlength,initialText="",nofadeout=false)
def pbEnterBoxName(helptext,minlength,maxlength,initialText = "",nofadeout = false)
return pbEnterText(helptext,minlength,maxlength,initialText,4,nil,nofadeout)
end