Game.GameSession

Barotrauma.GameSession

Functions

AddToGUIUpdateList()

AddToGUIUpdateList

Draw(spriteBatch)

Draw

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

EnableEventLogNotificationIcon(enabled)

EnableEventLogNotificationIcon

Parameters

  • enabled bool

EndRound(endMessage, transitionType, traitorResults)

EndRound

Parameters

  • transitionType TransitionType

  • traitorResults optional TraitorResults

EnforceMissionOrder(missionIdentifiers)

EnforceMissionOrder

Parameters

  • missionIdentifiers table

Equals(obj)

Equals

Parameters

  • obj Object

Returns

  • bool

GameSession(submarineInfo, enemySub, dataPath, gameModePreset, settings, seed, missionTypes)

GameSession

Parameters

  • enemySub Option

  • dataPath CampaignDataPath

  • gameModePreset GameModePreset

  • settings CampaignSettings

  • missionTypes IEnumerable

GameSession(submarineInfo, ownedSubmarines, doc, campaignData)

GameSession

Parameters

  • doc Xml.Linq.XDocument

  • campaignData CampaignDataPath

GameSession(submarineInfo, enemySub, gameModePreset, seed, missionPrefabs)

GameSession

Parameters

  • enemySub Option

  • gameModePreset GameModePreset

  • missionPrefabs IEnumerable

GameSession.CreateDummyLocations(seed, forceLocationType)

CreateDummyLocations

Parameters

  • forceLocationType LocationType

Returns

  • Location[]

GameSession.CreateDummyLocations(levelData, forceLocationType)

CreateDummyLocations

Parameters

  • forceLocationType LocationType

Returns

  • Location[]

GameSession.CreateNotificationIcon(parent, offset)

CreateNotificationIcon

Parameters

  • parent GUIComponent

  • offset bool

Returns

  • GUIImage

GameSession.GetPerks()

GetPerks

Returns

  • PerkCollection

GameSession.GetSessionCrewCharacters(type)

GetSessionCrewCharacters

Parameters

  • type CharacterType

Returns

  • Collections.Immutable.ImmutableHashSet

GameSession.IsCompatibleWithEnabledContentPackages(contentPackageNames, errorMsg)

IsCompatibleWithEnabledContentPackages

Parameters

  • contentPackageNames IList

  • errorMsg LocalizedString&

Returns

  • bool

GameSession.PlaceSubAtInitialPosition(sub, level, placeAtStart, forceDocking)

PlaceSubAtInitialPosition

Parameters

  • placeAtStart bool

  • forceDocking bool

GameSession.ShouldApplyDisembarkPoints(preset)

ShouldApplyDisembarkPoints

Parameters

  • preset GameModePreset

Returns

  • bool

GameSession.ShouldIgnorePerksThatCanNotApplyWithoutSubmarine(preset, missionTypes)

ShouldIgnorePerksThatCanNotApplyWithoutSubmarine

Parameters

  • preset GameModePreset

  • missionTypes IEnumerable

Returns

  • bool

GameSession.UpdateTalentNotificationIndicator(indicator)

UpdateTalentNotificationIndicator

Parameters

  • indicator GUIImage

GameSession.ValidatedDisembarkPoints(preset, missionTypes)

ValidatedDisembarkPoints

Parameters

  • preset GameModePreset

  • missionTypes IEnumerable

Returns

  • bool

GetHashCode()

GetHashCode

Returns

  • number

GetMission(index)

GetMission

Parameters

  • index number

Returns

  • Mission

GetMissionIndex(mission)

GetMissionIndex

Parameters

  • mission Mission

Returns

  • number

GetType()

GetType

Returns

  • Type

HUDScaleChanged()

HUDScaleChanged

IncrementPermadeath(accountId)

IncrementPermadeath

Parameters

  • accountId Option

IsCurrentLocationRadiated()

IsCurrentLocationRadiated

Returns

  • bool

IsSubmarineOwned(query)

IsSubmarineOwned

Parameters

Returns

  • bool

KillCharacter(character)

KillCharacter

Parameters

  • character Character

LoadPreviousSave()

LoadPreviousSave

LogEndRoundStats(eventId, traitorResults)

LogEndRoundStats

Parameters

  • traitorResults optional TraitorResults

PermadeathCountForAccount(accountId)

PermadeathCountForAccount

Parameters

  • accountId Option

Returns

  • number

ReviveCharacter(character)

ReviveCharacter

Parameters

  • character Character

Save(filePath, isSavingOnLoading)

Save

Parameters

  • isSavingOnLoading bool

SetRespawnInfo(text, textColor, waitForNextRoundRespawn, hideButtons)

SetRespawnInfo

Parameters

  • textColor Microsoft.Xna.Framework.Color

  • waitForNextRoundRespawn bool

  • hideButtons bool

StartRound(levelSeed, difficulty, levelGenerationParams, forceBiome)

StartRound

Parameters

  • difficulty optional Single

  • levelGenerationParams LevelGenerationParams

  • forceBiome Identifier

StartRound(levelData, mirrorLevel, startOutpost, endOutpost)

StartRound

Parameters

  • mirrorLevel bool

SwitchSubmarine(newSubmarine, transferItems, client)

SwitchSubmarine

Parameters

  • transferItems bool

  • client Networking.Client

ToString()

ToString

Returns

ToggleTabMenu()

ToggleTabMenu

Returns

  • bool

TryPurchaseSubmarine(newSubmarine, client)

TryPurchaseSubmarine

Parameters

  • client Networking.Client

Returns

  • bool

Update(deltaTime)

Update

Parameters

  • deltaTime number

Fields

AllowHrManagerBotTakeover

AllowHrManagerBotTakeover, field of type bool

  • AllowHrManagerBotTakeover

Campaign

Campaign, field of type CampaignMode

  • Campaign

Casualties

Casualties, field of type IEnumerable

  • Casualties

CrewManager

CrewManager, field of type CrewManager

  • CrewManager

DataPath

DataPath, field of type CampaignDataPath

  • DataPath

DeathPrompt

DeathPrompt, field of type DeathPrompt

  • DeathPrompt

EndLocation

EndLocation, field of type Location

  • EndLocation

EnemySubmarineInfo

EnemySubmarineInfo, field of type SubmarineInfo

  • EnemySubmarineInfo

EventManager

EventManager, field of type EventManager

  • EventManager

ForceOutpostModule

ForceOutpostModule, field of type SubmarineInfo

  • ForceOutpostModule

GameMode

GameMode, field of type GameMode

  • GameMode

GameSession.IsTabMenuOpen

GameSession.IsTabMenuOpen, field of type bool

GameSession.MinimumLoadingTime

GameSession.MinimumLoadingTime, field of type number

GameSession.TabMenuInstance

GameSession.TabMenuInstance, field of type TabMenu

IsRunning

IsRunning, field of type bool

  • IsRunning

LastSaveVersion

LastSaveVersion, field of type Version

  • LastSaveVersion

Level

Level, field of type Level

  • Level

LevelData

LevelData, field of type LevelData

  • LevelData

Map

Map, field of type Map

  • Map

MirrorLevel

MirrorLevel, field of type bool

  • MirrorLevel

Missions

Missions, field of type IEnumerable

  • Missions

OwnedSubmarines

OwnedSubmarines, field of type table

  • OwnedSubmarines

RoundDuration

RoundDuration, field of type number

  • RoundDuration

RoundEnding

RoundEnding, field of type bool

  • RoundEnding

RoundSummary

RoundSummary, field of type RoundSummary

  • RoundSummary

StartLocation

StartLocation, field of type Location

  • StartLocation

Submarine

Submarine, field of type Submarine

  • Submarine

SubmarineInfo

SubmarineInfo, field of type SubmarineInfo

  • SubmarineInfo

TimeSpentCleaning

TimeSpentCleaning, field of type number

  • TimeSpentCleaning

TimeSpentPainting

TimeSpentPainting, field of type number

  • TimeSpentPainting

TraitorsEnabled

TraitorsEnabled, field of type bool

  • TraitorsEnabled

WinningTeam

WinningTeam, field of type ?CharacterTeamType

  • WinningTeam