Removed all excess whitespace and standardized line endings.

This commit is contained in:
m3rein
2020-09-05 21:23:16 +02:00
parent caed5bd757
commit 240af4e5e7
219 changed files with 929 additions and 929 deletions

View File

@@ -93,7 +93,7 @@ def pbDebugMenuCommands(showall=true)
_INTL("Shadow Pokémon. Choose a Pokémon to show to the Relic Stone for purification."))
commands.add("fieldmenu","purifychamber",_INTL("Use Purify Chamber"),
_INTL("Shadow Pokémon. Open the Purify Chamber for purification."))
commands.add("main","battlemenu",_INTL("Battle options..."),
_INTL("Start battles, reset this map's trainers, ready rematches, edit roamers, etc."))
commands.add("battlemenu","testwildbattle",_INTL("Test Wild Battle"),
@@ -112,7 +112,7 @@ def pbDebugMenuCommands(showall=true)
_INTL("Make all trainers in the phone ready for rematches."))
commands.add("battlemenu","roamers",_INTL("Roaming Pokémon"),
_INTL("Toggle and edit all roaming Pokémon."))
commands.add("main","itemsmenu",_INTL("Item options..."),
_INTL("Give and take items."))
commands.add("itemsmenu","additem",_INTL("Add Item"),
@@ -121,7 +121,7 @@ def pbDebugMenuCommands(showall=true)
_INTL("Add a certain number of every item to the Bag."))
commands.add("itemsmenu","emptybag",_INTL("Empty Bag"),
_INTL("Remove all items from the Bag."))
commands.add("main","pokemonmenu",_INTL("Pokémon options..."),
_INTL("Give Pokémon, heal party, fill/empty PC storage, etc."))
commands.add("pokemonmenu","addpokemon",_INTL("Add Pokémon"),
@@ -138,7 +138,7 @@ def pbDebugMenuCommands(showall=true)
_INTL("Remove all Pokémon in storage."))
commands.add("pokemonmenu","openstorage",_INTL("Access Pokémon Storage"),
_INTL("Opens the Pokémon storage boxes in Organize Boxes mode."))
commands.add("main","playermenu",_INTL("Player options..."),
_INTL("Set money, badges, Pokédexes, player's appearance and name, etc."))
commands.add("playermenu","setbadges",_INTL("Set Badges"),
@@ -195,7 +195,7 @@ def pbDebugMenuCommands(showall=true)
_INTL("Import all battle animations from the \"Animations\" folder."))
commands.add("editorsmenu","exportanims",_INTL("Export All Battle Animations"),
_INTL("Export all battle animations individually to the \"Animations\" folder."))
commands.add("main","othermenu",_INTL("Other options..."),
_INTL("Mystery Gifts, translations, compile data, etc."))
commands.add("othermenu","mysterygift",_INTL("Manage Mystery Gifts"),
@@ -711,7 +711,7 @@ def pbDebugMenuActions(cmd="",sprites=nil,viewport=nil)
trname = pbEnterPlayerName("Your name?",0,MAX_PLAYER_NAME_SIZE,$Trainer.name)
if trname=="" && pbConfirmMessage(_INTL("Give yourself a default name?"))
trainertype = pbGetPlayerTrainerType
gender = pbGetTrainerTypeGender(trainertype)
gender = pbGetTrainerTypeGender(trainertype)
trname = pbSuggestTrainerName(gender)
end
if trname==""
@@ -863,4 +863,4 @@ def pbDebugMenu(showall=true)
pbDisposeMessageWindow(sprites["textbox"])
pbDisposeSpriteHash(sprites)
viewport.dispose
end
end

View File

@@ -1,5 +1,5 @@
#===============================================================================
#
#
#===============================================================================
def pbDefaultMap
return $game_map.map_id if $game_map
@@ -555,7 +555,7 @@ end
#===============================================================================
#
#
#===============================================================================
class PokemonDataCopy
attr_accessor :dataOldHash
@@ -841,7 +841,7 @@ class PokemonDebugPartyScreen
@helpWindow.visible = true
end
def pbConfirm(text)
def pbConfirm(text)
ret = -1
@messageBox.text = text
@messageBox.visible = true
@@ -922,4 +922,4 @@ class PokemonDebugPartyScreen
@helpWindow.update
end
alias pbUpdate update
end
end

View File

@@ -7,7 +7,7 @@ module PokemonDebugMixin
commands.add("hpstatusmenu","fullheal",_INTL("Fully heal"))
commands.add("hpstatusmenu","makefainted",_INTL("Make fainted"))
commands.add("hpstatusmenu","setpokerus",_INTL("Set Pokérus"))
commands.add("main","levelstats",_INTL("Level/stats..."))
commands.add("levelstats","setlevel",_INTL("Set level"))
commands.add("levelstats","setexp",_INTL("Set Exp"))
@@ -20,26 +20,26 @@ module PokemonDebugMixin
commands.add("conteststats","setsmart",_INTL("Set Smart"))
commands.add("conteststats","settough",_INTL("Set Tough"))
commands.add("conteststats","setsheen",_INTL("Set Sheen"))
commands.add("main","moves",_INTL("Moves..."))
commands.add("moves","teachmove",_INTL("Teach move"))
commands.add("moves","forgetmove",_INTL("Forget move"))
commands.add("moves","resetmoves",_INTL("Reset moves"))
commands.add("moves","setmovepp",_INTL("Set move PP"))
commands.add("moves","setinitialmoves",_INTL("Reset initial moves"))
commands.add("main","setability",_INTL("Set ability"))
commands.add("main","setnature",_INTL("Set nature"))
commands.add("main","setgender",_INTL("Set gender"))
commands.add("main","speciesform",_INTL("Species/form..."))
commands.add("main","cosmetic",_INTL("Cosmetic info..."))
commands.add("cosmetic","setshininess",_INTL("Set shininess"))
commands.add("cosmetic","setpokeball",_INTL("Set Poké Ball"))
commands.add("cosmetic","setribbons",_INTL("Set ribbons"))
commands.add("cosmetic","setnickname",_INTL("Set nickname"))
commands.add("cosmetic","ownership",_INTL("Ownership..."))
commands.add("main","setegg",_INTL("Set egg"))
commands.add("main","shadowpkmn",_INTL("Shadow Pkmn..."))
if !settingUpBattle
@@ -863,4 +863,4 @@ end
class PokemonDebugPartyScreen
include PokemonDebugMixin
end
end

View File

@@ -75,10 +75,10 @@ def pbNewEncounterType(enc)
if i==0
dogen = true unless enc[1][EncounterTypes::Cave]
elsif i==1
dogen = true unless enc[1][EncounterTypes::Land] ||
enc[1][EncounterTypes::LandMorning] ||
enc[1][EncounterTypes::LandDay] ||
enc[1][EncounterTypes::LandNight] ||
dogen = true unless enc[1][EncounterTypes::Land] ||
enc[1][EncounterTypes::LandMorning] ||
enc[1][EncounterTypes::LandDay] ||
enc[1][EncounterTypes::LandNight] ||
enc[1][EncounterTypes::BugContest]
else
dogen = true
@@ -140,7 +140,7 @@ def pbEditEncounterType(enc,etype)
params.setRange(minlevel,mLevel)
params.setDefaultValue(minlevel)
maxlevel = pbMessageChooseNumber(_INTL("Set the maximum level."),params)
enctype[ret][1] = minlevel
enctype[ret][1] = minlevel
enctype[ret][2] = maxlevel
end
cmdwin.dispose
@@ -435,14 +435,14 @@ def pbTrainerBattleEditor
trainertype = pbTrainerTypeEditorNew(nil)
next if trainertype<0
else
next
next
end
trainername = pbMessageFreeText(_INTL("Now enter the trainer's name."),"",false,32)
next if trainername==""
trainerparty = pbGetFreeTrainerParty(trainertype,trainername)
if trainerparty<0
pbMessage(_INTL("There is no room to create a trainer of that type and name."))
next
next
end
t = pbNewTrainer(trainertype,trainername,trainerparty,false)
trainers.push(t) if t
@@ -565,7 +565,7 @@ def pbMetadataScreen(defaultMapId=nil)
map = pbListScreen(_INTL("SET METADATA"),MapLister.new(map,true))
break if map<0
mapname = (map==0) ? _INTL("Global Metadata") : mapinfos[map].name
data = []
data = []
properties = (map==0) ? MapScreenScene::GLOBALMETADATA : MapScreenScene::LOCALMAPS
for i in 0...properties.length
data.push((metadata[map]) ? metadata[map][i+1] : nil)
@@ -908,7 +908,7 @@ def pbPokemonEditor
regionallist.push(regionalDexes[i][selection])
end
numb = regionallist.size-1
while numb>=0 # Remove every 0 at end of array
while numb>=0 # Remove every 0 at end of array
(regionallist[numb]==0) ? regionallist.pop : break
numb -= 1
end
@@ -1454,4 +1454,4 @@ def pbAnimationsOrganiser
info.dispose
cmdwin.dispose
viewport.dispose
end
end

View File

@@ -354,7 +354,7 @@ end
def pbSaveEncounterData
encdata = pbLoadEncountersData
return if !encdata
mapinfos = pbLoadRxData("Data/MapInfos")
mapinfos = pbLoadRxData("Data/MapInfos")
File.open("PBS/encounters.txt","wb") { |f|
f.write(0xEF.chr)
f.write(0xBB.chr)
@@ -789,7 +789,7 @@ def pbSavePokemonData
regionallist.push(regionaldata[region][i])
end
numb = regionallist.length-1
while (numb>=0) # remove every 0 at end of array
while (numb>=0) # remove every 0 at end of array
(!regionallist[numb] || regionallist[numb]==0) ? regionallist.pop : break
numb -= 1
end
@@ -1493,4 +1493,4 @@ def pbSaveAllData
pbSavePokemonData; Graphics.update
pbSavePokemonFormsData; Graphics.update
pbSaveShadowMoves; Graphics.update
end
end

View File

@@ -112,7 +112,7 @@ class NonzeroLimitProperty
params.setDefaultValue(oldsetting)
return pbMessageChooseNumber(_INTL("Set the value for {1}.",settingname),params)
end
def defaultValue
return 1
end
@@ -191,7 +191,7 @@ class EnumProperty
def set(settingname,oldsetting)
commands = []
for value in @values
commands.push(value)
commands.push(value)
end
cmd = pbMessage(_INTL("Choose a value for {1}.",settingname),commands,-1)
return oldsetting if cmd<0
@@ -204,7 +204,7 @@ class EnumProperty
def format(value)
return (value) ? @values[value] : value.inspect
end
end
end
@@ -740,7 +740,7 @@ module PocketProperty
_INTL("TMs & HMs"),_INTL("Berries"),_INTL("Mail"),
_INTL("Battle Items"),_INTL("Key Items")]
end
def self.set(settingname,oldsetting)
cmd = pbMessage(_INTL("Choose a pocket for this item."),pocketnames(),-1)
return (cmd>=0) ? cmd+1 : oldsetting
@@ -1516,4 +1516,4 @@ def pbPropertyList(title,data,properties,saveprompt=false)
desc.dispose
Input.update
return retval
end
end

View File

@@ -509,7 +509,7 @@ class TrainerTypeLister
wh = (Graphics.height-64).to_f()
else
wh = sx*wh
ww = (Graphics.width-256).to_f()
ww = (Graphics.width-256).to_f()
end
end
@sprite.x = (Graphics.width-((Graphics.width-256)/2))-(ww/2)
@@ -615,4 +615,4 @@ class TrainerBattleLister
@pkmnList.resizeHeightToFit(text,Graphics.width/2)
@pkmnList.y = Graphics.height-@pkmnList.height
end
end
end

View File

@@ -313,7 +313,7 @@ def pbChooseMoveListForSpecies(species,defaultMoveID=0)
for command in commands
realcommands.push("#{command[1]}")
end
ret = pbCommands2(cmdwin,realcommands,-1,moveDefault,true)
ret = pbCommands2(cmdwin,realcommands,-1,moveDefault,true)
cmdwin.dispose
return (ret>=0) ? commands[ret][0] : 0
end
@@ -374,7 +374,7 @@ def pbChooseBallList(defaultMoveID=-1)
for i in commands
realcommands.push(i[2])
end
ret = pbCommands2(cmdwin,realcommands,-1,moveDefault,true)
ret = pbCommands2(cmdwin,realcommands,-1,moveDefault,true)
cmdwin.dispose
return (ret>=0) ? commands[ret][0] : defaultMoveID
end
@@ -546,4 +546,4 @@ def pbCommandsSortable(cmdwindow,commands,cmdIfCancel,defaultindex=-1,sortable=f
ret = command
cmdwindow.active = false
return ret
end
end

View File

@@ -206,4 +206,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $!
end
end
end

View File

@@ -39,7 +39,7 @@ end
class SelectionSprite < Sprite
def initialize(viewport=nil)
@sprite=Sprite.new(viewport)
@sprite.bitmap=nil
@sprite.bitmap=nil
@sprite.z=2
@othersprite=nil
end
@@ -416,10 +416,10 @@ class MapScreenScene
otherdims=MapFactoryHelper.getMapDims(i)
x1=(thissprite.x-othersprite.x)/4
y1=(thissprite.y-othersprite.y)/4
if (x1==otherdims[0] || x1==-thisdims[0] ||
if (x1==otherdims[0] || x1==-thisdims[0] ||
y1==otherdims[1] || y1==-thisdims[1])
ret.push(i)
end
end
end
# If no direct connections, add an indirect connection
if ret.length==0
@@ -705,7 +705,7 @@ class MapScreenScene
if mousepos
hitmap=hittest(mousepos[0],mousepos[1])
if Input.triggerex?(Input::LeftMouseKey)
onClick(hitmap,mousepos[0],mousepos[1])
onClick(hitmap,mousepos[0],mousepos[1])
elsif Input.triggerex?(Input::RightMouseKey)
onRightClick(hitmap,mousepos[0],mousepos[1])
elsif Input.releaseex?(Input::LeftMouseKey)
@@ -810,4 +810,4 @@ def pbConnectionsEditor
mapscreen.pbMapScreenLoop
mapscreen.close
}
end
end

View File

@@ -1,5 +1,5 @@
#===============================================================================
#
#
#===============================================================================
def findBottom(bitmap)
return 0 if !bitmap
@@ -42,7 +42,7 @@ end
#===============================================================================
#
#
#===============================================================================
class SpritePositioner
def pbOpen
@@ -390,7 +390,7 @@ class SpritePositioner
end
end
@oldSpeciesIndex = cw.index
cw.dispose
cw.dispose
return species
end
end
@@ -398,7 +398,7 @@ end
#===============================================================================
#
#
#===============================================================================
class SpritePositionerScreen
def initialize(scene)
@@ -422,4 +422,4 @@ class SpritePositionerScreen
end
@scene.pbClose
end
end
end

View File

@@ -26,7 +26,7 @@ class Window_Menu < Window_CommandPokemon
def hittest
mousepos=Mouse::getMousePos
return -1 if !mousepos
return -1 if !mousepos
toprow=self.top_row
for i in toprow...toprow+@item_max
rc=Rect.new(0,32*(i-toprow),self.contents.width,32)
@@ -36,7 +36,7 @@ class Window_Menu < Window_CommandPokemon
return i
end
end
return -1
return -1
end
end
@@ -169,7 +169,7 @@ class Button < UIControl
return if !mousepos
rect=Rect.new(self.x+1,self.y+1,self.width-2,self.height-2)
rect=toAbsoluteRect(rect)
if Input.triggerex?(Input::LeftMouseKey) &&
if Input.triggerex?(Input::LeftMouseKey) &&
rect.contains(mousepos[0],mousepos[1]) && !@captured
@captured=true
self.invalidate
@@ -406,7 +406,7 @@ class TextField < UIControl
for i in startpos...scanlength
c=textscan[i]
textwidth=bitmap.text_size(c).width
next if c=="\n"
next if c=="\n"
# Draw text
shadowtext(bitmap,x,y, textwidth+4, 32, c)
# Draw cursor if necessary
@@ -885,7 +885,7 @@ class OptionalTextSlider < TextSlider
@slider.width=self.width-checkboxwidth
@slider.height=self.height
@slider.disabled=!@checkbox.checked
end
end
end
@@ -1109,7 +1109,7 @@ def pbTrackPopupMenu(commands)
if Input.trigger?(Input::C)
hit=menuwindow.index
menuwindow.dispose
return hit
return hit
end
if Input.trigger?(Input::B) # Escape
break
@@ -1235,7 +1235,7 @@ class AnimationWindow < SpriteWrapper
return
end
end
# Left arrow
# Left arrow
if left.contains(mousepos[0],mousepos[1])
if Input.repeatcount(Input::LeftMouseKey)>30
@start-=3
@@ -1268,7 +1268,7 @@ class CanvasAnimationWindow < AnimationWindow
def initialize(canvas,x,y,width,height,viewport=nil)
@canvas=canvas
super(x,y,width,height,viewport)
end
end
end
@@ -1571,7 +1571,7 @@ class AnimationCanvas < Sprite
def invalidate
for i in 0...PBAnimation::MAX_SPRITES
invalidateCel(i)
end
end
end
def invalidateCel(i)
@@ -1628,7 +1628,7 @@ class AnimationCanvas < Sprite
@animation[frame][i][AnimFrame::X]+=ox
@animation[frame][i][AnimFrame::Y]+=oy
end
@dirty[i]=true if frame==@currentframe
@dirty[i]=true if frame==@currentframe
end
end
end
@@ -1642,7 +1642,7 @@ class AnimationCanvas < Sprite
else
pbResetCel(@animation[frame][i])
end
@dirty[i]=true if frame==@currentframe
@dirty[i]=true if frame==@currentframe
end
end
end
@@ -1790,7 +1790,7 @@ class AnimationCanvas < Sprite
if mousepos && pbSpriteHitTest(self,mousepos[0],mousepos[1],false,true)
if Input.triggerex?(Input::LeftMouseKey) # Left mouse button
selectedcel=-1
usealpha=(Input.press?(Input::ALT)) ? true : false
usealpha=(Input.press?(Input::ALT)) ? true : false
for j in 0...PBAnimation::MAX_SPRITES
if pbSpriteHitTest(@celsprites[j],mousepos[0],mousepos[1],usealpha,false)
selectedcel=j
@@ -1846,7 +1846,7 @@ class AnimationCanvas < Sprite
if Input.repeatex?(0x4C) # "L" for lock
cel[AnimFrame::LOCKED]=(cel[AnimFrame::LOCKED]==0) ? 1 : 0
@dirty[@currentcel]=true
end
end
if Input.repeatex?(0x52) # "R" for rotate right
cel[AnimFrame::ANGLE]+=10
cel[AnimFrame::ANGLE]%=360
@@ -1931,7 +1931,7 @@ class AnimationCanvas < Sprite
@celsprites[i].y+=BORDERSIZE
setPreviousFrame(i)
setFrame(i)
@dirty[i]=false
@dirty[i]=false
end
end
end
@@ -2819,8 +2819,8 @@ end
def pbAnimList(animations,canvas,animwin)
commands=[]
for i in 0...animations.length
animations[i]=PBAnimation.new if !animations[i]
commands[commands.length]=_INTL("{1} {2}",i,animations[i].name)
animations[i]=PBAnimation.new if !animations[i]
commands[commands.length]=_INTL("{1} {2}",i,animations[i].name)
end
cmdwin=pbListWindow(commands,320)
cmdwin.height=416
@@ -2869,7 +2869,7 @@ def pbAnimList(animations,canvas,animwin)
elsif cmd2==2 # Delete
if pbConfirmMessage(_INTL("Are you sure you want to delete this animation?"))
animations[cmdwin.index]=PBAnimation.new
cmdwin.commands[cmdwin.index]=_INTL("{1} {2}",cmdwin.index,animations[cmdwin.index].name)
cmdwin.commands[cmdwin.index]=_INTL("{1} {2}",cmdwin.index,animations[cmdwin.index].name)
cmdwin.refresh
end
end
@@ -3155,7 +3155,7 @@ end
def catmullRom(p1,p2,p3,p4,t)
def catmullRom(p1,p2,p3,p4,t)
# p1=prevPoint, p2=startPoint, p3=endPoint, p4=nextPoint, t is from 0 through 1
t2=t*t
t3=t2*t
@@ -3422,7 +3422,7 @@ end
# Window classes
################################################################################
class BitmapDisplayWindow < SpriteWindow_Base
attr_reader :bitmapname
attr_reader :bitmapname
attr_reader :hue
def initialize(x,y,width,height)
@@ -3459,7 +3459,7 @@ class BitmapDisplayWindow < SpriteWindow_Base
wh=self.contents.height
else
wh=sx*wh
ww=self.contents.width
ww=self.contents.width
end
dest=Rect.new(
(self.contents.width-ww)/2,
@@ -3806,4 +3806,4 @@ def pbConvertAnimsToNewFormat
$PokemonTemp.battleAnims = nil
end
pbMessage(_INTL("{1} animations converted to new format.",count))
end
end