objective_holder
An objective holder for minds, antag datums, and teams.
Vars | |
assigned_targets | A list of strings which contain targets of the antagonist's objectives. Used to prevent duplicate objectives. |
---|---|
objective_owner | Who do we belong to [mind, antagonist, team] |
objectives | Our list of current objectives |
on_add_callback | A callback invoked when a new objective is added. This is required because sometimes objectives are added directly without going through objective_owner. Not currently used. |
on_remove_callback | A callback invoked when a new objective is added. This is required because sometimes objectives are removed directly without going through objective_owner (EX: replace_objective(), clear()). Not currently used. |
Procs | |
add_objective | Add an objective. |
clear | Clear all objectives of a certain type |
get_holder_owner | Returns objective_owner |
get_objectives | Get all of the objectives we own |
handle_objective | Handles the searching of targets for objectives that need it. |
has_objectives | Do we have any objectives |
remove_objective | Remove an objective and deletes it. You should never need to transfer an objective. |
replace_objective | Replace old_objective with new_objective |
set_callbacks | Sets the callbacks, not on new because that can be irreliable for subtypes. |
Var Details
assigned_targets
A list of strings which contain targets of the antagonist's objectives. Used to prevent duplicate objectives.
objective_owner
Who do we belong to [mind, antagonist, team]
objectives
Our list of current objectives
on_add_callback
A callback invoked when a new objective is added. This is required because sometimes objectives are added directly without going through objective_owner. Not currently used.
on_remove_callback
A callback invoked when a new objective is added. This is required because sometimes objectives are removed directly without going through objective_owner (EX: replace_objective(), clear()). Not currently used.
Proc Details
add_objective
Add an objective.
- Objective - The objective to add /datum/objective, path
- _explanation_text - Optional, will assign this text to the objective
- target_override - A target override, will prevent finding a target
- add_to_list - Do we add the new objective to our list? Or will it be handled elsewhere (like replace_objective). Should not be set to false outside of this file.
clear
Clear all objectives of a certain type
- checktype - The type to check, if null, remoe all objectives.
get_holder_owner
Returns objective_owner
get_objectives
Get all of the objectives we own
handle_objective
Handles the searching of targets for objectives that need it.
has_objectives
Do we have any objectives
remove_objective
Remove an objective and deletes it. You should never need to transfer an objective.
replace_objective
Replace old_objective with new_objective
set_callbacks
Sets the callbacks, not on new because that can be irreliable for subtypes.