mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-22 14:26:01 +00:00
Minor refactoring to kill various Rubocop warnings
This commit is contained in:
@@ -1707,7 +1707,7 @@ module Compiler
|
||||
GameData::MapMetadata::DATA.clear
|
||||
map_infos = pbLoadMapInfos
|
||||
map_names = []
|
||||
map_infos.keys.each { |id| map_names[id] = map_infos[id].name }
|
||||
map_infos.each_key { |id| map_names[id] = map_infos[id].name }
|
||||
# Read from PBS file
|
||||
File.open(path, "rb") { |f|
|
||||
FileLineData.file = path # For error reporting
|
||||
|
||||
@@ -152,9 +152,9 @@ module Compiler
|
||||
f.write("IsSpecialType = true\r\n") if type.special?
|
||||
f.write("IsPseudoType = true\r\n") if type.pseudo_type
|
||||
f.write(sprintf("Flags = %s\r\n", type.flags.join(","))) if type.flags.length > 0
|
||||
f.write("Weaknesses = #{type.weaknesses.join(",")}\r\n") if type.weaknesses.length > 0
|
||||
f.write("Resistances = #{type.resistances.join(",")}\r\n") if type.resistances.length > 0
|
||||
f.write("Immunities = #{type.immunities.join(",")}\r\n") if type.immunities.length > 0
|
||||
f.write("Weaknesses = #{type.weaknesses.join(',')}\r\n") if type.weaknesses.length > 0
|
||||
f.write("Resistances = #{type.resistances.join(',')}\r\n") if type.resistances.length > 0
|
||||
f.write("Immunities = #{type.immunities.join(',')}\r\n") if type.immunities.length > 0
|
||||
end
|
||||
}
|
||||
process_pbs_file_message_end
|
||||
@@ -204,7 +204,7 @@ module Compiler
|
||||
f.write("Target = #{move.target}\r\n")
|
||||
f.write("Priority = #{move.priority}\r\n") if move.priority != 0
|
||||
f.write("FunctionCode = #{move.function_code}\r\n")
|
||||
f.write("Flags = #{move.flags.join(",")}\r\n") if move.flags.length > 0
|
||||
f.write("Flags = #{move.flags.join(',')}\r\n") if move.flags.length > 0
|
||||
f.write("EffectChance = #{move.effect_chance}\r\n") if move.effect_chance > 0
|
||||
f.write("Description = #{move.real_description}\r\n")
|
||||
end
|
||||
|
||||
@@ -1180,10 +1180,10 @@ module Compiler
|
||||
)
|
||||
changed = true
|
||||
end
|
||||
if false # deletedRoute
|
||||
insertMoveRouteAt.call(list,list.length-1,deletedRoute)
|
||||
changed = true
|
||||
end
|
||||
# if deletedRoute
|
||||
# insertMoveRouteAt.call(list,list.length-1,deletedRoute)
|
||||
# changed = true
|
||||
# end
|
||||
end
|
||||
when 101 # Show Text
|
||||
# Capitalise/decapitalise various text formatting codes
|
||||
|
||||
Reference in New Issue
Block a user