Need help restructuring ShipPartsParser
Posted: Mon Oct 08, 2018 11:26 am
I wanted to restructure the parsing of capacity/damage/shots because it helps me with the targetting feature and makes also sense.
The difference is between weapons (damage -> capacity, shots -> capacity2) and the hangar/other parts (capacity -> capacity, damage -> capacity2).
So it would make sense that the subparser creates a pair<optional<double>,optional<double>> which gets used from the outer parser. But actually i do not know how to do so.
here is what i managed until now: commit
Any hints how to proceed?
The difference is between weapons (damage -> capacity, shots -> capacity2) and the hangar/other parts (capacity -> capacity, damage -> capacity2).
So it would make sense that the subparser creates a pair<optional<double>,optional<double>> which gets used from the outer parser. But actually i do not know how to do so.
here is what i managed until now: commit
Any hints how to proceed?