AlexSatrapa / StarfieldOutpostCLI

A simple calculator to help build outposts in Starfield
Other
0 stars 0 forks source link

Parser can't handle my labelling style: '- 2 Wind Turbine - Advanced (power: 12)' #3

Closed AlexSatrapa closed 4 months ago

AlexSatrapa commented 4 months ago

I use the stuff in brackets to provide various labels. The most important to me is the power produced by solar and wind structures. This is definitive for each planet, so rather than turning up and expecting to be able to produce 14 power, some planets have thinner atmospheres to the Wind Turbine - Advanced is only going to produce 6 power.

At this point, just strip everything from the first open parenthesis to the end of the string. Also check for numbers at the beginning, and set the count of that item to be that number.

We'll revisit labels later to allow things like:

Which will be counted internally as 5 industrial solids extractors.

AlexSatrapa commented 4 months ago

Commit 18d3f310853a adds recognition of leading count and trailing labels.

Next up is recognising the power label and updating generators appropriately.

AlexSatrapa commented 4 months ago

Note that a complicating factor is that my labelling style is not YAML. What I'm writing is something that started as a Markdown bulleted list and morphed a structure of its own.

AlexSatrapa commented 4 months ago

Resolved by #10