Barotrauma Client Doc
Barotrauma.AIObjectiveLoadItems Class Reference
Inheritance diagram for Barotrauma.AIObjectiveLoadItems:
Barotrauma.AIObjectiveLoop< Item >

Public Types

enum class  ItemCondition { Empty , Full }
 

Public Member Functions

 AIObjectiveLoadItems (Character character, AIObjectiveManager objectiveManager, Identifier option, ImmutableArray< Identifier > containerTags, Item targetContainer=null, float priorityModifier=1)
 
- Public Member Functions inherited from Barotrauma.AIObjectiveLoop< Item >
bool AddTarget (T target)
 
 AIObjectiveLoop (Character character, AIObjectiveManager objectiveManager, float priorityModifier, Identifier option=default)
 
override void Update (float deltaTime)
 
override void Reset ()
 

Static Public Member Functions

static bool IsValidTarget (Item item, Character character, ImmutableArray< Identifier >? targetContainerTags=null, ItemCondition? targetCondition=null)
 
static bool ItemMatchesTargetCondition (Item item, ItemCondition targetCondition)
 

Protected Member Functions

override bool Filter (Item target)
 
override IEnumerable< ItemGetList ()
 List of all possible items of the specified type. Used for filtering the removed objectives. More...
 
override AIObjective ObjectiveConstructor (Item target)
 
override void OnObjectiveCompleted (AIObjective objective, Item target)
 
override float TargetEvaluation ()
 
- Protected Member Functions inherited from Barotrauma.AIObjectiveLoop< Item >
override void Act (float deltaTime)
 
override bool CheckObjectiveSpecific ()
 
override float GetPriority ()
 
void UpdateTargets ()
 
virtual void FindTargets ()
 
virtual void CreateObjectives ()
 
abstract void OnObjectiveCompleted (AIObjective objective, T target)
 
abstract AIObjective ObjectiveConstructor (T target)
 
abstract bool Filter (T target)
 

Properties

override Identifier Identifier = "load items".ToIdentifier() [get, set]
 
override float IgnoreListClearInterval [get]
 
override bool ResetWhenClearingIgnoreList [get]
 
- Properties inherited from Barotrauma.AIObjectiveLoop< Item >
HashSet< T > Targets [get]
 
Dictionary< T, AIObjectiveObjectives [get]
 
virtual float TargetUpdateTimeMultiplier [get]
 
virtual float IgnoreListClearInterval [get]
 
HashSet< T > ReportedTargets [get]
 
override bool CanBeCompleted [get]
 
override bool AbandonWhenCannotCompleteSubjectives [get]
 
override bool AllowSubObjectiveSorting [get]
 
override bool AllowWhileHandcuffed [get]
 
virtual bool InverseTargetEvaluation [get]
 
virtual bool ResetWhenClearingIgnoreList [get]
 
virtual bool ForceOrderPriority [get]
 
virtual int MaxTargets [get]
 
override bool IsLoop [get, set]
 

Additional Inherited Members

- Protected Attributes inherited from Barotrauma.AIObjectiveLoop< Item >
HashSet< T > ignoreList
 
float targetUpdateTimer
 

Detailed Description

Definition at line 10 of file AIObjectiveLoadItems.cs.

Member Enumeration Documentation

◆ ItemCondition

Enumerator
Empty 
Full 

Definition at line 20 of file AIObjectiveLoadItems.cs.

Constructor & Destructor Documentation

◆ AIObjectiveLoadItems()

Barotrauma.AIObjectiveLoadItems.AIObjectiveLoadItems ( Character  character,
AIObjectiveManager  objectiveManager,
Identifier  option,
ImmutableArray< Identifier containerTags,
Item  targetContainer = null,
float  priorityModifier = 1 
)

Definition at line 26 of file AIObjectiveLoadItems.cs.

Member Function Documentation

◆ Filter()

override bool Barotrauma.AIObjectiveLoadItems.Filter ( Item  target)
protected

Definition at line 53 of file AIObjectiveLoadItems.cs.

◆ GetList()

override IEnumerable<Item> Barotrauma.AIObjectiveLoadItems.GetList ( )
protectedvirtual

List of all possible items of the specified type. Used for filtering the removed objectives.

Implements Barotrauma.AIObjectiveLoop< Item >.

◆ IsValidTarget()

static bool Barotrauma.AIObjectiveLoadItems.IsValidTarget ( Item  item,
Character  character,
ImmutableArray< Identifier >?  targetContainerTags = null,
ItemCondition targetCondition = null 
)
static

Definition at line 62 of file AIObjectiveLoadItems.cs.

◆ ItemMatchesTargetCondition()

static bool Barotrauma.AIObjectiveLoadItems.ItemMatchesTargetCondition ( Item  item,
ItemCondition  targetCondition 
)
static

Definition at line 78 of file AIObjectiveLoadItems.cs.

◆ ObjectiveConstructor()

override AIObjective Barotrauma.AIObjectiveLoadItems.ObjectiveConstructor ( Item  target)
protected

◆ OnObjectiveCompleted()

override void Barotrauma.AIObjectiveLoadItems.OnObjectiveCompleted ( AIObjective  objective,
Item  target 
)
protected

◆ TargetEvaluation()

override float Barotrauma.AIObjectiveLoadItems.TargetEvaluation ( )
protectedvirtual

Implements Barotrauma.AIObjectiveLoop< Item >.

Definition at line 107 of file AIObjectiveLoadItems.cs.

Property Documentation

◆ Identifier

override Identifier Barotrauma.AIObjectiveLoadItems.Identifier = "load items".ToIdentifier()
getset

Definition at line 12 of file AIObjectiveLoadItems.cs.

◆ IgnoreListClearInterval

override float Barotrauma.AIObjectiveLoadItems.IgnoreListClearInterval
getprotected

Definition at line 13 of file AIObjectiveLoadItems.cs.

◆ ResetWhenClearingIgnoreList

override bool Barotrauma.AIObjectiveLoadItems.ResetWhenClearingIgnoreList
getprotected

Definition at line 14 of file AIObjectiveLoadItems.cs.