Sped up compiling PBS files by about 5x, fixed bug from earlier commit about writing PBS lines with many optional values

This commit is contained in:
Maruno17
2023-04-05 21:41:55 +01:00
parent cb4a1fd8af
commit 3d9d31621b
4 changed files with 224 additions and 60 deletions

View File

@@ -967,9 +967,9 @@ def pbPokemonEditor
if param_type.nil?
evo[2] = nil
elsif param_type == Integer
evo[2] = Compiler.csvPosInt!(evo[2])
evo[2] = Compiler.cast_csv_value(evo[2], "u")
elsif param_type != String
evo[2] = Compiler.csvEnumField!(evo[2], param_type, "Evolutions", species_hash[:id])
evo[2] = Compiler.cast_csv_value(evo[2], "e", param_type)
end
end
# Add species' data to records