mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
More Rubocop changes
This commit is contained in:
@@ -368,7 +368,7 @@ MenuHandlers.add(:debug_menu, :reset_trainers, {
|
||||
"description" => _INTL("Turn off Self Switches A and B for all events with \"Trainer\" in their name."),
|
||||
"effect" => proc {
|
||||
if $game_map
|
||||
$game_map.events.values.each do |event|
|
||||
$game_map.events.each_value do |event|
|
||||
if event.name[/trainer/i]
|
||||
$game_self_switches[[$game_map.map_id, event.id, "A"]] = false
|
||||
$game_self_switches[[$game_map.map_id, event.id, "B"]] = false
|
||||
|
||||
@@ -20,7 +20,7 @@ def pbWarpToMap
|
||||
y = rand(map.height)
|
||||
next if !map.passableStrict?(x, y, 0, $game_player)
|
||||
blocked = false
|
||||
map.events.values.each do |event|
|
||||
map.events.each_value do |event|
|
||||
if event.at_coordinate?(x, y) && !event.through && event.character_name != ""
|
||||
blocked = true
|
||||
end
|
||||
@@ -101,7 +101,7 @@ class SpriteWindow_DebugVariables < Window_DrawableCommand
|
||||
status = $game_variables[index + 1].to_s
|
||||
status = "\"__\"" if nil_or_empty?(status)
|
||||
end
|
||||
name = '' if name.nil?
|
||||
name ||= ""
|
||||
id_text = sprintf("%04d:", index + 1)
|
||||
rect = drawCursor(index, rect)
|
||||
totalWidth = rect.width
|
||||
@@ -655,12 +655,11 @@ def pbImportAllAnimations
|
||||
missingFiles.push(textdata.graphic)
|
||||
end
|
||||
textdata.timing.each do |timing|
|
||||
if timing.name && timing.name != "" &&
|
||||
!safeExists?(folder + "/" + timing.name) &&
|
||||
!FileTest.audio_exist?("Audio/SE/Anim/" + timing.name)
|
||||
timing.name = ""
|
||||
missingFiles.push(timing.name)
|
||||
end
|
||||
next if !timing.name || timing.name == "" ||
|
||||
safeExists?(folder + "/" + timing.name) ||
|
||||
FileTest.audio_exist?("Audio/SE/Anim/" + timing.name)
|
||||
timing.name = ""
|
||||
missingFiles.push(timing.name)
|
||||
end
|
||||
animations[index] = textdata
|
||||
end
|
||||
@@ -706,7 +705,7 @@ def pbDebugFixInvalidTiles
|
||||
end
|
||||
end
|
||||
# Check all events in map for page graphics using a non-existent tile
|
||||
map.events.keys.each do |key|
|
||||
map.events.each_key do |key|
|
||||
event = map.events[key]
|
||||
event.pages.each do |page|
|
||||
next if page.graphic.tile_id <= 0
|
||||
|
||||
@@ -24,8 +24,8 @@ module FilenameUpdater
|
||||
# starts automatic renaming
|
||||
files.each_with_index do |file, i|
|
||||
next if file[/^berrytree_/]
|
||||
next if ["berrytreewet", "berrytreedamp", "berrytreedry", "berrytreeplanted"].include?(file.split('.')[0])
|
||||
new_file = file.gsub('berrytree', 'berrytree_')
|
||||
next if ["berrytreewet", "berrytreedamp", "berrytreedry", "berrytreeplanted"].include?(file.split(".")[0])
|
||||
new_file = file.gsub("berrytree", "berrytree_")
|
||||
File.move(src_dir + file, src_dir + new_file)
|
||||
ret = true
|
||||
end
|
||||
@@ -47,7 +47,7 @@ module FilenameUpdater
|
||||
map = mapData.getMap(id)
|
||||
next if !map || !mapData.mapinfos[id]
|
||||
changed = false
|
||||
map.events.keys.each do |key|
|
||||
map.events.each_key do |key|
|
||||
if Time.now.to_i - t >= 5
|
||||
Graphics.update
|
||||
t = Time.now.to_i
|
||||
@@ -56,8 +56,8 @@ module FilenameUpdater
|
||||
next if nil_or_empty?(page.graphic.character_name)
|
||||
char_name = page.graphic.character_name
|
||||
next if !char_name[/^berrytree[^_]+/]
|
||||
next if ["berrytreewet", "berrytreedamp", "berrytreedry", "berrytreeplanted"].include?(char_name.split('.')[0])
|
||||
new_file = page.graphic.character_name.gsub('berrytree', 'berrytree_')
|
||||
next if ["berrytreewet", "berrytreedamp", "berrytreedry", "berrytreeplanted"].include?(char_name.split(".")[0])
|
||||
new_file = page.graphic.character_name.gsub("berrytree", "berrytree_")
|
||||
page.graphic.character_name = new_file
|
||||
changed = true
|
||||
end
|
||||
|
||||
@@ -77,7 +77,7 @@ MenuHandlers.add(:battle_debug_menu, :list_foe_battlers, {
|
||||
MenuHandlers.add(:battle_debug_menu, :field, {
|
||||
"name" => _INTL("Field Effects..."),
|
||||
"parent" => :main,
|
||||
"description" => _INTL("Effects that apply to the whole battlefield."),
|
||||
"description" => _INTL("Effects that apply to the whole battlefield.")
|
||||
})
|
||||
|
||||
MenuHandlers.add(:battle_debug_menu, :weather, {
|
||||
|
||||
@@ -707,15 +707,14 @@ MenuHandlers.add(:battle_pokemon_debug_menu, :set_form, {
|
||||
cmd = pbMessage("\\ts[]" + _INTL("Form is {1}.", pkmn.form), formcmds[1], -1, nil, cmd)
|
||||
next if cmd < 0
|
||||
f = formcmds[0][cmd]
|
||||
if f != pkmn.form
|
||||
pkmn.forced_form = nil
|
||||
if MultipleForms.hasFunction?(pkmn, "getForm")
|
||||
next if !pbConfirmMessage(_INTL("This species decides its own form. Override?"))
|
||||
pkmn.forced_form = f
|
||||
end
|
||||
pkmn.form_simple = f
|
||||
battler.form = pkmn.form if battler
|
||||
next if f == pkmn.form
|
||||
pkmn.forced_form = nil
|
||||
if MultipleForms.hasFunction?(pkmn, "getForm")
|
||||
next if !pbConfirmMessage(_INTL("This species decides its own form. Override?"))
|
||||
pkmn.forced_form = f
|
||||
end
|
||||
pkmn.form_simple = f
|
||||
battler.form = pkmn.form if battler
|
||||
end
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user