Added new section-based format for berry_plants.txt

This commit is contained in:
Maruno17
2021-11-24 19:05:18 +00:00
parent 00c2df5772
commit 479aeacc2c
7 changed files with 1396 additions and 292 deletions

View File

@@ -251,15 +251,12 @@ module Compiler
write_pbs_file_message_start(path)
File.open(path, "wb") { |f|
add_PBS_header_to_file(f)
f.write("\#-------------------------------\r\n")
GameData::BerryPlant.each do |bp|
f.write(sprintf("%s = %d,%d,%d,%d\r\n",
csvQuote(bp.id.to_s),
bp.hours_per_stage,
bp.drying_per_hour,
bp.minimum_yield,
bp.maximum_yield
))
f.write("\#-------------------------------\r\n")
f.write(sprintf("[%s]\r\n", bp.id))
f.write(sprintf("HoursPerStage = %d\r\n", bp.hours_per_stage))
f.write(sprintf("DryingPerHour = %d\r\n", bp.drying_per_hour))
f.write(sprintf("Yield = %s\r\n", bp.yield.join(",")))
end
}
process_pbs_file_message_end