mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 21:54:58 +00:00
More Rubocop changes
This commit is contained in:
@@ -88,11 +88,10 @@ class Battle::Scene
|
||||
shouldCompact = false
|
||||
@animations.each_with_index do |a, i|
|
||||
a.update
|
||||
if a.animDone?
|
||||
a.dispose
|
||||
@animations[i] = nil
|
||||
shouldCompact = true
|
||||
end
|
||||
next if !a.animDone?
|
||||
a.dispose
|
||||
@animations[i] = nil
|
||||
shouldCompact = true
|
||||
end
|
||||
@animations.compact! if shouldCompact
|
||||
end
|
||||
|
||||
@@ -195,8 +195,8 @@ class Battle::Scene
|
||||
# Set Bag starting positions
|
||||
oldLastPocket = $bag.last_viewed_pocket
|
||||
oldChoices = $bag.last_pocket_selections.clone
|
||||
$bag.last_viewed_pocket = @bagLastPocket if @bagLastPocket != nil
|
||||
$bag.last_pocket_selections = @bagChoices if @bagChoices != nil
|
||||
$bag.last_viewed_pocket = @bagLastPocket if @bagLastPocket
|
||||
$bag.last_pocket_selections = @bagChoices if @bagChoices
|
||||
# Start Bag screen
|
||||
itemScene = PokemonBag_Scene.new
|
||||
itemScene.pbStartScene($bag, true,
|
||||
|
||||
@@ -137,7 +137,7 @@ class Battle::Scene
|
||||
a[2] = true if a[1].animDone?
|
||||
end
|
||||
pbUpdate
|
||||
if !inPartyAnimation? && !sendOutAnims.any? { |a| !a[2] }
|
||||
if !inPartyAnimation? && sendOutAnims.none? { |a| !a[2] }
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -515,7 +515,7 @@ class Battle::Scene
|
||||
return if !animations
|
||||
animations.each do |a|
|
||||
next if !a || a.name != "Common:" + animName
|
||||
pbAnimationCore(a, user, (target != nil) ? target : user)
|
||||
pbAnimationCore(a, user, target || user)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
@@ -174,9 +174,7 @@ class Battle::Scene::CommandMenu < Battle::Scene::MenuBase
|
||||
@msgBox.text = value[0]
|
||||
return if USE_GRAPHICS
|
||||
commands = []
|
||||
(1..4).each do |i|
|
||||
commands.push(value[i]) if value[i] && value[i] != nil
|
||||
end
|
||||
(1..4).each { |i| commands.push(value[i]) if value[i] }
|
||||
@cmdWindow.commands = commands
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user