Added decent spacing to all scripts thanks to Rubocop

This commit is contained in:
Maruno17
2021-12-18 15:25:40 +00:00
parent f7b76ae62e
commit d17fc40a47
207 changed files with 18577 additions and 18587 deletions

View File

@@ -235,7 +235,7 @@ def XPML_read(map,markup,event,max_param_number = 0)
if event.list[i].code == 108 &&
event.list[i].parameters[0].downcase == "begin " + markup.downcase
parameter_list = [] if parameter_list == nil
for j in i+1...event.list.size
for j in (i + 1)...event.list.size
if event.list[j].code == 108
parts = event.list[j].parameters[0].split
if parts.size != 1 && parts[0].downcase != "begin"

View File

@@ -136,7 +136,7 @@ class Battle::Scene::CommandMenu < Battle::Scene::MenuBase
button = SpriteWrapper.new(viewport)
button.bitmap = @buttonBitmap.bitmap
button.x = self.x + Graphics.width - 260
button.x += (((i%2)==0) ? 0 : @buttonBitmap.width/2-4)
button.x += (i.even? ? 0 : @buttonBitmap.width / 2 - 4)
button.y = self.y + 6
button.y += (((i / 2) == 0) ? 0 : BUTTON_HEIGHT - 4)
button.src_rect.width = @buttonBitmap.width / 2
@@ -245,7 +245,7 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
button = SpriteWrapper.new(viewport)
button.bitmap = @buttonBitmap.bitmap
button.x = self.x + 4
button.x += (((i%2)==0) ? 0 : @buttonBitmap.width/2-4)
button.x += (i.even? ? 0 : @buttonBitmap.width / 2 - 4)
button.y = self.y + 6
button.y += (((i / 2) == 0) ? 0 : BUTTON_HEIGHT - 4)
button.src_rect.width = @buttonBitmap.width / 2

View File

@@ -429,8 +429,7 @@ class PurifyChamberScreen
# Place Pokemon in the set
curpkmn = PurifyChamberHelper.pbGetPokemon(@chamber, cmd[1])
if curpkmn || heldpkmn
commands=[_INTL("MOVE"),_INTL("SUMMARY"),
_INTL("WITHDRAW")]
commands = [_INTL("MOVE"), _INTL("SUMMARY"), _INTL("WITHDRAW")]
if curpkmn && heldpkmn
commands[0] = _INTL("EXCHANGE")
elsif heldpkmn

View File

@@ -154,8 +154,7 @@ BattleDebugMenuCommands.register("weather", {
msg += _INTL("Duration : Infinite")
end
end
cmd = pbMessage("\\ts[]" + msg, [
_INTL("Change type"),
cmd = pbMessage("\\ts[]" + msg, [_INTL("Change type"),
_INTL("Change duration"),
_INTL("Clear weather")], -1, nil, cmd)
break if cmd < 0
@@ -216,8 +215,7 @@ BattleDebugMenuCommands.register("terrain", {
msg += _INTL("Duration : Infinite")
end
end
cmd = pbMessage("\\ts[]" + msg, [
_INTL("Change type"),
cmd = pbMessage("\\ts[]" + msg, [_INTL("Change type"),
_INTL("Change duration"),
_INTL("Clear terrain")], -1, nil, cmd)
break if cmd < 0
@@ -270,8 +268,7 @@ BattleDebugMenuCommands.register("environment", {
msg = _INTL("Environment: {1}", environment_data.name || _INTL("Unknown"))
msg += "\r\n"
msg += _INTL("Time of day: {1}", [_INTL("Day"), _INTL("Evening"), _INTL("Night")][battle.time])
cmd = pbMessage("\\ts[]" + msg, [
_INTL("Change environment"),
cmd = pbMessage("\\ts[]" + msg, [_INTL("Change environment"),
_INTL("Change time of day")], -1, nil, cmd)
break if cmd < 0
case cmd
@@ -379,7 +376,6 @@ BattleDebugMenuCommands.register("speed_order", {
"description" => _INTL("Show all battlers in order from fastest to slowest."),
"always_show" => true,
"effect" => proc { |battle|
battlers = []
battlers = battle.allBattlers.map { |b| [b, b.pbSpeed] }
battlers.sort! { |a, b| b[1] <=> a[1] }
commands = []

View File

@@ -255,9 +255,8 @@ BattlerDebugMenuCommands.register("hiddenvalues", {
cmd = 0
loop do
persid = sprintf("0x%08X", pkmn.personalID)
cmd = pbMessage("\\ts[]" + _INTL("Personal ID is {1}.", persid), [
_INTL("Set EVs"),
_INTL("Set IVs")], -1, nil, cmd)
cmd = pbMessage("\\ts[]" + _INTL("Personal ID is {1}.", persid),
[_INTL("Set EVs"), _INTL("Set IVs")], -1, nil, cmd)
break if cmd < 0
case cmd
when 0 # Set EVs
@@ -506,10 +505,8 @@ BattlerDebugMenuCommands.register("setmovepp", {
cmd2 = 0
loop do
msg = _INTL("{1}: PP {2}/{3} (PP Up {4}/3)", move_name, move.pp, move.total_pp, move.ppup)
cmd2 = pbMessage("\\ts[]" + msg, [
_INTL("Set PP"),
_INTL("Full PP"),
_INTL("Set PP Up")], -1, nil, cmd2)
cmd2 = pbMessage("\\ts[]" + msg,
[_INTL("Set PP"), _INTL("Full PP"), _INTL("Set PP Up")], -1, nil, cmd2)
break if cmd2 < 0
case cmd2
when 0 # Change PP
@@ -680,10 +677,8 @@ BattlerDebugMenuCommands.register("setgender", {
cmd = 0
loop do
msg = [_INTL("Gender is male."), _INTL("Gender is female.")][pkmn.male? ? 0 : 1]
cmd = pbMessage("\\ts[]" + msg, [
_INTL("Make male"),
_INTL("Make female"),
_INTL("Reset")], -1, nil, cmd)
cmd = pbMessage("\\ts[]" + msg,
[_INTL("Make male"), _INTL("Make female"), _INTL("Reset")], -1, nil, cmd)
break if cmd < 0
case cmd
when 0 # Make male
@@ -747,8 +742,8 @@ BattlerDebugMenuCommands.register("setshininess", {
loop do
msg_idx = pkmn.shiny? ? (pkmn.super_shiny? ? 1 : 0) : 2
msg = [_INTL("Is shiny."), _INTL("Is super shiny."), _INTL("Is normal (not shiny).")][msg_idx]
cmd = pbMessage("\\ts[]" + msg, [
_INTL("Make shiny"),
cmd = pbMessage("\\ts[]" + msg,
[_INTL("Make shiny"),
_INTL("Make super shiny"),
_INTL("Make normal"),
_INTL("Reset")], -1, nil, cmd)