LocationFilter: conditions, reachable, mapped, elsewhere, entered, landed #23
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.
Feature: Location filters can have conditions, visit info, reachability, and other PlayerInfo things.
This is identical to PR endless-sky#8260 to endless-sky master.
Related issues: #7789, #7702, #5525, #5395
A previous attempt at visit-related features in a LocationFilter is: #5415 and I have addressed the issues raised there.
Feature Details
Connects PlayerInfo to LocationFilter, allowing this:
All those features will work in any location filters except person and the location test program. In those two, you can use
elsewhere
but not the others. However, the meaning ofelsewhere
depends on the context; it is always the center of the search.UI Screenshots
N/A
Usage Examples
not
blocks to select different regions based on conditions. This may let us merge multiple missions into one, when the difference was just source or destinationmapped
orreachable
locations.entered
,landed
,mapped
) to prevent accidentally giving away map information before it is time to.Testing Done
Lots of printfs, since the location test program has no PlayerInfo. (That can be dealt with in a later PR.)
Here are some examples:
filtertest.txt
Automated Tests Added
N/A
Performance Impact
No impact to existing features.
The
reachable
andmapped
calculate a DistanceMap, which is expensive, so they should be restricted to mission destination/stopover/waypoint filters. If you use them in persons and enforcement zones, then things may get slow. I can't imagine how they'd be useful there... just sayin'.