Refactor previous/next target selection, add targeting keybinds#2841
Open
oznogon wants to merge 2 commits intodaid:masterfrom
Open
Refactor previous/next target selection, add targeting keybinds#2841oznogon wants to merge 2 commits intodaid:masterfrom
oznogon wants to merge 2 commits intodaid:masterfrom
Conversation
Refactor TargetsContainer to handle sequentially selecting targets
by their distance from the player.
- Centralize target set population logic used by setPrev/Next().
- Add public setNext/Prev() overloads to pass a function override
for the iteration method.
- Add KnownFriendOrFoe enum to TargetsContainer to handle logic for
building target sets by their FoF state and faction relationship
to the player. This replaces the `FactionRelation` parameter in
setNext/Prev() overloads to allow more granular selections that
include or exclude entities with not-yet-known faction or FoF
relationships.
- Add prev/next selection keybinds for Weapons, Science, and Relay.
- Add prev keybind for Weapons target and hostile target.
- Add prev keybind for Science scannable target.
- Add next/prev keybinds for Science target, hostile target.
- Add next/prev keybinds for Relay targetable, hostile target,
hackable target, and launched probes. This includes logic for
selecting only targets within shared short-range radars.
- Copy new/revised Weapons keybinds to Tactical and SinglePilot.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Refactor TargetsContainer to handle sequentially selecting targets by their distance from the player, and by friend-or-foe relationship or other custom criteria. Add missing target selection keybinds to Weapons, Science, and Relay.
setPrev/Next().setPrev/Next()overloads to pass a function override for the iteration method.KnownFriendOrFoeenum to TargetsContainer to handle logic for building target sets by their FoF state and faction relationship to the player. This replaces theFactionRelationparameter insetPrev/Next()overloads to allow more granular selections that include or exclude entities with not-yet-known faction or FoF relationships.setPrev/Next().This DOES NOT CHANGE EXISTING BEHAVIORS and DOES NOT SET DEFAULT INPUTS for these new hotkeys.
Fixes #2703 by refactoring range and hostile checks.