acquire_target 
Baseline for target picking behaviors
Vars | |
| ignore_list_key | Optional blackboard key holding a lazylist of atoms to skip while filtering candidates. |
|---|---|
| minimum_distance | How close the reachability path must get to the target (0 = onto/adjacent). Passed to can_reach_target when must_be_reachable is set. |
| must_be_reachable | If TRUE, only candidates the controller can path to are eligible; unreachable ones are reported via note_unreachable_target. |
| reach_distance | Pathfinding distance limit used when must_be_reachable is set. |
| revalidation_mode | How to behave when a target is already set. See TARGET_* defines in ai.dm. |
| search_range | Range snapshot from the perform() that kicked off the current async search. |
| search_strategy | Strategy/range snapshot from the perform() that kicked off the current async search. |
| target_key | Blackboard key to write the found target into. |
| target_loss_distance | Extended range for retaining an existing target when candidates run dry. 0 = disabled. |
| target_source | Typepath of the /datum/target_source type used to gather candidates. turned into the singleton instance when used |
| targeting_strategy | Either a /datum/targeting_strategy typepath (resolved directly) or a blackboard key string |
| vision_range | How far to scan for candidates (passed to the target source). Can be a key too. |
Procs | |
| can_search | Returns TRUE to abort the search before it starts (e.g. a detection field is already active). |
| clear_stale_target | Clears the target key when revalidating and the search turned up nothing, so a stale target doesn't linger. |
| filter_candidates | Filters the candidate list to valid targets. Override to add priority filtering or other per-candidate criteria. |
| find_and_set_target | Actual behavior for collecting and filtering targets |
| get_targeting_strategy | Resolves the targeting strategy for this behavior |
| on_no_candidates | Fallback for no targets found. |
| on_no_valid_candidates | Called when filter_candidates produces nothing. Override to trigger side effects (e.g. spawning a detection field). |
| on_target_found | Called after a target is selected and written to the blackboard. Override for post-selection side effects. |
| perform_async | perform_async(): walks filtered candidates checking reachability (may sleep), then commits the result via finish_async(). |
| pick_final_target | Picks the final target from filtered candidates. Only valid for the non-reachable path; the reachable path goes async. |
| should_keep_target | Returns TRUE if the current target is still good and we should skip the search. |
Var Details
ignore_list_key 
Optional blackboard key holding a lazylist of atoms to skip while filtering candidates.
minimum_distance 
How close the reachability path must get to the target (0 = onto/adjacent). Passed to can_reach_target when must_be_reachable is set.
must_be_reachable 
If TRUE, only candidates the controller can path to are eligible; unreachable ones are reported via note_unreachable_target.
reach_distance 
Pathfinding distance limit used when must_be_reachable is set.
revalidation_mode 
How to behave when a target is already set. See TARGET_* defines in ai.dm.
search_range 
Range snapshot from the perform() that kicked off the current async search.
search_strategy 
Strategy/range snapshot from the perform() that kicked off the current async search.
target_key 
Blackboard key to write the found target into.
target_loss_distance 
Extended range for retaining an existing target when candidates run dry. 0 = disabled.
target_source 
Typepath of the /datum/target_source type used to gather candidates. turned into the singleton instance when used
targeting_strategy 
Either a /datum/targeting_strategy typepath (resolved directly) or a blackboard key string
vision_range 
How far to scan for candidates (passed to the target source). Can be a key too.
Proc Details
can_search
Returns TRUE to abort the search before it starts (e.g. a detection field is already active).
clear_stale_target
Clears the target key when revalidating and the search turned up nothing, so a stale target doesn't linger.
filter_candidates
Filters the candidate list to valid targets. Override to add priority filtering or other per-candidate criteria.
find_and_set_target
Actual behavior for collecting and filtering targets
get_targeting_strategy
Resolves the targeting strategy for this behavior
on_no_candidates
Fallback for no targets found.
on_no_valid_candidates
Called when filter_candidates produces nothing. Override to trigger side effects (e.g. spawning a detection field).
on_target_found
Called after a target is selected and written to the blackboard. Override for post-selection side effects.
perform_async
perform_async(): walks filtered candidates checking reachability (may sleep), then commits the result via finish_async().
pick_final_target
Picks the final target from filtered candidates. Only valid for the non-reachable path; the reachable path goes async.
should_keep_target
Returns TRUE if the current target is still good and we should skip the search.