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

Public Member Functions

 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 ()
 

Static Public Member Functions

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 ()
 

Public Attributes

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

static readonly PrefabCollection< EventPrefabPrefabs = new PrefabCollection<EventPrefab>()
 
- Static Public Attributes inherited from Barotrauma.Prefab
static readonly ImmutableHashSet< Type > Types
 

Additional Inherited Members

- Protected Member Functions inherited from Barotrauma.Prefab
virtual Identifier DetermineIdentifier (XElement element)
 
- Properties inherited from Barotrauma.Prefab
ContentPackageContentPackage [get]
 
ContentPath FilePath [get]
 

Constructor & Destructor Documentation

◆ EventPrefab()

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

Member Function Documentation

◆ Create()

static EventPrefab Barotrauma.EventPrefab.Create ( ContentXElement element,
RandomEventsFile file,
Identifier fallbackIdentifier = default )
static

◆ CreateInstance()

Event Barotrauma.EventPrefab.CreateInstance ( int seed)

◆ Dispose()

override void Barotrauma.EventPrefab.Dispose ( )

◆ GetUnlockPathEvent()

static EventPrefab Barotrauma.EventPrefab.GetUnlockPathEvent ( Identifier biomeIdentifier,
Faction faction )
static

◆ ToString()

override string Barotrauma.EventPrefab.ToString ( )

◆ TryCreateInstance< T >()

bool Barotrauma.EventPrefab.TryCreateInstance< T > ( int seed,
out T instance )
Type Constraints
T :Event 

Member Data Documentation

◆ BiomeIdentifier

readonly Identifier Barotrauma.EventPrefab.BiomeIdentifier

If set, the event set can only be chosen in this biome.

◆ Commonness

readonly float Barotrauma.EventPrefab.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).

◆ ConfigElement

readonly ContentXElement Barotrauma.EventPrefab.ConfigElement

◆ EventType

readonly Type Barotrauma.EventPrefab.EventType

◆ Faction

readonly Identifier Barotrauma.EventPrefab.Faction

If set, the event set can only be chosen in locations that belong to this faction.

◆ Name

readonly LocalizedString Barotrauma.EventPrefab.Name

◆ Prefabs

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

◆ Probability

readonly float Barotrauma.EventPrefab.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).

◆ RequiredLayer

readonly Identifier Barotrauma.EventPrefab.RequiredLayer

If set, this layer must be present somewhere in the level.

◆ TriggerEventCooldown

readonly bool Barotrauma.EventPrefab.TriggerEventCooldown

When this event occurs, should it trigger the event cooldown during which no new events are triggered?

◆ UnlockPathEvent

readonly bool Barotrauma.EventPrefab.UnlockPathEvent

If set, this event is used as an event that can unlock a path to the next biome.

◆ UnlockPathReputation

readonly int Barotrauma.EventPrefab.UnlockPathReputation

Only valid if UnlockPathEvent is set to true. The reputation requirement displayed on the pathway this event is blocking.

◆ UnlockPathTooltip

readonly string Barotrauma.EventPrefab.UnlockPathTooltip

Only valid if UnlockPathEvent is set to true. The tooltip displayed on the pathway this event is blocking.


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