The Messenger: strip generated filler items for a sufficiently small pool #1907
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.
What is this fixing or adding?
I added a unit test that tests the shop costs with the minimum amount of generated locations. With the settings in that test only 6 items can possibly be currency and if none of those have a value over 100, then all of the shop locations are immediately accessible. There's still settings where a player can have even 0 possible currency items but that's their own fault, which is fine. This change is primarily so the unit test doesn't fail by slicing the filler dictionary before filler is created if the amount of items that still need to be generated is sufficiently small.
How was this tested?
Ran the unit test about 100 times. There's still a very slim chance it can fail if the random object generates 6 "Time Shard (50)". Only way to fully prevent that is to slice the dictionary an additional value. Will do if requested, but would prefer not to.
If this makes graphical changes, please attach screenshots.