Barotrauma Client Doc
Barotrauma.MissionPrefab Class Reference
Inheritance diagram for Barotrauma.MissionPrefab:
Barotrauma.PrefabWithUintIdentifier Barotrauma.PrefabWithUintIdentifier Barotrauma.Prefab Barotrauma.Prefab

Classes

class  ReputationReward
 
class  TriggerEvent
 

Public Member Functions

 MissionPrefab (ContentXElement element, MissionsFile file)
 
bool IsAllowed (Location from, Location to)
 
Mission Instantiate (Location[] locations, Submarine sub)
 
override void Dispose ()
 
Identifier GetOverrideMusicType (int state)
 
Sprite GetPortrait (int randomSeed)
 
- Public Member Functions inherited from Barotrauma.Prefab
 Prefab (ContentFile file, Identifier identifier)
 
 Prefab (ContentFile file, ContentXElement element)
 

Public Attributes

readonly MissionType Type
 
readonly bool MultiplayerOnly
 
readonly Identifier TextIdentifier
 
readonly ImmutableHashSet< IdentifierTags
 
readonly LocalizedString Name
 
readonly LocalizedString Description
 
readonly LocalizedString SuccessMessage
 
readonly LocalizedString FailureMessage
 
readonly LocalizedString SonarLabel
 
readonly Identifier SonarIconIdentifier
 
readonly Identifier AchievementIdentifier
 
readonly ImmutableList< ReputationRewardReputationRewards
 
readonly List<(Identifier Identifier, object Value, SetDataAction.OperationType OperationType)> DataRewards = new List<(Identifier Identifier, object Value, SetDataAction.OperationType OperationType)>()
 
readonly int Commonness
 
readonly? int Difficulty
 Displayed difficulty (indicator) More...
 
readonly int MinLevelDifficulty = 0
 The actual minimum difficulty of the level allowed for this mission to trigger. More...
 
readonly int MaxLevelDifficulty = 100
 The actual maximum difficulty of the level allowed for this mission to trigger. More...
 
readonly int Reward
 
readonly ImmutableArray< LocalizedStringHeaders
 
readonly ImmutableArray< LocalizedStringMessages
 
readonly bool AllowRetry
 
readonly bool ShowInMenus
 
readonly bool IsSideObjective
 
readonly bool AllowOtherMissionsInLevel
 
readonly bool RequireWreck
 
readonly bool BlockLocationTypeChanges
 If enabled, locations this mission takes place in cannot change their type More...
 
readonly bool ShowProgressBar
 
readonly bool ShowProgressInNumbers
 
readonly int MaxProgressState
 
readonly LocalizedString ProgressBarLabel
 
readonly List<(Identifier from, Identifier to)> AllowedConnectionTypes
 The mission can only be received when travelling from a location of the first type to a location of the second type More...
 
readonly List< IdentifierAllowedLocationTypes = new List<Identifier>()
 The mission can only be received in these location types More...
 
readonly Identifier RequiredLocationFaction
 The mission can only happen in locations owned by this faction. In the mission mode, the location is forced to be owned by this faction. More...
 
readonly List< string > UnhideEntitySubCategories = new List<string>()
 Show entities belonging to these sub categories when the mission starts More...
 
readonly List< TriggerEventTriggerEvents = new List<TriggerEvent>()
 
LocationTypeChange LocationTypeChangeOnCompleted
 
readonly ContentXElement ConfigElement
 
- Public Attributes inherited from Barotrauma.Prefab
readonly Identifier Identifier
 
readonly ContentFile ContentFile
 

Static Public Attributes

static readonly PrefabCollection< MissionPrefabPrefabs = new PrefabCollection<MissionPrefab>()
 
static readonly Dictionary< MissionType, TypeCoOpMissionClasses
 
static readonly Dictionary< MissionType, TypePvPMissionClasses
 
static readonly HashSet< MissionTypeHiddenMissionClasses = new HashSet<MissionType>() { MissionType.GoTo, MissionType.End }
 
const int MinDifficulty = 1
 
- Static Public Attributes inherited from Barotrauma.Prefab
static readonly ImmutableHashSet< Type > Types
 

Properties

bool HasPortraits [get]
 
Sprite Icon [get]
 
Color IconColor [get]
 
bool DisplayTargetHudIcons [get]
 
float HudIconMaxDistance [get]
 
Sprite?? HudIcon [get]
 
Color?? HudIconColor [get]
 
- Properties inherited from Barotrauma.PrefabWithUintIdentifier
UInt32 UintIdentifier [get, set]
 
- Properties inherited from Barotrauma.Prefab
ContentPackageContentPackage [get]
 
ContentPath FilePath [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from Barotrauma.Prefab
static void DisallowCallFromConstructor ()
 
- 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)
 

Detailed Description

Constructor & Destructor Documentation

◆ MissionPrefab()

Barotrauma.MissionPrefab.MissionPrefab ( ContentXElement  element,
MissionsFile  file 
)

Member Function Documentation

◆ Dispose()

override void Barotrauma.MissionPrefab.Dispose ( )
virtual

◆ GetOverrideMusicType()

Identifier Barotrauma.MissionPrefab.GetOverrideMusicType ( int  state)

◆ GetPortrait()

Sprite Barotrauma.MissionPrefab.GetPortrait ( int  randomSeed)

◆ Instantiate()

Mission Barotrauma.MissionPrefab.Instantiate ( Location[]  locations,
Submarine  sub 
)

◆ IsAllowed()

bool Barotrauma.MissionPrefab.IsAllowed ( Location  from,
Location  to 
)

Member Data Documentation

◆ AchievementIdentifier

readonly Identifier Barotrauma.MissionPrefab.AchievementIdentifier

◆ AllowedConnectionTypes

readonly List<(Identifier from, Identifier to)> Barotrauma.MissionPrefab.AllowedConnectionTypes

The mission can only be received when travelling from a location of the first type to a location of the second type

Definition at line 139 of file BarotraumaShared/SharedSource/Events/Missions/MissionPrefab.cs.

◆ AllowedLocationTypes

readonly List<Identifier> Barotrauma.MissionPrefab.AllowedLocationTypes = new List<Identifier>()

The mission can only be received in these location types

Definition at line 144 of file BarotraumaShared/SharedSource/Events/Missions/MissionPrefab.cs.

◆ AllowOtherMissionsInLevel

readonly bool Barotrauma.MissionPrefab.AllowOtherMissionsInLevel

◆ AllowRetry

readonly bool Barotrauma.MissionPrefab.AllowRetry

◆ BlockLocationTypeChanges

readonly bool Barotrauma.MissionPrefab.BlockLocationTypeChanges

If enabled, locations this mission takes place in cannot change their type

Definition at line 129 of file BarotraumaShared/SharedSource/Events/Missions/MissionPrefab.cs.

◆ Commonness

readonly int Barotrauma.MissionPrefab.Commonness

◆ ConfigElement

readonly ContentXElement Barotrauma.MissionPrefab.ConfigElement

◆ CoOpMissionClasses

readonly Dictionary<MissionType, Type> Barotrauma.MissionPrefab.CoOpMissionClasses
static
Initial value:
= new Dictionary<MissionType, Type>()
{
{ MissionType.Salvage, typeof(SalvageMission) },
{ MissionType.Monster, typeof(MonsterMission) },
{ MissionType.Cargo, typeof(CargoMission) },
{ MissionType.Beacon, typeof(BeaconMission) },
{ MissionType.Nest, typeof(NestMission) },
{ MissionType.Mineral, typeof(MineralMission) },
{ MissionType.AbandonedOutpost, typeof(AbandonedOutpostMission) },
{ MissionType.Escort, typeof(EscortMission) },
{ MissionType.Pirate, typeof(PirateMission) },
{ MissionType.GoTo, typeof(GoToMission) },
{ MissionType.ScanAlienRuins, typeof(ScanMission) },
{ MissionType.ClearAlienRuins, typeof(AlienRuinMission) },
{ MissionType.End, typeof(EndMission) }
}

Definition at line 35 of file BarotraumaShared/SharedSource/Events/Missions/MissionPrefab.cs.

◆ DataRewards

readonly List<(Identifier Identifier, object Value, SetDataAction.OperationType OperationType)> Barotrauma.MissionPrefab.DataRewards = new List<(Identifier Identifier, object Value, SetDataAction.OperationType OperationType)>()

◆ Description

readonly LocalizedString Barotrauma.MissionPrefab.Description

◆ Difficulty

readonly? int Barotrauma.MissionPrefab.Difficulty

Displayed difficulty (indicator)

Definition at line 100 of file BarotraumaShared/SharedSource/Events/Missions/MissionPrefab.cs.

◆ FailureMessage

readonly LocalizedString Barotrauma.MissionPrefab.FailureMessage

◆ Headers

readonly ImmutableArray<LocalizedString> Barotrauma.MissionPrefab.Headers

◆ HiddenMissionClasses

readonly HashSet<MissionType> Barotrauma.MissionPrefab.HiddenMissionClasses = new HashSet<MissionType>() { MissionType.GoTo, MissionType.End }
static

◆ IsSideObjective

readonly bool Barotrauma.MissionPrefab.IsSideObjective

◆ LocationTypeChangeOnCompleted

LocationTypeChange Barotrauma.MissionPrefab.LocationTypeChangeOnCompleted

◆ MaxLevelDifficulty

readonly int Barotrauma.MissionPrefab.MaxLevelDifficulty = 100

The actual maximum difficulty of the level allowed for this mission to trigger.

Definition at line 109 of file BarotraumaShared/SharedSource/Events/Missions/MissionPrefab.cs.

◆ MaxProgressState

readonly int Barotrauma.MissionPrefab.MaxProgressState

◆ Messages

readonly ImmutableArray<LocalizedString> Barotrauma.MissionPrefab.Messages

◆ MinDifficulty

const int Barotrauma.MissionPrefab.MinDifficulty = 1
static

◆ MinLevelDifficulty

readonly int Barotrauma.MissionPrefab.MinLevelDifficulty = 0

The actual minimum difficulty of the level allowed for this mission to trigger.

Definition at line 105 of file BarotraumaShared/SharedSource/Events/Missions/MissionPrefab.cs.

◆ MultiplayerOnly

readonly bool Barotrauma.MissionPrefab.MultiplayerOnly

◆ Name

readonly LocalizedString Barotrauma.MissionPrefab.Name

◆ Prefabs

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

◆ ProgressBarLabel

readonly LocalizedString Barotrauma.MissionPrefab.ProgressBarLabel

◆ PvPMissionClasses

readonly Dictionary<MissionType, Type> Barotrauma.MissionPrefab.PvPMissionClasses
static
Initial value:
= new Dictionary<MissionType, Type>()
{
{ MissionType.Combat, typeof(CombatMission) }
}

Definition at line 51 of file BarotraumaShared/SharedSource/Events/Missions/MissionPrefab.cs.

◆ ReputationRewards

readonly ImmutableList<ReputationReward> Barotrauma.MissionPrefab.ReputationRewards

◆ RequiredLocationFaction

readonly Identifier Barotrauma.MissionPrefab.RequiredLocationFaction

The mission can only happen in locations owned by this faction. In the mission mode, the location is forced to be owned by this faction.

Definition at line 149 of file BarotraumaShared/SharedSource/Events/Missions/MissionPrefab.cs.

◆ RequireWreck

readonly bool Barotrauma.MissionPrefab.RequireWreck

◆ Reward

readonly int Barotrauma.MissionPrefab.Reward

◆ ShowInMenus

readonly bool Barotrauma.MissionPrefab.ShowInMenus

◆ ShowProgressBar

readonly bool Barotrauma.MissionPrefab.ShowProgressBar

◆ ShowProgressInNumbers

readonly bool Barotrauma.MissionPrefab.ShowProgressInNumbers

◆ SonarIconIdentifier

readonly Identifier Barotrauma.MissionPrefab.SonarIconIdentifier

◆ SonarLabel

readonly LocalizedString Barotrauma.MissionPrefab.SonarLabel

◆ SuccessMessage

readonly LocalizedString Barotrauma.MissionPrefab.SuccessMessage

◆ Tags

readonly ImmutableHashSet<Identifier> Barotrauma.MissionPrefab.Tags

◆ TextIdentifier

readonly Identifier Barotrauma.MissionPrefab.TextIdentifier

◆ TriggerEvents

readonly List<TriggerEvent> Barotrauma.MissionPrefab.TriggerEvents = new List<TriggerEvent>()

◆ Type

readonly MissionType Barotrauma.MissionPrefab.Type

◆ UnhideEntitySubCategories

readonly List<string> Barotrauma.MissionPrefab.UnhideEntitySubCategories = new List<string>()

Show entities belonging to these sub categories when the mission starts

Definition at line 154 of file BarotraumaShared/SharedSource/Events/Missions/MissionPrefab.cs.

Property Documentation

◆ DisplayTargetHudIcons

bool Barotrauma.MissionPrefab.DisplayTargetHudIcons
get

◆ HasPortraits

bool Barotrauma.MissionPrefab.HasPortraits
get

◆ HudIcon

Sprite?? Barotrauma.MissionPrefab.HudIcon
get

◆ HudIconColor

Color?? Barotrauma.MissionPrefab.HudIconColor
get

◆ HudIconMaxDistance

float Barotrauma.MissionPrefab.HudIconMaxDistance
get

◆ Icon

Sprite Barotrauma.MissionPrefab.Icon
get

◆ IconColor

Color Barotrauma.MissionPrefab.IconColor
get