Barotrauma Client
Loading...
Searching...
No Matches
Barotrauma.SubmarineInfo Class Reference
Inheritance diagram for Barotrauma.SubmarineInfo:

Public Types

enum  CrewExperienceLevel { Unknown , CrewExperienceLow , CrewExperienceMid , CrewExperienceHigh }
 

Public Member Functions

override string ToString ()
 
 SubmarineInfo ()
 
 SubmarineInfo (string filePath, string hash="", XElement element=null, bool tryLoad=true)
 
 SubmarineInfo (Submarine sub)
 
 SubmarineInfo (SubmarineInfo original)
 
void Reload ()
 
void Dispose ()
 
bool IsVanillaSubmarine ()
 
void StartHashDocTask (XDocument doc)
 
bool HasTag (SubmarineTag tag)
 
void AddTag (SubmarineTag tag)
 
void RemoveTag (SubmarineTag tag)
 
void CheckSubsLeftBehind (XElement element=null)
 
bool IsCrushDepthDefinedInStructures (out float realWorldCrushDepth)
 Calculated from SubmarineElement. Can be used when the sub hasn't been loaded and we can't access Submarine.RealWorldCrushDepth.
 
void AddOutpostNPCIdentifierOrTag (Character npc, Identifier idOrTag)
 
void SaveAs (string filePath, System.IO.MemoryStream previewImage=null)
 
int GetPrice (Location location=null, ImmutableHashSet< Character > characterList=null)
 

Static Public Member Functions

static void AddToSavedSubs (SubmarineInfo subInfo)
 
static void RemoveSavedSub (string filePath)
 
static void RefreshSavedSub (string filePath)
 
static void RefreshSavedSubs ()
 
static XDocument OpenFile (string file)
 
static XDocument OpenFile (string file, out Exception exception)
 
static int GetDefaultTier (int price)
 

Public Attributes

readonly DateTime LastModifiedTime
 
int RecommendedCrewSizeMin = 1
 
int RecommendedCrewSizeMax = 2
 
CrewExperienceLevel RecommendedCrewExperience
 
HashSet< string > RequiredContentPackages = new HashSet<string>()
 
SubmarineClass SubmarineClass
 
readonly List< ushort > LeftBehindDockingPortIDs = new List<ushort>()
 
readonly List< ushort > BlockedDockingPortIDs = new List<ushort>()
 
OutpostGenerationParams OutpostGenerationParams
 
readonly Dictionary< Identifier, List< Character > > OutpostNPCs = new Dictionary<Identifier, List<Character>>()
 

Static Public Attributes

const int HighestTier = 3
 

Properties

static IEnumerable< SubmarineInfoSavedSubmarines [get]
 
SubmarineTag Tags [get]
 
int Tier [get, set]
 
int EqualityCheckVal [get]
 A random int that gets assigned when saving the sub. Used in mp campaign to verify that sub files match.
 
string Name [get, set]
 
LocalizedString DisplayName [get, set]
 
LocalizedString Description [get, set]
 
int Price [get, set]
 
bool InitialSuppliesSpawned [get, set]
 
bool NoItems [get, set]
 
bool LowFuel [get, set]
 Note: Refreshed for loaded submarines when they are saved, when they are loaded, and on round end. If you need to refresh it, please use Submarine.CheckFuel() method!
 
Version GameVersion [get, set]
 
SubmarineType Type [get, set]
 
bool IsManuallyOutfitted [get, set]
 
OutpostModuleInfo OutpostModuleInfo [get, set]
 
BeaconStationInfo BeaconStationInfo [get, set]
 
WreckInfo WreckInfo [get, set]
 
ExtraSubmarineInfo GetExtraSubmarineInfo [get]
 
bool IsOutpost [get]
 
bool IsWreck [get]
 
bool IsBeacon [get]
 
bool IsPlayer [get]
 
bool IsRuin [get]
 
bool IsCampaignCompatible [get]
 
bool IsCampaignCompatibleIgnoreClass [get]
 
bool AllowPreviewImage [get]
 
Md5Hash MD5Hash [get]
 
bool CalculatingHash [get]
 
Vector2 Dimensions [get]
 
int CargoCapacity [get]
 
string FilePath [get, set]
 
XElement SubmarineElement [get]
 
bool IsFileCorrupted [get]
 
bool RequiredContentPackagesInstalled [get, set]
 
bool SubsLeftBehind [get]
 
bool LeftBehindSubDockingPortOccupied [get]
 
HashSet< Identifier > LayersHiddenByDefault = new HashSet<Identifier>() [get]
 Names of layers that get automatically hidden when loading the sub.
 

Member Enumeration Documentation

◆ CrewExperienceLevel

Enumerator
Unknown 
CrewExperienceLow 
CrewExperienceMid 
CrewExperienceHigh 

Constructor & Destructor Documentation

◆ SubmarineInfo() [1/4]

Barotrauma.SubmarineInfo.SubmarineInfo ( )

◆ SubmarineInfo() [2/4]

Barotrauma.SubmarineInfo.SubmarineInfo ( string filePath,
string hash = "",
XElement element = null,
bool tryLoad = true )

◆ SubmarineInfo() [3/4]

Barotrauma.SubmarineInfo.SubmarineInfo ( Submarine sub)

◆ SubmarineInfo() [4/4]

Barotrauma.SubmarineInfo.SubmarineInfo ( SubmarineInfo original)

Member Function Documentation

◆ AddOutpostNPCIdentifierOrTag()

void Barotrauma.SubmarineInfo.AddOutpostNPCIdentifierOrTag ( Character npc,
Identifier idOrTag )

◆ AddTag()

void Barotrauma.SubmarineInfo.AddTag ( SubmarineTag tag)

◆ AddToSavedSubs()

static void Barotrauma.SubmarineInfo.AddToSavedSubs ( SubmarineInfo subInfo)
static

◆ CheckSubsLeftBehind()

void Barotrauma.SubmarineInfo.CheckSubsLeftBehind ( XElement element = null)

◆ Dispose()

void Barotrauma.SubmarineInfo.Dispose ( )

◆ GetDefaultTier()

static int Barotrauma.SubmarineInfo.GetDefaultTier ( int price)
static

◆ GetPrice()

int Barotrauma.SubmarineInfo.GetPrice ( Location location = null,
ImmutableHashSet< Character > characterList = null )

◆ HasTag()

bool Barotrauma.SubmarineInfo.HasTag ( SubmarineTag tag)

◆ IsCrushDepthDefinedInStructures()

bool Barotrauma.SubmarineInfo.IsCrushDepthDefinedInStructures ( out float realWorldCrushDepth)

Calculated from SubmarineElement. Can be used when the sub hasn't been loaded and we can't access Submarine.RealWorldCrushDepth.

◆ IsVanillaSubmarine()

bool Barotrauma.SubmarineInfo.IsVanillaSubmarine ( )

◆ OpenFile() [1/2]

static XDocument Barotrauma.SubmarineInfo.OpenFile ( string file)
static

◆ OpenFile() [2/2]

static XDocument Barotrauma.SubmarineInfo.OpenFile ( string file,
out Exception exception )
static

◆ RefreshSavedSub()

static void Barotrauma.SubmarineInfo.RefreshSavedSub ( string filePath)
static

◆ RefreshSavedSubs()

static void Barotrauma.SubmarineInfo.RefreshSavedSubs ( )
static

◆ Reload()

void Barotrauma.SubmarineInfo.Reload ( )

◆ RemoveSavedSub()

static void Barotrauma.SubmarineInfo.RemoveSavedSub ( string filePath)
static

◆ RemoveTag()

void Barotrauma.SubmarineInfo.RemoveTag ( SubmarineTag tag)

◆ SaveAs()

void Barotrauma.SubmarineInfo.SaveAs ( string filePath,
System.IO.MemoryStream previewImage = null )

◆ StartHashDocTask()

void Barotrauma.SubmarineInfo.StartHashDocTask ( XDocument doc)

◆ ToString()

override string Barotrauma.SubmarineInfo.ToString ( )

Member Data Documentation

◆ BlockedDockingPortIDs

readonly List<ushort> Barotrauma.SubmarineInfo.BlockedDockingPortIDs = new List<ushort>()

◆ HighestTier

const int Barotrauma.SubmarineInfo.HighestTier = 3
static

◆ LastModifiedTime

readonly DateTime Barotrauma.SubmarineInfo.LastModifiedTime

◆ LeftBehindDockingPortIDs

readonly List<ushort> Barotrauma.SubmarineInfo.LeftBehindDockingPortIDs = new List<ushort>()

◆ OutpostGenerationParams

OutpostGenerationParams Barotrauma.SubmarineInfo.OutpostGenerationParams

◆ OutpostNPCs

readonly Dictionary<Identifier, List<Character> > Barotrauma.SubmarineInfo.OutpostNPCs = new Dictionary<Identifier, List<Character>>()

◆ RecommendedCrewExperience

CrewExperienceLevel Barotrauma.SubmarineInfo.RecommendedCrewExperience

◆ RecommendedCrewSizeMax

int Barotrauma.SubmarineInfo.RecommendedCrewSizeMax = 2

◆ RecommendedCrewSizeMin

int Barotrauma.SubmarineInfo.RecommendedCrewSizeMin = 1

◆ RequiredContentPackages

HashSet<string> Barotrauma.SubmarineInfo.RequiredContentPackages = new HashSet<string>()

◆ SubmarineClass

SubmarineClass Barotrauma.SubmarineInfo.SubmarineClass

Property Documentation

◆ AllowPreviewImage

bool Barotrauma.SubmarineInfo.AllowPreviewImage
get

◆ BeaconStationInfo

BeaconStationInfo Barotrauma.SubmarineInfo.BeaconStationInfo
getset

◆ CalculatingHash

bool Barotrauma.SubmarineInfo.CalculatingHash
get

◆ CargoCapacity

int Barotrauma.SubmarineInfo.CargoCapacity
get

◆ Description

LocalizedString Barotrauma.SubmarineInfo.Description
getset

◆ Dimensions

Vector2 Barotrauma.SubmarineInfo.Dimensions
get

◆ DisplayName

LocalizedString Barotrauma.SubmarineInfo.DisplayName
getset

◆ EqualityCheckVal

int Barotrauma.SubmarineInfo.EqualityCheckVal
get

A random int that gets assigned when saving the sub. Used in mp campaign to verify that sub files match.

◆ FilePath

string Barotrauma.SubmarineInfo.FilePath
getset

◆ GameVersion

Version Barotrauma.SubmarineInfo.GameVersion
getset

◆ GetExtraSubmarineInfo

ExtraSubmarineInfo Barotrauma.SubmarineInfo.GetExtraSubmarineInfo
get

◆ InitialSuppliesSpawned

bool Barotrauma.SubmarineInfo.InitialSuppliesSpawned
getset

◆ IsBeacon

bool Barotrauma.SubmarineInfo.IsBeacon
get

◆ IsCampaignCompatible

bool Barotrauma.SubmarineInfo.IsCampaignCompatible
get

◆ IsCampaignCompatibleIgnoreClass

bool Barotrauma.SubmarineInfo.IsCampaignCompatibleIgnoreClass
get

◆ IsFileCorrupted

bool Barotrauma.SubmarineInfo.IsFileCorrupted
get

◆ IsManuallyOutfitted

bool Barotrauma.SubmarineInfo.IsManuallyOutfitted
getset

◆ IsOutpost

bool Barotrauma.SubmarineInfo.IsOutpost
get

◆ IsPlayer

bool Barotrauma.SubmarineInfo.IsPlayer
get

◆ IsRuin

bool Barotrauma.SubmarineInfo.IsRuin
get

◆ IsWreck

bool Barotrauma.SubmarineInfo.IsWreck
get

◆ LayersHiddenByDefault

HashSet<Identifier> Barotrauma.SubmarineInfo.LayersHiddenByDefault = new HashSet<Identifier>()
get

Names of layers that get automatically hidden when loading the sub.

◆ LeftBehindSubDockingPortOccupied

bool Barotrauma.SubmarineInfo.LeftBehindSubDockingPortOccupied
get

◆ LowFuel

bool Barotrauma.SubmarineInfo.LowFuel
getset

Note: Refreshed for loaded submarines when they are saved, when they are loaded, and on round end. If you need to refresh it, please use Submarine.CheckFuel() method!

◆ MD5Hash

Md5Hash Barotrauma.SubmarineInfo.MD5Hash
get

◆ Name

string Barotrauma.SubmarineInfo.Name
getset

◆ NoItems

bool Barotrauma.SubmarineInfo.NoItems
getset

◆ OutpostModuleInfo

OutpostModuleInfo Barotrauma.SubmarineInfo.OutpostModuleInfo
getset

◆ Price

int Barotrauma.SubmarineInfo.Price
getset

◆ RequiredContentPackagesInstalled

bool Barotrauma.SubmarineInfo.RequiredContentPackagesInstalled
getset

◆ SavedSubmarines

IEnumerable<SubmarineInfo> Barotrauma.SubmarineInfo.SavedSubmarines
staticget

◆ SubmarineElement

XElement Barotrauma.SubmarineInfo.SubmarineElement
get

◆ SubsLeftBehind

bool Barotrauma.SubmarineInfo.SubsLeftBehind
get

◆ Tags

SubmarineTag Barotrauma.SubmarineInfo.Tags
get

◆ Tier

int Barotrauma.SubmarineInfo.Tier
getset

◆ Type

SubmarineType Barotrauma.SubmarineInfo.Type
getset

◆ WreckInfo

WreckInfo Barotrauma.SubmarineInfo.WreckInfo
getset

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