-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New countable for adopted policies supports policyFilter #13191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
"Adopted [[Tradition] branch] Policies" to 7, | ||
"Adopted [Liberty Complete] Policies" to 0, | ||
"Adopted [[Liberty] branch] Policies" to 2, | ||
"Adopted [[all] branch] Policies" to 5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can All be lower than just Tradition?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all, all branch = started branches. Commented somewhere. Yes maybe a confusing name but this way it didn't need new translation entries. Should change to "[started] branch"? "branch starter"? Dunno.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still a blocker for me, something here is either broken or unintuitive enough that the interface needs changing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Victim of my own crimes...
- Sorry for zoning out for a few weeks after kicking up the Expressions nest, still need to read up on ~50 unread mails
- The actual filter support this is using was already merged in More improvements to internal Countables handling #13187, so I was searching the git log in vain for these
- Boils down to what wording to use for "filter only those
Policy
instances that are aPolicyBranch
- Maybe better remove that (already merged) filter option, remove the test here using it, and re-imagine such a filter afterwards in a new PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should fix it to return the number of policies that fit the filter, not the number of branches, if that's what it's doing
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
# Conflicts: # docs/Modders/Unique-parameters.md
Conflicts have been resolved. |
OK, bb9541b removes the contentious filter option entirely. When we decide on a name, we can always reintroduce it easily. ( |
This is what I hope can serve as clean example on how to create new Countables.
The only complication was that it needed a cleaner policy creating tool in the TestGame class, having uninitialized lateinits like the older createPolicy leaves isn't sufficient to run Policy.matchesFilter on.