nickbabcock / Pdoxcl2Sharp

A Paradox Interactive general file parser
MIT License
39 stars 13 forks source link

Convenience method for reading booleans #12

Closed nickbabcock closed 11 years ago

nickbabcock commented 11 years ago

parser.ReadBool() should be a method that is implemented so that clients don't have to memorize that "yes" means true and "no" means false

Especially since the writers have methods that write out boolean values.

TommasoBelluzzo commented 8 years ago

The parser fails to parse a rare occurrence of "1" or "0" booleans. The variable "growth_state" can be either "0" or "1" expressing "false" or "true" but the "0" value is not being taken into account and when writing data back it's probably marked as "no" or "yes" depending on the value.

nickbabcock commented 8 years ago

You're 100% right. I think you'll have to leave growth_state as a string/number and interpret it higher up, unfortunately.