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

Public Member Functions

 AIObjectiveCleanupItems (Character character, AIObjectiveManager objectiveManager, Item prioritizedItem=null, float priorityModifier=1)
 
 AIObjectiveCleanupItems (Character character, AIObjectiveManager objectiveManager, IEnumerable< Item > prioritizedItems, float priorityModifier=1)
 
override void OnDeselected ()
 
- 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 IsItemInsideValidSubmarine (Item item, Character character)
 
static bool IsValidContainer (Item container, Character character)
 
static bool IsValidTarget (Item item, Character character, bool checkInventory, bool allowUnloading=true)
 

Public Attributes

readonly List< ItemprioritizedItems = new List<Item>()
 

Protected Member Functions

override float TargetEvaluation ()
 
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 item)
 
override void OnObjectiveCompleted (AIObjective objective, Item target)
 
- 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 = "cleanup items".ToIdentifier() [get, set]
 
override bool KeepDivingGearOn [get]
 
override bool AllowAutomaticItemUnequipping [get]
 
override bool ForceOrderPriority [get]
 
override int MaxTargets [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 8 of file AIObjectiveCleanupItems.cs.

Constructor & Destructor Documentation

◆ AIObjectiveCleanupItems() [1/2]

Barotrauma.AIObjectiveCleanupItems.AIObjectiveCleanupItems ( Character  character,
AIObjectiveManager  objectiveManager,
Item  prioritizedItem = null,
float  priorityModifier = 1 
)

Definition at line 19 of file AIObjectiveCleanupItems.cs.

◆ AIObjectiveCleanupItems() [2/2]

Barotrauma.AIObjectiveCleanupItems.AIObjectiveCleanupItems ( Character  character,
AIObjectiveManager  objectiveManager,
IEnumerable< Item prioritizedItems,
float  priorityModifier = 1 
)

Definition at line 28 of file AIObjectiveCleanupItems.cs.

Member Function Documentation

◆ Filter()

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

Definition at line 50 of file AIObjectiveCleanupItems.cs.

◆ GetList()

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

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

Implements Barotrauma.AIObjectiveLoop< Item >.

◆ IsItemInsideValidSubmarine()

static bool Barotrauma.AIObjectiveCleanupItems.IsItemInsideValidSubmarine ( Item  item,
Character  character 
)
static

Definition at line 75 of file AIObjectiveCleanupItems.cs.

◆ IsValidContainer()

static bool Barotrauma.AIObjectiveCleanupItems.IsValidContainer ( Item  container,
Character  character 
)
static

◆ IsValidTarget()

static bool Barotrauma.AIObjectiveCleanupItems.IsValidTarget ( Item  item,
Character  character,
bool  checkInventory,
bool  allowUnloading = true 
)
static

Definition at line 92 of file AIObjectiveCleanupItems.cs.

◆ ObjectiveConstructor()

override AIObjective Barotrauma.AIObjectiveCleanupItems.ObjectiveConstructor ( Item  item)
protected

◆ OnDeselected()

override void Barotrauma.AIObjectiveCleanupItems.OnDeselected ( )

Definition at line 131 of file AIObjectiveCleanupItems.cs.

◆ OnObjectiveCompleted()

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

◆ TargetEvaluation()

override float Barotrauma.AIObjectiveCleanupItems.TargetEvaluation ( )
protectedvirtual

Implements Barotrauma.AIObjectiveLoop< Item >.

Definition at line 34 of file AIObjectiveCleanupItems.cs.

Member Data Documentation

◆ prioritizedItems

readonly List<Item> Barotrauma.AIObjectiveCleanupItems.prioritizedItems = new List<Item>()

Definition at line 15 of file AIObjectiveCleanupItems.cs.

Property Documentation

◆ AllowAutomaticItemUnequipping

override bool Barotrauma.AIObjectiveCleanupItems.AllowAutomaticItemUnequipping
get

Definition at line 12 of file AIObjectiveCleanupItems.cs.

◆ ForceOrderPriority

override bool Barotrauma.AIObjectiveCleanupItems.ForceOrderPriority
getprotected

Definition at line 13 of file AIObjectiveCleanupItems.cs.

◆ Identifier

override Identifier Barotrauma.AIObjectiveCleanupItems.Identifier = "cleanup items".ToIdentifier()
getset

Definition at line 10 of file AIObjectiveCleanupItems.cs.

◆ KeepDivingGearOn

override bool Barotrauma.AIObjectiveCleanupItems.KeepDivingGearOn
get

Definition at line 11 of file AIObjectiveCleanupItems.cs.

◆ MaxTargets

override int Barotrauma.AIObjectiveCleanupItems.MaxTargets
getprotected

Definition at line 17 of file AIObjectiveCleanupItems.cs.