fix the item counts for location requirements desync with UT #150
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.
Seems the item_counts was made too late and for some reason UT and only UT couldn't see the precollected items
by creating it at the start of set_rules UT can now see precollected items too
this makes it work with both game.json's starting_items and the player yamls's start_inventory and start_inventory_from_pool
in start_inventory case item are added to the pool and just added to the counts thus for :all and any :% will grow with the items
but start_inventory_from_pool should now work correctly since the items already exists
the only way this will break is if a custom rule made in the rules.py hook call the reset of the item count cache and thus break UT again
Im not sure the best way to prevent that from happening, could potential create an invalid player in the cache (-1) and test for it and not reset if present or something