World dev wants to fill useful, filler and trap locally.
Problem:
fill_restrictive is slow because it thinks it needs to do location access stuff.
remaining_filldoes not respect excluded locations inherently for useful items - Fill actually does two calls to it, once with excludedlocations and filleritempool, then with defaultlocations and restitempool
Result:
World dev chooses to reimplement their own random fill with location.can_fill
This has happened at least twice now, as far as I know.
What this PR does
Add an argument to remaining_fill for whether to check only the item rule or do a full location.can_fill check
Alternatives
Just always check location.can_fill? Idk, that'd be slower, but is remaining fill really our bottleneck?
Move the two calls to remaining fill inside of remaining fill, splitting the itempool into useful and non-useful in there
Use case:
World dev wants to fill useful, filler and trap locally.
Problem:
fill_restrictive
is slow because it thinks it needs to do location access stuff.remaining_fill
does not respect excluded locations inherently for useful items - Fill actually does two calls to it, once withexcludedlocations
andfilleritempool
, then withdefaultlocations
andrestitempool
Result:
World dev chooses to reimplement their own random fill with
location.can_fill
This has happened at least twice now, as far as I know.What this PR does
Add an argument to
remaining_fill
for whether to check only the item rule or do a full location.can_fill checkAlternatives
location.can_fill
? Idk, that'd be slower, but is remaining fill really our bottleneck?Tested
Not really