-
Notifications
You must be signed in to change notification settings - Fork 1.2k
sc2: Allowing unexcluded_items to affect items excluded by vanilla_items_only #5520
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
base: main
Are you sure you want to change the base?
sc2: Allowing unexcluded_items to affect items excluded by vanilla_items_only #5520
Conversation
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.
Check the Regen biosteel count if the vanilla items only is true. Shall be 1 if vanilla only
As I think that this check:
if item_name in item_groups.terran_original_progressive_upgrades:
auto_excludes[item_name] = max(item_data.quantity - 1, auto_excludes.get(item_name, 0))Can allow 2 stacks
Either way expected results:
OP items either state + vanilla only true -> 1
OP items excluded + vanilla only false -> 2
OP items included + vanilla only false -> 3
I'd like to see a unit test for that
The unit test already exists, it's The code is correct. Remember auto_excludes is an excluded amount, so setting it to quantity - 1 means all but 1 is excluded, or at most 1 is included. The max means that if OP items auto-excludes something, then vanilla items can exclude more but won't add to it. I guess I can add a unit test to cover the situation of OP items excluded and vanilla items only together still allowing one level of regen biosteel together. Seems too niche to be worth testing in my personal opinion, but if it speeds along approval I'm game. |
…er still allowing regen biosteel
|
As this is a main PR, I prefer rather to double check in order to avoid introducing any new bugs |
|
Did a manual test on my end:
Also tested the mentioned corner case with Regen Biosteel Looks good to me. |
What is this fixing or adding?
unexcluded_itemswouldn't affect items excluded byvanilla_items_onlylike can be done with overpowered items or unreleased units.How was this tested?
Added a new unit test. Existing unit tests ensure that default vanilla_items_only behaviour remains unchanged.
If this makes graphical changes, please attach screenshots.
None.