Barotrauma Client
|
Public Types | |
enum | ObjectiveType { None = 0 , Order = 1 , Objective = 2 , MinValue = 0 , MaxValue = 2 } |
Public Member Functions | |
AIObjectiveManager (Character character) | |
void | AddObjective (AIObjective objective) |
void | AddObjective< T > (T objective) |
void | CreateAutonomousObjectives () |
void | AddObjective< T > (T objective, float delay, Action callback=null) |
T | GetObjective< T > () |
float | GetCurrentPriority () |
Returns the highest priority of the current objective and its subobjectives. | |
void | UpdateObjectives (float deltaTime) |
void | SortObjectives () |
void | DoCurrentObjective (float deltaTime) |
void | SetForcedOrder (AIObjective objective) |
void | ClearForcedOrder () |
void | SetOrder (Order order, bool speak) |
AIObjective | CreateObjective (Order order, float priorityModifier=1) |
bool | IsCurrentOrder< T > () |
Only checks the current order. Deprecated, use pattern matching instead. | |
bool | IsCurrentObjective< T > () |
Checks the current objective (which can be an order too). Deprecated, use pattern matching instead. | |
bool | HasObjectiveOrOrder< T > () |
Checks if any objectives or orders are of the specified type. Regardless of whether the objective is active or inactive. | |
AIObjective | GetActiveObjective () |
T | GetOrder< T > () |
Return the first order whose objective is of the given type. Can return null. | |
Order | GetOrder (AIObjective objective) |
Return the first order with the specified objective. Can return null. | |
T | GetLastActiveObjective< T > () |
Returns the last active objective of the specified objective type. Should generally be used to get the active objective (or subobjective) of objectives that don't sort their subobjectives by priority (see AIObjective.AllowSubObjectiveSorting. | |
T | GetFirstActiveObjective< T > () |
Returns the first active objective of the specified objective type. Should generally be used to get the active objective (or subobjective) of objectives that sort their subobjectives by priority, such as those that inherit AIObjectiveLoop. | |
IEnumerable< T > | GetActiveObjectives< T > () |
Returns all active objectives of the specific type. | |
bool | HasActiveObjective< T > () |
bool | IsOrder (AIObjective objective) |
bool | HasOrders () |
bool | HasOrder< T > (Func< T, bool > predicate=null) |
float | GetOrderPriority (AIObjective objective) |
Order | GetCurrentOrderInfo () |
Public Attributes | |
bool | FailedToFindDivingGearForDepth |
Static Public Attributes | |
const float | MaxObjectivePriority = 100 |
Highest possible priority for any objective. Used in certain cases where the character needs to react immediately to survive, such as finding a suit when under pressure or getting out of a burning room. | |
const float | EmergencyObjectivePriority = 90 |
Priority of objectives such as finding safety, rescuing someone in a critical state or defending against an attacker (= objectives that are critical for saving the character's or someone else's life) | |
const float | HighestOrderPriority = 70 |
Maximum priority of an order given to the character (forced order, or the leftmost order in the crew list) | |
const float | LowestOrderPriority = 60 |
Maximum priority of an order given to the character (rightmost order in the crew list) | |
const float | RunPriority = 50 |
Objectives with a priority equal to or higher than this make the character run. | |
const float | baseDevotion = 5 |
Properties | |
List< AIObjective > | Objectives = new List<AIObjective>() [get] |
Excluding the current order. | |
HumanAIController | HumanAIController [get] |
float | WaitTimer [get, set] |
When set above zero, the character will stand still doing nothing until the timer runs out. Does not affect orders, find safety or combat. | |
List< Order > | CurrentOrders = new List<Order>() [get] |
AIObjective | CurrentOrder [get] |
The AIObjective in CurrentOrders with the highest AIObjective.Priority | |
AIObjective | ForcedOrder [get] |
AIObjective | CurrentObjective [get] |
Includes orders. | |
Dictionary< AIObjective, CoroutineHandle > | DelayedObjectives = new Dictionary<AIObjective, CoroutineHandle>() [get] |
bool | FailedAutonomousObjectives [get] |
Barotrauma.AIObjectiveManager.AIObjectiveManager | ( | Character | character | ) |
void Barotrauma.AIObjectiveManager.AddObjective | ( | AIObjective | objective | ) |
void Barotrauma.AIObjectiveManager.AddObjective< T > | ( | T | objective | ) |
T | : | AIObjective |
void Barotrauma.AIObjectiveManager.AddObjective< T > | ( | T | objective, |
float | delay, | ||
Action | callback = null ) |
T | : | AIObjective |
void Barotrauma.AIObjectiveManager.ClearForcedOrder | ( | ) |
void Barotrauma.AIObjectiveManager.CreateAutonomousObjectives | ( | ) |
AIObjective Barotrauma.AIObjectiveManager.CreateObjective | ( | Order | order, |
float | priorityModifier = 1 ) |
void Barotrauma.AIObjectiveManager.DoCurrentObjective | ( | float | deltaTime | ) |
AIObjective Barotrauma.AIObjectiveManager.GetActiveObjective | ( | ) |
IEnumerable< T > Barotrauma.AIObjectiveManager.GetActiveObjectives< T > | ( | ) |
Returns all active objectives of the specific type.
T | : | AIObjective |
Order Barotrauma.AIObjectiveManager.GetCurrentOrderInfo | ( | ) |
float Barotrauma.AIObjectiveManager.GetCurrentPriority | ( | ) |
Returns the highest priority of the current objective and its subobjectives.
T Barotrauma.AIObjectiveManager.GetFirstActiveObjective< T > | ( | ) |
Returns the first active objective of the specified objective type. Should generally be used to get the active objective (or subobjective) of objectives that sort their subobjectives by priority, such as those that inherit AIObjectiveLoop.
T | : | AIObjective |
T Barotrauma.AIObjectiveManager.GetLastActiveObjective< T > | ( | ) |
Returns the last active objective of the specified objective type. Should generally be used to get the active objective (or subobjective) of objectives that don't sort their subobjectives by priority (see AIObjective.AllowSubObjectiveSorting.
T | : | AIObjective |
T Barotrauma.AIObjectiveManager.GetObjective< T > | ( | ) |
T | : | AIObjective |
Order Barotrauma.AIObjectiveManager.GetOrder | ( | AIObjective | objective | ) |
Return the first order with the specified objective. Can return null.
T Barotrauma.AIObjectiveManager.GetOrder< T > | ( | ) |
Return the first order whose objective is of the given type. Can return null.
T | : | AIObjective |
float Barotrauma.AIObjectiveManager.GetOrderPriority | ( | AIObjective | objective | ) |
bool Barotrauma.AIObjectiveManager.HasActiveObjective< T > | ( | ) |
T | : | AIObjective |
bool Barotrauma.AIObjectiveManager.HasObjectiveOrOrder< T > | ( | ) |
Checks if any objectives or orders are of the specified type. Regardless of whether the objective is active or inactive.
T | : | AIObjective |
bool Barotrauma.AIObjectiveManager.HasOrder< T > | ( | Func< T, bool > | predicate = null | ) |
T | : | AIObjective |
bool Barotrauma.AIObjectiveManager.HasOrders | ( | ) |
bool Barotrauma.AIObjectiveManager.IsCurrentObjective< T > | ( | ) |
Checks the current objective (which can be an order too). Deprecated, use pattern matching instead.
T | : | AIObjective |
bool Barotrauma.AIObjectiveManager.IsCurrentOrder< T > | ( | ) |
Only checks the current order. Deprecated, use pattern matching instead.
T | : | AIObjective |
bool Barotrauma.AIObjectiveManager.IsOrder | ( | AIObjective | objective | ) |
void Barotrauma.AIObjectiveManager.SetForcedOrder | ( | AIObjective | objective | ) |
void Barotrauma.AIObjectiveManager.SetOrder | ( | Order | order, |
bool | speak ) |
void Barotrauma.AIObjectiveManager.SortObjectives | ( | ) |
void Barotrauma.AIObjectiveManager.UpdateObjectives | ( | float | deltaTime | ) |
|
static |
|
static |
Priority of objectives such as finding safety, rescuing someone in a critical state or defending against an attacker (= objectives that are critical for saving the character's or someone else's life)
bool Barotrauma.AIObjectiveManager.FailedToFindDivingGearForDepth |
|
static |
Maximum priority of an order given to the character (forced order, or the leftmost order in the crew list)
|
static |
Maximum priority of an order given to the character (rightmost order in the crew list)
|
static |
Highest possible priority for any objective. Used in certain cases where the character needs to react immediately to survive, such as finding a suit when under pressure or getting out of a burning room.
|
static |
Objectives with a priority equal to or higher than this make the character run.
|
get |
Includes orders.
|
get |
The AIObjective in CurrentOrders with the highest AIObjective.Priority
|
get |
|
get |
|
get |
|
get |
|
get |
Excluding the current order.
|
getset |
When set above zero, the character will stand still doing nothing until the timer runs out. Does not affect orders, find safety or combat.