Added new section-based format for abilities.txt

This commit is contained in:
Maruno17
2021-06-20 17:46:36 +01:00
parent 7c42e4ec20
commit e201821919
5 changed files with 1926 additions and 487 deletions

View File

@@ -157,13 +157,12 @@ module Compiler
def write_abilities
File.open("PBS/abilities.txt", "wb") { |f|
add_PBS_header_to_file(f)
f.write("\#-------------------------------\r\n")
GameData::Ability.each do |a|
f.write(sprintf("0,%s,%s,%s\r\n",
csvQuote(a.id.to_s),
csvQuote(a.real_name),
csvQuoteAlways(a.real_description)
))
# Write each ability in turn
GameData::Ability.each do |ability|
f.write("\#-------------------------------\r\n")
f.write("[#{ability.id}]\r\n")
f.write("Name = #{ability.real_name}\r\n")
f.write("Description = #{ability.real_description}\r\n")
end
}
Graphics.update