Barotrauma Server Doc
Barotrauma.MissionPrefab Class Reference
Inheritance diagram for Barotrauma.MissionPrefab:
Barotrauma.PrefabWithUintIdentifier 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 ()
 
- 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
 

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)
 
- Properties inherited from Barotrauma.PrefabWithUintIdentifier
UInt32 UintIdentifier [get, set]
 
- Properties inherited from Barotrauma.Prefab
ContentPackageContentPackage [get]
 
ContentPath FilePath [get]
 

Detailed Description

Definition at line 31 of file MissionPrefab.cs.

Constructor & Destructor Documentation

◆ MissionPrefab()

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

Definition at line 182 of file MissionPrefab.cs.

Member Function Documentation

◆ Dispose()

override void Barotrauma.MissionPrefab.Dispose ( )
virtual

Implements Barotrauma.Prefab.

Definition at line 448 of file MissionPrefab.cs.

◆ Instantiate()

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

Definition at line 442 of file MissionPrefab.cs.

◆ IsAllowed()

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

Definition at line 399 of file MissionPrefab.cs.

Member Data Documentation

◆ AchievementIdentifier

readonly Identifier Barotrauma.MissionPrefab.AchievementIdentifier

Definition at line 89 of file MissionPrefab.cs.

◆ 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 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 MissionPrefab.cs.

◆ AllowOtherMissionsInLevel

readonly bool Barotrauma.MissionPrefab.AllowOtherMissionsInLevel

Definition at line 122 of file MissionPrefab.cs.

◆ AllowRetry

readonly bool Barotrauma.MissionPrefab.AllowRetry

Definition at line 116 of file MissionPrefab.cs.

◆ BlockLocationTypeChanges

readonly bool Barotrauma.MissionPrefab.BlockLocationTypeChanges

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

Definition at line 129 of file MissionPrefab.cs.

◆ Commonness

readonly int Barotrauma.MissionPrefab.Commonness

Definition at line 96 of file MissionPrefab.cs.

◆ ConfigElement

readonly ContentXElement Barotrauma.MissionPrefab.ConfigElement

Definition at line 180 of file MissionPrefab.cs.

◆ 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 MissionPrefab.cs.

◆ DataRewards

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

Definition at line 94 of file MissionPrefab.cs.

◆ Description

readonly LocalizedString Barotrauma.MissionPrefab.Description

Definition at line 83 of file MissionPrefab.cs.

◆ Difficulty

readonly? int Barotrauma.MissionPrefab.Difficulty

Displayed difficulty (indicator)

Definition at line 100 of file MissionPrefab.cs.

◆ FailureMessage

readonly LocalizedString Barotrauma.MissionPrefab.FailureMessage

Definition at line 85 of file MissionPrefab.cs.

◆ Headers

readonly ImmutableArray<LocalizedString> Barotrauma.MissionPrefab.Headers

Definition at line 113 of file MissionPrefab.cs.

◆ HiddenMissionClasses

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

Definition at line 70 of file MissionPrefab.cs.

◆ IsSideObjective

readonly bool Barotrauma.MissionPrefab.IsSideObjective

Definition at line 120 of file MissionPrefab.cs.

◆ LocationTypeChangeOnCompleted

LocationTypeChange Barotrauma.MissionPrefab.LocationTypeChangeOnCompleted

Definition at line 178 of file MissionPrefab.cs.

◆ 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 MissionPrefab.cs.

◆ MaxProgressState

readonly int Barotrauma.MissionPrefab.MaxProgressState

Definition at line 133 of file MissionPrefab.cs.

◆ Messages

readonly ImmutableArray<LocalizedString> Barotrauma.MissionPrefab.Messages

Definition at line 114 of file MissionPrefab.cs.

◆ MinDifficulty

const int Barotrauma.MissionPrefab.MinDifficulty = 1
static

Definition at line 101 of file MissionPrefab.cs.

◆ 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 MissionPrefab.cs.

◆ MultiplayerOnly

readonly bool Barotrauma.MissionPrefab.MultiplayerOnly

Definition at line 76 of file MissionPrefab.cs.

◆ Name

readonly LocalizedString Barotrauma.MissionPrefab.Name

Definition at line 82 of file MissionPrefab.cs.

◆ Prefabs

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

Definition at line 33 of file MissionPrefab.cs.

◆ ProgressBarLabel

readonly LocalizedString Barotrauma.MissionPrefab.ProgressBarLabel

Definition at line 134 of file MissionPrefab.cs.

◆ 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 MissionPrefab.cs.

◆ ReputationRewards

readonly ImmutableList<ReputationReward> Barotrauma.MissionPrefab.ReputationRewards

Definition at line 91 of file MissionPrefab.cs.

◆ 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 MissionPrefab.cs.

◆ RequireWreck

readonly bool Barotrauma.MissionPrefab.RequireWreck

Definition at line 124 of file MissionPrefab.cs.

◆ Reward

readonly int Barotrauma.MissionPrefab.Reward

Definition at line 111 of file MissionPrefab.cs.

◆ ShowInMenus

readonly bool Barotrauma.MissionPrefab.ShowInMenus

Definition at line 118 of file MissionPrefab.cs.

◆ ShowProgressBar

readonly bool Barotrauma.MissionPrefab.ShowProgressBar

Definition at line 131 of file MissionPrefab.cs.

◆ ShowProgressInNumbers

readonly bool Barotrauma.MissionPrefab.ShowProgressInNumbers

Definition at line 132 of file MissionPrefab.cs.

◆ SonarIconIdentifier

readonly Identifier Barotrauma.MissionPrefab.SonarIconIdentifier

Definition at line 87 of file MissionPrefab.cs.

◆ SonarLabel

readonly LocalizedString Barotrauma.MissionPrefab.SonarLabel

Definition at line 86 of file MissionPrefab.cs.

◆ SuccessMessage

readonly LocalizedString Barotrauma.MissionPrefab.SuccessMessage

Definition at line 84 of file MissionPrefab.cs.

◆ Tags

readonly ImmutableHashSet<Identifier> Barotrauma.MissionPrefab.Tags

Definition at line 80 of file MissionPrefab.cs.

◆ TextIdentifier

readonly Identifier Barotrauma.MissionPrefab.TextIdentifier

Definition at line 78 of file MissionPrefab.cs.

◆ TriggerEvents

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

Definition at line 176 of file MissionPrefab.cs.

◆ Type

readonly MissionType Barotrauma.MissionPrefab.Type

Definition at line 74 of file MissionPrefab.cs.

◆ 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 MissionPrefab.cs.