Barotrauma Client Doc
Barotrauma.EventManager Class Reference

Public Types

enum class  NetworkEventType {
  CONVERSATION , CONVERSATION_SELECTED_OPTION , STATUSEFFECT , MISSION ,
  UNLOCKPATH , EVENTLOG , EVENTOBJECTIVE
}
 

Public Member Functions

void AddTimeStamp (Event e)
 
 EventManager ()
 
void StartRound (Level level)
 
void ActivateEvent (Event newEvent)
 
void ClearEvents ()
 
IEnumerable< ContentFileGetFilesToPreload ()
 
void PreloadContent (IEnumerable< ContentFile > contentFiles)
 
void TriggerOnEndRoundActions ()
 
void EndRound ()
 
void RegisterEventHistory (bool registerFinishedOnly=false)
 Registers the exhaustible events in the level as exhausted, and adds the current events to the event history More...
 
void SkipEventCooldown ()
 
void Update (float deltaTime)
 
void EntitySpawned (Entity entity)
 
void Load (XElement element)
 
XElement Save ()
 
void DebugDraw (SpriteBatch spriteBatch)
 
void DebugDrawHUD (SpriteBatch spriteBatch, float y)
 
void DrawPinnedEvent (SpriteBatch spriteBatch)
 
void ClientRead (IReadMessage msg)
 

Static Public Member Functions

static bool IsSuitable (EventPrefab e, Level level)
 
static bool IsLevelSuitable (EventPrefab e, Level level)
 
static ISpatialEntity GetRefEntity ()
 Get the entity that should be used in determining how far the player has progressed in the level. = The submarine or player character that has progressed the furthest. More...
 

Public Attributes

float CumulativeMonsterStrengthMain
 
float CumulativeMonsterStrengthRuins
 
float CumulativeMonsterStrengthWrecks
 
float CumulativeMonsterStrengthCaves
 
readonly Queue< EventQueuedEvents = new Queue<Event>()
 
readonly Queue< IdentifierQueuedEventsForNextRound = new Queue<Identifier>()
 
readonly EventLog EventLog = new EventLog()
 
bool Enabled = true
 

Static Public Attributes

readonly record struct NetEventLogEntry(Identifier EventPrefabId, Identifier LogEntryId, string Text)[NetworkSerialize] readonly record struct const NetEventObjective(EventObjectiveAction.SegmentActionType Type, Identifier Identifier, Identifier ObjectiveTag, Identifier TextTag, Identifier ParentObjectiveId, bool CanBeCompleted) float IntensityUpdateInterval = 5.0f
 

Properties

float CurrentIntensity [get]
 
float MusicIntensity [get]
 
IEnumerable< EventActiveEvents [get]
 
EventPinnedEvent [get, set]
 

Detailed Description

Member Enumeration Documentation

◆ NetworkEventType

Enumerator
CONVERSATION 
CONVERSATION_SELECTED_OPTION 
STATUSEFFECT 
MISSION 
UNLOCKPATH 
EVENTLOG 
EVENTOBJECTIVE 

Definition at line 14 of file BarotraumaShared/SharedSource/Events/EventManager.cs.

Constructor & Destructor Documentation

◆ EventManager()

Barotrauma.EventManager.EventManager ( )

Member Function Documentation

◆ ActivateEvent()

void Barotrauma.EventManager.ActivateEvent ( Event  newEvent)

◆ AddTimeStamp()

void Barotrauma.EventManager.AddTimeStamp ( Event  e)

◆ ClearEvents()

void Barotrauma.EventManager.ClearEvents ( )

◆ ClientRead()

void Barotrauma.EventManager.ClientRead ( IReadMessage  msg)

◆ DebugDraw()

void Barotrauma.EventManager.DebugDraw ( SpriteBatch  spriteBatch)

◆ DebugDrawHUD()

void Barotrauma.EventManager.DebugDrawHUD ( SpriteBatch  spriteBatch,
float  y 
)

◆ DrawPinnedEvent()

void Barotrauma.EventManager.DrawPinnedEvent ( SpriteBatch  spriteBatch)

◆ EndRound()

void Barotrauma.EventManager.EndRound ( )

◆ EntitySpawned()

void Barotrauma.EventManager.EntitySpawned ( Entity  entity)

◆ GetFilesToPreload()

IEnumerable<ContentFile> Barotrauma.EventManager.GetFilesToPreload ( )

◆ GetRefEntity()

static ISpatialEntity Barotrauma.EventManager.GetRefEntity ( )
static

Get the entity that should be used in determining how far the player has progressed in the level. = The submarine or player character that has progressed the furthest.

Definition at line 1111 of file BarotraumaShared/SharedSource/Events/EventManager.cs.

◆ IsLevelSuitable()

static bool Barotrauma.EventManager.IsLevelSuitable ( EventPrefab  e,
Level  level 
)
static

◆ IsSuitable()

static bool Barotrauma.EventManager.IsSuitable ( EventPrefab  e,
Level  level 
)
static

◆ Load()

void Barotrauma.EventManager.Load ( XElement  element)

◆ PreloadContent()

void Barotrauma.EventManager.PreloadContent ( IEnumerable< ContentFile contentFiles)

◆ RegisterEventHistory()

void Barotrauma.EventManager.RegisterEventHistory ( bool  registerFinishedOnly = false)

Registers the exhaustible events in the level as exhausted, and adds the current events to the event history

Definition at line 423 of file BarotraumaShared/SharedSource/Events/EventManager.cs.

◆ Save()

XElement Barotrauma.EventManager.Save ( )

◆ SkipEventCooldown()

void Barotrauma.EventManager.SkipEventCooldown ( )

◆ StartRound()

void Barotrauma.EventManager.StartRound ( Level  level)

◆ TriggerOnEndRoundActions()

void Barotrauma.EventManager.TriggerOnEndRoundActions ( )

◆ Update()

void Barotrauma.EventManager.Update ( float  deltaTime)

Member Data Documentation

◆ CumulativeMonsterStrengthCaves

float Barotrauma.EventManager.CumulativeMonsterStrengthCaves

◆ CumulativeMonsterStrengthMain

float Barotrauma.EventManager.CumulativeMonsterStrengthMain

◆ CumulativeMonsterStrengthRuins

float Barotrauma.EventManager.CumulativeMonsterStrengthRuins

◆ CumulativeMonsterStrengthWrecks

float Barotrauma.EventManager.CumulativeMonsterStrengthWrecks

◆ Enabled

bool Barotrauma.EventManager.Enabled = true

◆ EventLog

readonly EventLog Barotrauma.EventManager.EventLog = new EventLog()

◆ IntensityUpdateInterval

readonly record struct NetEventLogEntry (Identifier EventPrefabId, Identifier LogEntryId, string Text) [NetworkSerialize] readonly record struct const NetEventObjective ( EventObjectiveAction.SegmentActionType Type, Identifier Identifier, Identifier ObjectiveTag, Identifier TextTag, Identifier ParentObjectiveId, bool CanBeCompleted) float Barotrauma.EventManager.IntensityUpdateInterval = 5.0f
static

◆ QueuedEvents

readonly Queue<Event> Barotrauma.EventManager.QueuedEvents = new Queue<Event>()

◆ QueuedEventsForNextRound

readonly Queue<Identifier> Barotrauma.EventManager.QueuedEventsForNextRound = new Queue<Identifier>()

Property Documentation

◆ ActiveEvents

IEnumerable<Event> Barotrauma.EventManager.ActiveEvents
get

◆ CurrentIntensity

float Barotrauma.EventManager.CurrentIntensity
get

◆ MusicIntensity

float Barotrauma.EventManager.MusicIntensity
get

◆ PinnedEvent

Event? Barotrauma.EventManager.PinnedEvent
getset