mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-02-04 12:21:04 +00:00
Added decent spacing to all scripts thanks to Rubocop
This commit is contained in:
@@ -235,7 +235,7 @@ def XPML_read(map,markup,event,max_param_number = 0)
|
|||||||
if event.list[i].code == 108 &&
|
if event.list[i].code == 108 &&
|
||||||
event.list[i].parameters[0].downcase == "begin " + markup.downcase
|
event.list[i].parameters[0].downcase == "begin " + markup.downcase
|
||||||
parameter_list = [] if parameter_list == nil
|
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
|
if event.list[j].code == 108
|
||||||
parts = event.list[j].parameters[0].split
|
parts = event.list[j].parameters[0].split
|
||||||
if parts.size != 1 && parts[0].downcase != "begin"
|
if parts.size != 1 && parts[0].downcase != "begin"
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ class Battle::Scene::CommandMenu < Battle::Scene::MenuBase
|
|||||||
button = SpriteWrapper.new(viewport)
|
button = SpriteWrapper.new(viewport)
|
||||||
button.bitmap = @buttonBitmap.bitmap
|
button.bitmap = @buttonBitmap.bitmap
|
||||||
button.x = self.x + Graphics.width - 260
|
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 = self.y + 6
|
||||||
button.y += (((i / 2) == 0) ? 0 : BUTTON_HEIGHT - 4)
|
button.y += (((i / 2) == 0) ? 0 : BUTTON_HEIGHT - 4)
|
||||||
button.src_rect.width = @buttonBitmap.width / 2
|
button.src_rect.width = @buttonBitmap.width / 2
|
||||||
@@ -245,7 +245,7 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
|
|||||||
button = SpriteWrapper.new(viewport)
|
button = SpriteWrapper.new(viewport)
|
||||||
button.bitmap = @buttonBitmap.bitmap
|
button.bitmap = @buttonBitmap.bitmap
|
||||||
button.x = self.x + 4
|
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 = self.y + 6
|
||||||
button.y += (((i / 2) == 0) ? 0 : BUTTON_HEIGHT - 4)
|
button.y += (((i / 2) == 0) ? 0 : BUTTON_HEIGHT - 4)
|
||||||
button.src_rect.width = @buttonBitmap.width / 2
|
button.src_rect.width = @buttonBitmap.width / 2
|
||||||
|
|||||||
@@ -429,8 +429,7 @@ class PurifyChamberScreen
|
|||||||
# Place Pokemon in the set
|
# Place Pokemon in the set
|
||||||
curpkmn = PurifyChamberHelper.pbGetPokemon(@chamber, cmd[1])
|
curpkmn = PurifyChamberHelper.pbGetPokemon(@chamber, cmd[1])
|
||||||
if curpkmn || heldpkmn
|
if curpkmn || heldpkmn
|
||||||
commands=[_INTL("MOVE"),_INTL("SUMMARY"),
|
commands = [_INTL("MOVE"), _INTL("SUMMARY"), _INTL("WITHDRAW")]
|
||||||
_INTL("WITHDRAW")]
|
|
||||||
if curpkmn && heldpkmn
|
if curpkmn && heldpkmn
|
||||||
commands[0] = _INTL("EXCHANGE")
|
commands[0] = _INTL("EXCHANGE")
|
||||||
elsif heldpkmn
|
elsif heldpkmn
|
||||||
|
|||||||
@@ -154,8 +154,7 @@ BattleDebugMenuCommands.register("weather", {
|
|||||||
msg += _INTL("Duration : Infinite")
|
msg += _INTL("Duration : Infinite")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
cmd = pbMessage("\\ts[]" + msg, [
|
cmd = pbMessage("\\ts[]" + msg, [_INTL("Change type"),
|
||||||
_INTL("Change type"),
|
|
||||||
_INTL("Change duration"),
|
_INTL("Change duration"),
|
||||||
_INTL("Clear weather")], -1, nil, cmd)
|
_INTL("Clear weather")], -1, nil, cmd)
|
||||||
break if cmd < 0
|
break if cmd < 0
|
||||||
@@ -216,8 +215,7 @@ BattleDebugMenuCommands.register("terrain", {
|
|||||||
msg += _INTL("Duration : Infinite")
|
msg += _INTL("Duration : Infinite")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
cmd = pbMessage("\\ts[]" + msg, [
|
cmd = pbMessage("\\ts[]" + msg, [_INTL("Change type"),
|
||||||
_INTL("Change type"),
|
|
||||||
_INTL("Change duration"),
|
_INTL("Change duration"),
|
||||||
_INTL("Clear terrain")], -1, nil, cmd)
|
_INTL("Clear terrain")], -1, nil, cmd)
|
||||||
break if cmd < 0
|
break if cmd < 0
|
||||||
@@ -270,8 +268,7 @@ BattleDebugMenuCommands.register("environment", {
|
|||||||
msg = _INTL("Environment: {1}", environment_data.name || _INTL("Unknown"))
|
msg = _INTL("Environment: {1}", environment_data.name || _INTL("Unknown"))
|
||||||
msg += "\r\n"
|
msg += "\r\n"
|
||||||
msg += _INTL("Time of day: {1}", [_INTL("Day"), _INTL("Evening"), _INTL("Night")][battle.time])
|
msg += _INTL("Time of day: {1}", [_INTL("Day"), _INTL("Evening"), _INTL("Night")][battle.time])
|
||||||
cmd = pbMessage("\\ts[]" + msg, [
|
cmd = pbMessage("\\ts[]" + msg, [_INTL("Change environment"),
|
||||||
_INTL("Change environment"),
|
|
||||||
_INTL("Change time of day")], -1, nil, cmd)
|
_INTL("Change time of day")], -1, nil, cmd)
|
||||||
break if cmd < 0
|
break if cmd < 0
|
||||||
case cmd
|
case cmd
|
||||||
@@ -379,7 +376,6 @@ BattleDebugMenuCommands.register("speed_order", {
|
|||||||
"description" => _INTL("Show all battlers in order from fastest to slowest."),
|
"description" => _INTL("Show all battlers in order from fastest to slowest."),
|
||||||
"always_show" => true,
|
"always_show" => true,
|
||||||
"effect" => proc { |battle|
|
"effect" => proc { |battle|
|
||||||
battlers = []
|
|
||||||
battlers = battle.allBattlers.map { |b| [b, b.pbSpeed] }
|
battlers = battle.allBattlers.map { |b| [b, b.pbSpeed] }
|
||||||
battlers.sort! { |a, b| b[1] <=> a[1] }
|
battlers.sort! { |a, b| b[1] <=> a[1] }
|
||||||
commands = []
|
commands = []
|
||||||
|
|||||||
@@ -255,9 +255,8 @@ BattlerDebugMenuCommands.register("hiddenvalues", {
|
|||||||
cmd = 0
|
cmd = 0
|
||||||
loop do
|
loop do
|
||||||
persid = sprintf("0x%08X", pkmn.personalID)
|
persid = sprintf("0x%08X", pkmn.personalID)
|
||||||
cmd = pbMessage("\\ts[]" + _INTL("Personal ID is {1}.", persid), [
|
cmd = pbMessage("\\ts[]" + _INTL("Personal ID is {1}.", persid),
|
||||||
_INTL("Set EVs"),
|
[_INTL("Set EVs"), _INTL("Set IVs")], -1, nil, cmd)
|
||||||
_INTL("Set IVs")], -1, nil, cmd)
|
|
||||||
break if cmd < 0
|
break if cmd < 0
|
||||||
case cmd
|
case cmd
|
||||||
when 0 # Set EVs
|
when 0 # Set EVs
|
||||||
@@ -506,10 +505,8 @@ BattlerDebugMenuCommands.register("setmovepp", {
|
|||||||
cmd2 = 0
|
cmd2 = 0
|
||||||
loop do
|
loop do
|
||||||
msg = _INTL("{1}: PP {2}/{3} (PP Up {4}/3)", move_name, move.pp, move.total_pp, move.ppup)
|
msg = _INTL("{1}: PP {2}/{3} (PP Up {4}/3)", move_name, move.pp, move.total_pp, move.ppup)
|
||||||
cmd2 = pbMessage("\\ts[]" + msg, [
|
cmd2 = pbMessage("\\ts[]" + msg,
|
||||||
_INTL("Set PP"),
|
[_INTL("Set PP"), _INTL("Full PP"), _INTL("Set PP Up")], -1, nil, cmd2)
|
||||||
_INTL("Full PP"),
|
|
||||||
_INTL("Set PP Up")], -1, nil, cmd2)
|
|
||||||
break if cmd2 < 0
|
break if cmd2 < 0
|
||||||
case cmd2
|
case cmd2
|
||||||
when 0 # Change PP
|
when 0 # Change PP
|
||||||
@@ -680,10 +677,8 @@ BattlerDebugMenuCommands.register("setgender", {
|
|||||||
cmd = 0
|
cmd = 0
|
||||||
loop do
|
loop do
|
||||||
msg = [_INTL("Gender is male."), _INTL("Gender is female.")][pkmn.male? ? 0 : 1]
|
msg = [_INTL("Gender is male."), _INTL("Gender is female.")][pkmn.male? ? 0 : 1]
|
||||||
cmd = pbMessage("\\ts[]" + msg, [
|
cmd = pbMessage("\\ts[]" + msg,
|
||||||
_INTL("Make male"),
|
[_INTL("Make male"), _INTL("Make female"), _INTL("Reset")], -1, nil, cmd)
|
||||||
_INTL("Make female"),
|
|
||||||
_INTL("Reset")], -1, nil, cmd)
|
|
||||||
break if cmd < 0
|
break if cmd < 0
|
||||||
case cmd
|
case cmd
|
||||||
when 0 # Make male
|
when 0 # Make male
|
||||||
@@ -747,8 +742,8 @@ BattlerDebugMenuCommands.register("setshininess", {
|
|||||||
loop do
|
loop do
|
||||||
msg_idx = pkmn.shiny? ? (pkmn.super_shiny? ? 1 : 0) : 2
|
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]
|
msg = [_INTL("Is shiny."), _INTL("Is super shiny."), _INTL("Is normal (not shiny).")][msg_idx]
|
||||||
cmd = pbMessage("\\ts[]" + msg, [
|
cmd = pbMessage("\\ts[]" + msg,
|
||||||
_INTL("Make shiny"),
|
[_INTL("Make shiny"),
|
||||||
_INTL("Make super shiny"),
|
_INTL("Make super shiny"),
|
||||||
_INTL("Make normal"),
|
_INTL("Make normal"),
|
||||||
_INTL("Reset")], -1, nil, cmd)
|
_INTL("Reset")], -1, nil, cmd)
|
||||||
|
|||||||
Reference in New Issue
Block a user