Skip to content

feat: Adds the ability to use spaces in simc input#11182

Open
thevinter wants to merge 1 commit intosimulationcraft:midnightfrom
thevinter:feat/parse-spaces
Open

feat: Adds the ability to use spaces in simc input#11182
thevinter wants to merge 1 commit intosimulationcraft:midnightfrom
thevinter:feat/parse-spaces

Conversation

@thevinter
Copy link
Contributor

This PR adds whitespace stripping outside of double-quoted regions to both the C++ option parser (option.cpp) and the Python APL converter (ConvertAPL.py). This allows users to write more readable .simc files using spaces

e.g.,

actions.ec_st += /sunfire, target_if= remains < 2 | refreshable & variable.eclipse_down

instead of

actions.ec_st+=/sunfire,target_if=remains<2|refreshable&variable.eclipse_down

Important, while minor this is still a breaking change

This removes support for same-line option definitions that relied on spaces as token separators (e.g., name=Vinter race=human).

Because spaces are now stripped, multiple definitions on one line will be merged into a single token. Each option must now be on its own line.

This tradeoff is intentional since same-line definitions aren't used anywhere in the current profiles, and allowing spaces in input significantly improves readability and lowers the barrier for others editing .simc files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant