Barotrauma Server
Loading...
Searching...
No Matches
Barotrauma.TraitorEventPrefab Class Reference
Inheritance diagram for Barotrauma.TraitorEventPrefab:
Barotrauma.EventPrefab Barotrauma.Prefab

Public Member Functions

 TraitorEventPrefab (ContentXElement element, RandomEventsFile file, Identifier fallbackIdentifier=default)
 
bool ReputationRequirementsMet (CampaignMode? campaign)
 
bool MissionRequirementsMet (GameSession? gameSession)
 
bool LevelRequirementsMet (Level? level)
 
override void Dispose ()
 
override string ToString ()
 
- Public Member Functions inherited from Barotrauma.EventPrefab
 EventPrefab (ContentXElement element, RandomEventsFile file, Identifier fallbackIdentifier=default)
 
bool TryCreateInstance< T > (int seed, out T instance)
 
Event CreateInstance (int seed)
 
override void Dispose ()
 
override string ToString ()
 
- Public Member Functions inherited from Barotrauma.Prefab
 Prefab (ContentFile file, Identifier identifier)
 
 Prefab (ContentFile file, ContentXElement element)
 
void Dispose ()
 

Public Attributes

readonly? Sprite Icon
 
readonly Color IconColor
 
ImmutableHashSet< IdentifierTags
 
ImmutableHashSet< IdentifierRequiredCompletedTags
 An event with one of these tags must've been completed previously for this event to trigger.
 
readonly int DangerLevel
 
readonly int RequiredPreviousDangerLevel
 An event of this danger level (or higher) must have been selected previously for this event to trigger. It does not matter whether the event was completed successfully or not. Defaults to one less than the DangerLevel of this event.
 
readonly bool RequirePreviousDangerLevelCompleted
 An event of a lower danger level must have been completed on the previous round for this event to trigger. Defaults to false (no requirements)
 
readonly int MinPlayerCount
 Minimum number of non-spectating human players on the server for the event to get selected.
 
readonly int SecondaryTraitorAmount
 Number of players to assign as a "secondary traitor". If both this and SecondaryTraitorPercentage are defined, this is treated as a minimum number of secondary traitors.
 
readonly float SecondaryTraitorPercentage
 Percentage of players to assign as a "secondary traitor".
 
readonly bool AllowAccusingSecondaryTraitor
 Does accusing a secondary traitor count as correctly identifying the traitor?
 
readonly int MoneyPenaltyForUnfoundedTraitorAccusation
 Money penalty if the crew votes a wrong player as the traitor.
 
readonly bool IsChainable
 Is this event chainable, i.e. does the same traitor get another, higher-lvl one if they complete this one successfully?
 
readonly float StealPercentageOfExperience
 
- Public Attributes inherited from Barotrauma.EventPrefab
readonly ContentXElement ConfigElement
 
readonly Type EventType
 
readonly float Probability
 The probability for the event to do something if it gets selected. For example, the probability for a MonsterEvent to spawn the monster(s).
 
readonly bool TriggerEventCooldown
 When this event occurs, should it trigger the event cooldown during which no new events are triggered?
 
readonly float Commonness
 The commonness of the event (i.e. how likely it is for this specific event to be chosen from the event set it's configured in). Only valid if the event set is configured to choose a random event (as opposed to just executing all the events in the set).
 
readonly Identifier BiomeIdentifier
 If set, the event set can only be chosen in this biome.
 
readonly Identifier RequiredLayer
 If set, this layer must be present somewhere in the level.
 
readonly Identifier Faction
 If set, the event set can only be chosen in locations that belong to this faction.
 
readonly LocalizedString Name
 
readonly bool UnlockPathEvent
 If set, this event is used as an event that can unlock a path to the next biome.
 
readonly string UnlockPathTooltip
 Only valid if UnlockPathEvent is set to true. The tooltip displayed on the pathway this event is blocking.
 
readonly int UnlockPathReputation
 Only valid if UnlockPathEvent is set to true. The reputation requirement displayed on the pathway this event is blocking.
 
- Public Attributes inherited from Barotrauma.Prefab
readonly Identifier Identifier
 
readonly ContentFile ContentFile
 

Static Public Attributes

const int MinDangerLevel = 1
 
const int MaxDangerLevel = 3
 
- Static Public Attributes inherited from Barotrauma.EventPrefab
static readonly PrefabCollection< EventPrefabPrefabs = new PrefabCollection<EventPrefab>()
 
- Static Public Attributes inherited from Barotrauma.Prefab
static readonly ImmutableHashSet< Type > Types
 

Properties

bool HasReputationRequirements [get]
 
bool HasMissionRequirements [get]
 
bool HasLevelRequirements [get]
 
- Properties inherited from Barotrauma.Prefab
ContentPackageContentPackage [get]
 
ContentPath FilePath [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from Barotrauma.EventPrefab
static EventPrefab Create (ContentXElement element, RandomEventsFile file, Identifier fallbackIdentifier=default)
 
static EventPrefab GetUnlockPathEvent (Identifier biomeIdentifier, Faction faction)
 
- Static Public Member Functions inherited from Barotrauma.Prefab
static void DisallowCallFromConstructor ()
 
- Protected Member Functions inherited from Barotrauma.Prefab
virtual Identifier DetermineIdentifier (XElement element)
 

Constructor & Destructor Documentation

◆ TraitorEventPrefab()

Barotrauma.TraitorEventPrefab.TraitorEventPrefab ( ContentXElement element,
RandomEventsFile file,
Identifier fallbackIdentifier = default )

Member Function Documentation

◆ Dispose()

override void Barotrauma.TraitorEventPrefab.Dispose ( )

◆ LevelRequirementsMet()

bool Barotrauma.TraitorEventPrefab.LevelRequirementsMet ( Level? level)

◆ MissionRequirementsMet()

bool Barotrauma.TraitorEventPrefab.MissionRequirementsMet ( GameSession? gameSession)

◆ ReputationRequirementsMet()

bool Barotrauma.TraitorEventPrefab.ReputationRequirementsMet ( CampaignMode? campaign)

◆ ToString()

override string Barotrauma.TraitorEventPrefab.ToString ( )

Member Data Documentation

◆ AllowAccusingSecondaryTraitor

readonly bool Barotrauma.TraitorEventPrefab.AllowAccusingSecondaryTraitor

Does accusing a secondary traitor count as correctly identifying the traitor?

◆ DangerLevel

readonly int Barotrauma.TraitorEventPrefab.DangerLevel

◆ Icon

readonly? Sprite Barotrauma.TraitorEventPrefab.Icon

◆ IconColor

readonly Color Barotrauma.TraitorEventPrefab.IconColor

◆ IsChainable

readonly bool Barotrauma.TraitorEventPrefab.IsChainable

Is this event chainable, i.e. does the same traitor get another, higher-lvl one if they complete this one successfully?

◆ MaxDangerLevel

const int Barotrauma.TraitorEventPrefab.MaxDangerLevel = 3
static

◆ MinDangerLevel

const int Barotrauma.TraitorEventPrefab.MinDangerLevel = 1
static

◆ MinPlayerCount

readonly int Barotrauma.TraitorEventPrefab.MinPlayerCount

Minimum number of non-spectating human players on the server for the event to get selected.

◆ MoneyPenaltyForUnfoundedTraitorAccusation

readonly int Barotrauma.TraitorEventPrefab.MoneyPenaltyForUnfoundedTraitorAccusation

Money penalty if the crew votes a wrong player as the traitor.

◆ RequiredCompletedTags

ImmutableHashSet<Identifier> Barotrauma.TraitorEventPrefab.RequiredCompletedTags

An event with one of these tags must've been completed previously for this event to trigger.

◆ RequiredPreviousDangerLevel

readonly int Barotrauma.TraitorEventPrefab.RequiredPreviousDangerLevel

An event of this danger level (or higher) must have been selected previously for this event to trigger. It does not matter whether the event was completed successfully or not. Defaults to one less than the DangerLevel of this event.

◆ RequirePreviousDangerLevelCompleted

readonly bool Barotrauma.TraitorEventPrefab.RequirePreviousDangerLevelCompleted

An event of a lower danger level must have been completed on the previous round for this event to trigger. Defaults to false (no requirements)

◆ SecondaryTraitorAmount

readonly int Barotrauma.TraitorEventPrefab.SecondaryTraitorAmount

Number of players to assign as a "secondary traitor". If both this and SecondaryTraitorPercentage are defined, this is treated as a minimum number of secondary traitors.

◆ SecondaryTraitorPercentage

readonly float Barotrauma.TraitorEventPrefab.SecondaryTraitorPercentage

Percentage of players to assign as a "secondary traitor".

◆ StealPercentageOfExperience

readonly float Barotrauma.TraitorEventPrefab.StealPercentageOfExperience

◆ Tags

ImmutableHashSet<Identifier> Barotrauma.TraitorEventPrefab.Tags

Property Documentation

◆ HasLevelRequirements

bool Barotrauma.TraitorEventPrefab.HasLevelRequirements
get

◆ HasMissionRequirements

bool Barotrauma.TraitorEventPrefab.HasMissionRequirements
get

◆ HasReputationRequirements

bool Barotrauma.TraitorEventPrefab.HasReputationRequirements
get

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