Barotrauma Server
Loading...
Searching...
No Matches
Barotrauma.Order Class Reference

Public Types

enum  OrderType { Current , Previous }
 
enum  OrderTargetType { Entity , Position , WallSection }
 

Public Member Functions

 Order (OrderPrefab prefab, Entity targetEntity, ItemComponent targetItem, Character orderGiver=null, bool isAutonomous=false)
 Constructor for orders with the target type OrderTargetType.Entity.
 
 Order (OrderPrefab prefab, Identifier option, Entity targetEntity, ItemComponent targetItem, Character orderGiver=null, bool isAutonomous=false)
 Constructor for orders with the target type OrderTargetType.Entity.
 
 Order (OrderPrefab prefab, OrderTarget target, Character orderGiver=null)
 Constructor for orders with the target type OrderTargetType.Position.
 
 Order (OrderPrefab prefab, Identifier option, OrderTarget target, Character orderGiver=null)
 Constructor for orders with the target type OrderTargetType.Position.
 
 Order (OrderPrefab prefab, Structure wall, int? sectionIndex, Character orderGiver=null)
 Constructor for orders with the target type OrderTargetType.WallSection.
 
 Order (OrderPrefab prefab, Identifier option, Structure wall, int? sectionIndex, Character orderGiver=null)
 Constructor for orders with the target type OrderTargetType.WallSection.
 
Order WithOption (Identifier option)
 
Order WithManualPriority (int newPriority)
 
Order WithOrderGiver (Character orderGiver)
 
Order WithObjective (AIObjective objective)
 
Order WithTargetEntity (Entity entity)
 
Order WithTargetSpatialEntity (ISpatialEntity spatialEntity)
 
Order WithItemComponent (Item item, ItemComponent component=null)
 
Order WithWallSection (Structure wall, int? sectionIndex)
 
Order WithType (OrderType type)
 
Order WithTargetPosition (OrderTarget targetPosition)
 
Order Clone ()
 
Order GetDismissal ()
 
bool HasAppropriateJob (Character character)
 
bool HasPreferredJob (Character character)
 
string GetChatMessage (string targetCharacterName, string targetRoomName, bool givingOrderToSelf, Identifier orderOption=default, bool isNewOrder=true)
 
ItemComponent GetTargetItemComponent (Item item)
 Get the target item component based on the target item type.
 
bool TryGetTargetItemComponent (Item item, out ItemComponent firstMatchingComponent)
 
List< ItemGetMatchingItems (Submarine submarine, bool mustBelongToPlayerSub, CharacterTeamType? requiredTeam=null, Character interactableFor=null)
 
Parameters
interactableForOnly returns items which are interactable for this character

 
List< ItemGetMatchingItems (bool mustBelongToPlayerSub, Character interactableFor=null)
 
Parameters
interactableForOnly returns items which are interactable for this character

 
LocalizedString GetOptionName (string id)
 
LocalizedString GetOptionName (Identifier id)
 
LocalizedString GetOptionName (int index)
 
bool MatchesOrder (Identifier orderIdentifier, Identifier orderOption)
 
bool MatchesOrder (Order order)
 
bool MatchesDismissedOrder (Identifier dismissOrderOption)
 
ImmutableArray< IdentifierGetTargetItems (Identifier option=default)
 
override string ToString ()
 

Static Public Member Functions

static Identifier GetDismissOrderOption (Order order)
 Used to create the order option for the Dismiss order to know which order it targets.
 

Public Attributes

readonly OrderPrefab Prefab
 
readonly Identifier Option
 
readonly int ManualPriority
 
readonly OrderType Type
 
readonly AIObjective Objective
 
readonly Entity TargetEntity
 
readonly ItemComponent TargetItemComponent
 
readonly Controller ConnectedController
 
readonly Character OrderGiver
 
readonly OrderTarget TargetPosition
 
readonly OrderTargetType TargetType
 
readonly? int WallSectionIndex
 
readonly bool UseController
 

Properties

bool IsCurrentOrder [get]
 
bool IsDismissal [get]
 
ISpatialEntity TargetSpatialEntity [get]
 Note this property doesn't return the follow target of the Follow objective, as expected!
 
Hull TargetHull [get]
 
LocalizedString Name [get]
 
LocalizedString ContextualName [get]
 
Identifier Identifier [get]
 
Type ItemComponentType [get]
 
bool CanTypeBeSubclass [get]
 
ref readonly ImmutableArray< IdentifierControllerTags [get]
 
ref readonly ImmutableArray< IdentifierTargetItems [get]
 
ref readonly ImmutableArray< IdentifierRequireItems [get]
 
ref readonly ImmutableArray< IdentifierOptions [get]
 
ref readonly ImmutableArray< IdentifierHiddenOptions [get]
 
ref readonly ImmutableArray< IdentifierAllOptions [get]
 
Sprite SymbolSprite [get]
 
Color Color [get]
 
bool TargetAllCharacters [get]
 
ref readonly ImmutableArray< IdentifierAppropriateJobs [get]
 
float FadeOutTime [get]
 
bool MustSetTarget [get]
 
Identifier AppropriateSkill [get]
 
OrderCategoryCategory [get]
 
bool MustManuallyAssign [get]
 
bool IsIgnoreOrder [get]
 
bool IsDeconstructOrder [get]
 
bool DrawIconWhenContained [get]
 
bool Hidden [get]
 
bool IgnoreAtOutpost [get]
 
bool IsReport [get]
 
bool AutoDismiss [get]
 
int AssignmentPriority [get]
 
bool ColoredWhenControllingGiver [get]
 
bool DisplayGiverInTooltip [get]
 

Member Enumeration Documentation

◆ OrderTargetType

Enumerator
Entity 
Position 
WallSection 

◆ OrderType

Enumerator
Current 
Previous 

Constructor & Destructor Documentation

◆ Order() [1/6]

Barotrauma.Order.Order ( OrderPrefab prefab,
Entity targetEntity,
ItemComponent targetItem,
Character orderGiver = null,
bool isAutonomous = false )

Constructor for orders with the target type OrderTargetType.Entity.

◆ Order() [2/6]

Barotrauma.Order.Order ( OrderPrefab prefab,
Identifier option,
Entity targetEntity,
ItemComponent targetItem,
Character orderGiver = null,
bool isAutonomous = false )

Constructor for orders with the target type OrderTargetType.Entity.

◆ Order() [3/6]

Barotrauma.Order.Order ( OrderPrefab prefab,
OrderTarget target,
Character orderGiver = null )

Constructor for orders with the target type OrderTargetType.Position.

◆ Order() [4/6]

Barotrauma.Order.Order ( OrderPrefab prefab,
Identifier option,
OrderTarget target,
Character orderGiver = null )

Constructor for orders with the target type OrderTargetType.Position.

◆ Order() [5/6]

Barotrauma.Order.Order ( OrderPrefab prefab,
Structure wall,
int? sectionIndex,
Character orderGiver = null )

Constructor for orders with the target type OrderTargetType.WallSection.

◆ Order() [6/6]

Barotrauma.Order.Order ( OrderPrefab prefab,
Identifier option,
Structure wall,
int? sectionIndex,
Character orderGiver = null )

Constructor for orders with the target type OrderTargetType.WallSection.

Member Function Documentation

◆ Clone()

Order Barotrauma.Order.Clone ( )

◆ GetChatMessage()

string Barotrauma.Order.GetChatMessage ( string targetCharacterName,
string targetRoomName,
bool givingOrderToSelf,
Identifier orderOption = default,
bool isNewOrder = true )

◆ GetDismissal()

Order Barotrauma.Order.GetDismissal ( )

◆ GetDismissOrderOption()

static Identifier Barotrauma.Order.GetDismissOrderOption ( Order order)
static

Used to create the order option for the Dismiss order to know which order it targets.

Parameters
orderInfoThe order to target with the dismiss order

◆ GetMatchingItems() [1/2]

List< Item > Barotrauma.Order.GetMatchingItems ( bool mustBelongToPlayerSub,
Character interactableFor = null )

Parameters
interactableForOnly returns items which are interactable for this character

◆ GetMatchingItems() [2/2]

List< Item > Barotrauma.Order.GetMatchingItems ( Submarine submarine,
bool mustBelongToPlayerSub,
CharacterTeamType? requiredTeam = null,
Character interactableFor = null )

Parameters
interactableForOnly returns items which are interactable for this character

◆ GetOptionName() [1/3]

LocalizedString Barotrauma.Order.GetOptionName ( Identifier id)

◆ GetOptionName() [2/3]

LocalizedString Barotrauma.Order.GetOptionName ( int index)

◆ GetOptionName() [3/3]

LocalizedString Barotrauma.Order.GetOptionName ( string id)

◆ GetTargetItemComponent()

ItemComponent Barotrauma.Order.GetTargetItemComponent ( Item item)

Get the target item component based on the target item type.

◆ GetTargetItems()

ImmutableArray< Identifier > Barotrauma.Order.GetTargetItems ( Identifier option = default)

◆ HasAppropriateJob()

bool Barotrauma.Order.HasAppropriateJob ( Character character)

◆ HasPreferredJob()

bool Barotrauma.Order.HasPreferredJob ( Character character)

◆ MatchesDismissedOrder()

bool Barotrauma.Order.MatchesDismissedOrder ( Identifier dismissOrderOption)

◆ MatchesOrder() [1/2]

bool Barotrauma.Order.MatchesOrder ( Identifier orderIdentifier,
Identifier orderOption )

◆ MatchesOrder() [2/2]

bool Barotrauma.Order.MatchesOrder ( Order order)

◆ ToString()

override string Barotrauma.Order.ToString ( )

◆ TryGetTargetItemComponent()

bool Barotrauma.Order.TryGetTargetItemComponent ( Item item,
out ItemComponent firstMatchingComponent )

◆ WithItemComponent()

Order Barotrauma.Order.WithItemComponent ( Item item,
ItemComponent component = null )

◆ WithManualPriority()

Order Barotrauma.Order.WithManualPriority ( int newPriority)

◆ WithObjective()

Order Barotrauma.Order.WithObjective ( AIObjective objective)

◆ WithOption()

Order Barotrauma.Order.WithOption ( Identifier option)

◆ WithOrderGiver()

Order Barotrauma.Order.WithOrderGiver ( Character orderGiver)

◆ WithTargetEntity()

Order Barotrauma.Order.WithTargetEntity ( Entity entity)

◆ WithTargetPosition()

Order Barotrauma.Order.WithTargetPosition ( OrderTarget targetPosition)

◆ WithTargetSpatialEntity()

Order Barotrauma.Order.WithTargetSpatialEntity ( ISpatialEntity spatialEntity)

◆ WithType()

Order Barotrauma.Order.WithType ( OrderType type)

◆ WithWallSection()

Order Barotrauma.Order.WithWallSection ( Structure wall,
int? sectionIndex )

Member Data Documentation

◆ ConnectedController

readonly Controller Barotrauma.Order.ConnectedController

◆ ManualPriority

readonly int Barotrauma.Order.ManualPriority

◆ Objective

readonly AIObjective Barotrauma.Order.Objective

◆ Option

readonly Identifier Barotrauma.Order.Option

◆ OrderGiver

readonly Character Barotrauma.Order.OrderGiver

◆ Prefab

readonly OrderPrefab Barotrauma.Order.Prefab

◆ TargetEntity

readonly Entity Barotrauma.Order.TargetEntity

◆ TargetItemComponent

readonly ItemComponent Barotrauma.Order.TargetItemComponent

◆ TargetPosition

readonly OrderTarget Barotrauma.Order.TargetPosition

◆ TargetType

readonly OrderTargetType Barotrauma.Order.TargetType

◆ Type

readonly OrderType Barotrauma.Order.Type

◆ UseController

readonly bool Barotrauma.Order.UseController

◆ WallSectionIndex

readonly? int Barotrauma.Order.WallSectionIndex

Property Documentation

◆ AllOptions

ref readonly ImmutableArray<Identifier> Barotrauma.Order.AllOptions
get

◆ AppropriateJobs

ref readonly ImmutableArray<Identifier> Barotrauma.Order.AppropriateJobs
get

◆ AppropriateSkill

Identifier Barotrauma.Order.AppropriateSkill
get

◆ AssignmentPriority

int Barotrauma.Order.AssignmentPriority
get

◆ AutoDismiss

bool Barotrauma.Order.AutoDismiss
get

◆ CanTypeBeSubclass

bool Barotrauma.Order.CanTypeBeSubclass
get

◆ Category

OrderCategory? Barotrauma.Order.Category
get

◆ Color

Color Barotrauma.Order.Color
get

◆ ColoredWhenControllingGiver

bool Barotrauma.Order.ColoredWhenControllingGiver
get

◆ ContextualName

LocalizedString Barotrauma.Order.ContextualName
get

◆ ControllerTags

ref readonly ImmutableArray<Identifier> Barotrauma.Order.ControllerTags
get

◆ DisplayGiverInTooltip

bool Barotrauma.Order.DisplayGiverInTooltip
get

◆ DrawIconWhenContained

bool Barotrauma.Order.DrawIconWhenContained
get

◆ FadeOutTime

float Barotrauma.Order.FadeOutTime
get

◆ Hidden

bool Barotrauma.Order.Hidden
get

◆ HiddenOptions

ref readonly ImmutableArray<Identifier> Barotrauma.Order.HiddenOptions
get

◆ Identifier

Identifier Barotrauma.Order.Identifier
get

◆ IgnoreAtOutpost

bool Barotrauma.Order.IgnoreAtOutpost
get

◆ IsCurrentOrder

bool Barotrauma.Order.IsCurrentOrder
get

◆ IsDeconstructOrder

bool Barotrauma.Order.IsDeconstructOrder
get

◆ IsDismissal

bool Barotrauma.Order.IsDismissal
get

◆ IsIgnoreOrder

bool Barotrauma.Order.IsIgnoreOrder
get

◆ IsReport

bool Barotrauma.Order.IsReport
get

◆ ItemComponentType

Type Barotrauma.Order.ItemComponentType
get

◆ MustManuallyAssign

bool Barotrauma.Order.MustManuallyAssign
get

◆ MustSetTarget

bool Barotrauma.Order.MustSetTarget
get

◆ Name

LocalizedString Barotrauma.Order.Name
get

◆ Options

ref readonly ImmutableArray<Identifier> Barotrauma.Order.Options
get

◆ RequireItems

ref readonly ImmutableArray<Identifier> Barotrauma.Order.RequireItems
get

◆ SymbolSprite

Sprite Barotrauma.Order.SymbolSprite
get

◆ TargetAllCharacters

bool Barotrauma.Order.TargetAllCharacters
get

◆ TargetHull

Hull Barotrauma.Order.TargetHull
get

◆ TargetItems

ref readonly ImmutableArray<Identifier> Barotrauma.Order.TargetItems
get

◆ TargetSpatialEntity

ISpatialEntity Barotrauma.Order.TargetSpatialEntity
get

Note this property doesn't return the follow target of the Follow objective, as expected!


The documentation for this class was generated from the following file: