Barotrauma Server
Loading...
Searching...
No Matches
Barotrauma.OrderPrefab Class Reference
Inheritance diagram for Barotrauma.OrderPrefab:
Barotrauma.PrefabWithUintIdentifier Barotrauma.Prefab

Public Types

enum  OrderTargetType { Entity , Position , WallSection }
 

Public Member Functions

 OrderPrefab (ContentXElement orderElement, OrdersFile file)
 
bool HasAppropriateJob (Character character)
 
bool HasPreferredJob (Character character)
 
string GetChatMessage (string targetCharacterName, string targetRoomName, Entity targetEntity, 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, Identifier orderOption=default)
 
Parameters
interactableForOnly returns items which are interactable for this character

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

 
LocalizedString GetOptionName (string id)
 
LocalizedString GetOptionName (Identifier id)
 
LocalizedString GetOptionName (int index)
 
ImmutableArray< IdentifierGetTargetItems (Identifier option=default)
 
bool TargetItemsMatchItem (Item item, Identifier option=default)
 
override void Dispose ()
 
Order CreateInstance (OrderTargetType targetType, Character orderGiver=null, bool isAutonomous=false)
 Create an Order instance with a null target.
 
- Public Member Functions inherited from Barotrauma.Prefab
 Prefab (ContentFile file, Identifier identifier)
 
 Prefab (ContentFile file, ContentXElement element)
 
void Dispose ()
 

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.
 
static bool TargetItemsMatchItem (ImmutableArray< Identifier > targetItems, Item item)
 
- Static Public Member Functions inherited from Barotrauma.Prefab
static void DisallowCallFromConstructor ()
 

Public Attributes

readonly? OrderCategory Category
 
readonly Identifier CategoryIdentifier
 
readonly LocalizedString Name
 
readonly LocalizedString ContextualName
 Name that can be used with the contextual version of the order.
 
readonly Sprite SymbolSprite
 
readonly Type ItemComponentType
 
readonly bool CanTypeBeSubclass
 
readonly ImmutableArray< IdentifierTargetItems
 
readonly ImmutableArray< IdentifierRequireItems
 
readonly bool TargetAllCharacters
 
bool TraitorModeOnly
 
readonly float FadeOutTime
 
readonly bool UseController
 
readonly ImmutableArray< IdentifierControllerTags
 
readonly ImmutableArray< IdentifierAppropriateJobs
 If defined, the order can only be quick-assigned to characters with these jobs. Or if it's a report, the icon will only be displayed to characters with these jobs.
 
readonly ImmutableArray< IdentifierOptions
 
readonly ImmutableArray< IdentifierHiddenOptions
 
readonly ImmutableArray< IdentifierAllOptions
 
readonly ListDictionary< Identifier, LocalizedStringOptionNames
 
readonly ImmutableDictionary< Identifier, SpriteOptionSprites
 
readonly bool MustSetTarget
 
readonly bool CanBeGeneralized
 Can the order be turned into a non-entity-targeting one if it was originally created with a target entity. Note: if MustSetTarget is true, CanBeGeneralized will always be false.
 
readonly Identifier AppropriateSkill
 
readonly bool Hidden
 
readonly bool IgnoreAtOutpost
 
readonly bool MustManuallyAssign
 
readonly bool AutoDismiss
 If enabled and this is an Operate order, it will remove Operate orders of the same item from other characters. If this is a Movement order, removes other Movement orders from the character who receives the order.
 
readonly ImmutableArray< IdentifierPreferredJobs
 If defined, the order will be quick-assigned to characters with these jobs before characters with other jobs.
 
- Public Attributes inherited from Barotrauma.Prefab
readonly Identifier Identifier
 
readonly ContentFile ContentFile
 

Static Public Attributes

static readonly PrefabCollection< OrderPrefabPrefabs = new PrefabCollection<OrderPrefab>()
 
static readonly Identifier DismissalIdentifier = "dismissed".ToIdentifier()
 
- Static Public Attributes inherited from Barotrauma.Prefab
static readonly ImmutableHashSet< Type > Types
 

Properties

static OrderPrefab Dismissal [get]
 
bool HasOptionSpecificTargetItems [get]
 
Color Color [get]
 
bool IsReport [get]
 
bool IsVisibleAsReportButton [get]
 
bool IsDismissal [get]
 
bool HasOptions [get]
 
OrderTargetType TargetType [get]
 
int? WallSectionIndex [get]
 
bool IsIgnoreOrder [get]
 
bool IsDeconstructOrder [get]
 
bool DrawIconWhenContained [get]
 Should the order icon be drawn when the order target is inside a container.
 
int AssignmentPriority [get]
 Affects how high on the order list the order will be placed (i.e. the manual priority order when it's given) when it's first given. Manually rearranging orders will override this priority.
 
bool ColoredWhenControllingGiver [get]
 
bool DisplayGiverInTooltip [get]
 
- Properties inherited from Barotrauma.PrefabWithUintIdentifier
UInt32 UintIdentifier [get, set]
 
- Properties inherited from Barotrauma.Prefab
ContentPackageContentPackage [get]
 
ContentPath FilePath [get]
 

Additional Inherited Members

- Protected Member Functions inherited from Barotrauma.PrefabWithUintIdentifier
 PrefabWithUintIdentifier (ContentFile file, Identifier identifier)
 
 PrefabWithUintIdentifier (ContentFile file, ContentXElement element)
 
- Protected Member Functions inherited from Barotrauma.Prefab
virtual Identifier DetermineIdentifier (XElement element)
 

Member Enumeration Documentation

◆ OrderTargetType

Enumerator
Entity 
Position 
WallSection 

Constructor & Destructor Documentation

◆ OrderPrefab()

Barotrauma.OrderPrefab.OrderPrefab ( ContentXElement orderElement,
OrdersFile file )

Member Function Documentation

◆ CreateInstance()

Order Barotrauma.OrderPrefab.CreateInstance ( OrderTargetType targetType,
Character orderGiver = null,
bool isAutonomous = false )

Create an Order instance with a null target.

◆ Dispose()

override void Barotrauma.OrderPrefab.Dispose ( )

◆ GetChatMessage()

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

◆ GetDismissOrderOption()

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

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

Parameters
orderThe order to target with the dismiss order

◆ GetMatchingItems() [1/2]

List< Item > Barotrauma.OrderPrefab.GetMatchingItems ( bool mustBelongToPlayerSub,
Character interactableFor = null,
Identifier orderOption = default )

Parameters
interactableForOnly returns items which are interactable for this character

◆ GetMatchingItems() [2/2]

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

Parameters
interactableForOnly returns items which are interactable for this character

◆ GetOptionName() [1/3]

LocalizedString Barotrauma.OrderPrefab.GetOptionName ( Identifier id)

◆ GetOptionName() [2/3]

LocalizedString Barotrauma.OrderPrefab.GetOptionName ( int index)

◆ GetOptionName() [3/3]

LocalizedString Barotrauma.OrderPrefab.GetOptionName ( string id)

◆ GetTargetItemComponent()

ItemComponent Barotrauma.OrderPrefab.GetTargetItemComponent ( Item item)

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

◆ GetTargetItems()

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

◆ HasAppropriateJob()

bool Barotrauma.OrderPrefab.HasAppropriateJob ( Character character)

◆ HasPreferredJob()

bool Barotrauma.OrderPrefab.HasPreferredJob ( Character character)

◆ TargetItemsMatchItem() [1/2]

static bool Barotrauma.OrderPrefab.TargetItemsMatchItem ( ImmutableArray< Identifier > targetItems,
Item item )
static

◆ TargetItemsMatchItem() [2/2]

bool Barotrauma.OrderPrefab.TargetItemsMatchItem ( Item item,
Identifier option = default )

◆ TryGetTargetItemComponent()

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

Member Data Documentation

◆ AllOptions

readonly ImmutableArray<Identifier> Barotrauma.OrderPrefab.AllOptions

◆ AppropriateJobs

readonly ImmutableArray<Identifier> Barotrauma.OrderPrefab.AppropriateJobs

If defined, the order can only be quick-assigned to characters with these jobs. Or if it's a report, the icon will only be displayed to characters with these jobs.

◆ AppropriateSkill

readonly Identifier Barotrauma.OrderPrefab.AppropriateSkill

◆ AutoDismiss

readonly bool Barotrauma.OrderPrefab.AutoDismiss

If enabled and this is an Operate order, it will remove Operate orders of the same item from other characters. If this is a Movement order, removes other Movement orders from the character who receives the order.

◆ CanBeGeneralized

readonly bool Barotrauma.OrderPrefab.CanBeGeneralized

Can the order be turned into a non-entity-targeting one if it was originally created with a target entity. Note: if MustSetTarget is true, CanBeGeneralized will always be false.

◆ CanTypeBeSubclass

readonly bool Barotrauma.OrderPrefab.CanTypeBeSubclass

◆ Category

readonly? OrderCategory Barotrauma.OrderPrefab.Category

◆ CategoryIdentifier

readonly Identifier Barotrauma.OrderPrefab.CategoryIdentifier

◆ ContextualName

readonly LocalizedString Barotrauma.OrderPrefab.ContextualName

Name that can be used with the contextual version of the order.

◆ ControllerTags

readonly ImmutableArray<Identifier> Barotrauma.OrderPrefab.ControllerTags

◆ DismissalIdentifier

readonly Identifier Barotrauma.OrderPrefab.DismissalIdentifier = "dismissed".ToIdentifier()
static

◆ FadeOutTime

readonly float Barotrauma.OrderPrefab.FadeOutTime

◆ Hidden

readonly bool Barotrauma.OrderPrefab.Hidden

◆ HiddenOptions

readonly ImmutableArray<Identifier> Barotrauma.OrderPrefab.HiddenOptions

◆ IgnoreAtOutpost

readonly bool Barotrauma.OrderPrefab.IgnoreAtOutpost

◆ ItemComponentType

readonly Type Barotrauma.OrderPrefab.ItemComponentType

◆ MustManuallyAssign

readonly bool Barotrauma.OrderPrefab.MustManuallyAssign

◆ MustSetTarget

readonly bool Barotrauma.OrderPrefab.MustSetTarget

◆ Name

readonly LocalizedString Barotrauma.OrderPrefab.Name

◆ OptionNames

readonly ListDictionary<Identifier, LocalizedString> Barotrauma.OrderPrefab.OptionNames

◆ Options

readonly ImmutableArray<Identifier> Barotrauma.OrderPrefab.Options

◆ OptionSprites

readonly ImmutableDictionary<Identifier, Sprite> Barotrauma.OrderPrefab.OptionSprites

◆ Prefabs

readonly PrefabCollection<OrderPrefab> Barotrauma.OrderPrefab.Prefabs = new PrefabCollection<OrderPrefab>()
static

◆ PreferredJobs

readonly ImmutableArray<Identifier> Barotrauma.OrderPrefab.PreferredJobs

If defined, the order will be quick-assigned to characters with these jobs before characters with other jobs.

◆ RequireItems

readonly ImmutableArray<Identifier> Barotrauma.OrderPrefab.RequireItems

◆ SymbolSprite

readonly Sprite Barotrauma.OrderPrefab.SymbolSprite

◆ TargetAllCharacters

readonly bool Barotrauma.OrderPrefab.TargetAllCharacters

◆ TargetItems

readonly ImmutableArray<Identifier> Barotrauma.OrderPrefab.TargetItems

◆ TraitorModeOnly

bool Barotrauma.OrderPrefab.TraitorModeOnly

◆ UseController

readonly bool Barotrauma.OrderPrefab.UseController

Property Documentation

◆ AssignmentPriority

int Barotrauma.OrderPrefab.AssignmentPriority
get

Affects how high on the order list the order will be placed (i.e. the manual priority order when it's given) when it's first given. Manually rearranging orders will override this priority.

◆ Color

Color Barotrauma.OrderPrefab.Color
get

◆ ColoredWhenControllingGiver

bool Barotrauma.OrderPrefab.ColoredWhenControllingGiver
get

◆ Dismissal

OrderPrefab Barotrauma.OrderPrefab.Dismissal
staticget

◆ DisplayGiverInTooltip

bool Barotrauma.OrderPrefab.DisplayGiverInTooltip
get

◆ DrawIconWhenContained

bool Barotrauma.OrderPrefab.DrawIconWhenContained
get

Should the order icon be drawn when the order target is inside a container.

◆ HasOptions

bool Barotrauma.OrderPrefab.HasOptions
get

◆ HasOptionSpecificTargetItems

bool Barotrauma.OrderPrefab.HasOptionSpecificTargetItems
get

◆ IsDeconstructOrder

bool Barotrauma.OrderPrefab.IsDeconstructOrder
get

◆ IsDismissal

bool Barotrauma.OrderPrefab.IsDismissal
get

◆ IsIgnoreOrder

bool Barotrauma.OrderPrefab.IsIgnoreOrder
get

◆ IsReport

bool Barotrauma.OrderPrefab.IsReport
get

◆ IsVisibleAsReportButton

bool Barotrauma.OrderPrefab.IsVisibleAsReportButton
get

◆ TargetType

OrderTargetType Barotrauma.OrderPrefab.TargetType
get

◆ WallSectionIndex

int? Barotrauma.OrderPrefab.WallSectionIndex
get

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