Using "cancels" makes traits mutually exclusive at character creation #36198
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Mods "Makes Made Of Sugar trait exclusive with appropriate traits"
Purpose of change
The "cancels" entry was only working one way: If A cancels B you can't take B and then take A but you can take A and then B.
Now if A cancels B if you have A you can't take B, and if you have B you can't take A.
Use this to make Made of Sugar incompatible with mutating traits, thirst traits, and food traits.
Describe the solution
Add a check to look through my_mutation and then through each "cancels" entry to search for the candidate mutation
Describe alternatives you've considered
Testing
Load the game
Additional context
The most impactfull thing here is the change to how "cancels" works but this is also a sweet cataclysm fix so I don't which of these aspects should show up in the summary.