Minor refactoring to kill various Rubocop warnings

This commit is contained in:
Maruno17
2021-12-17 20:29:47 +00:00
parent b5ee1b211d
commit 5dc64f1709
46 changed files with 145 additions and 151 deletions

View File

@@ -199,10 +199,11 @@ class Battle::Scene
$bag.last_pocket_selections = @bagChoices if @bagChoices != nil
# Start Bag screen
itemScene = PokemonBag_Scene.new
itemScene.pbStartScene($bag, true, Proc.new { |item|
useType = GameData::Item.get(item).battle_use
next useType && useType>0
},false)
itemScene.pbStartScene($bag, true,
Proc.new { |item|
useType = GameData::Item.get(item).battle_use
next useType && useType > 0
}, false)
# Loop while in Bag screen
wasTargeting = false
loop do

View File

@@ -139,9 +139,9 @@ class Battle::Scene
end
fadeAnim.dispose
sendOutAnims.each do |a|
a[0].dispose
a[1].dispose
end
a[0].dispose
a[1].dispose
end
# Play shininess animations for shiny Pokémon
sendOuts.each do |b|
next if !@battle.showAnims || !@battle.battlers[b[0]].shiny?

View File

@@ -47,8 +47,8 @@ class Battle::DebugSceneNoLogging
def pbHPChanged(battler,oldHP,showAnim=false); end
def pbFaintBattler(battler); end
def pbEXPBar(battler,startExp,endExp,tempExp1,tempExp2); end
def pbLevelUp(pkmn,battler,oldTotalHP,oldAttack,oldDefense,
oldSpAtk,oldSpDef,oldSpeed); end
def pbLevelUp(pkmn, battler, oldTotalHP, oldAttack, oldDefense,
oldSpAtk, oldSpDef, oldSpeed); end
def pbForgetMove(pkmn,moveToLearn); return 0; end # Always forget first move
def pbCommandMenu(idxBattler,firstAction)