Barotrauma Client Doc
Barotrauma.LocationType Class Reference
Inheritance diagram for Barotrauma.LocationType:
Barotrauma.PrefabWithUintIdentifier Barotrauma.Prefab

Public Member Functions

override string ToString ()
 
 LocationType (ContentXElement element, LocationTypesFile file)
 
JobPrefab GetRandomHireable ()
 
Sprite GetPortrait (int randomSeed)
 
Identifier GetRandomNameId (Random rand, IEnumerable< Location > existingLocations)
 
string GetRandomRawName (Random rand, IEnumerable< Location > existingLocations)
 For backwards compatibility. Chooses a random name from the names defined in the .txt name files (rawNamePaths). More...
 
OutpostGenerationParams GetForcedOutpostGenerationParams ()
 
override void Dispose ()
 
- Public Member Functions inherited from Barotrauma.Prefab
 Prefab (ContentFile file, Identifier identifier)
 
 Prefab (ContentFile file, ContentXElement element)
 

Static Public Member Functions

static LocationType Random (Random rand, int? zone=null, bool requireOutpost=false, Func< LocationType, bool > predicate=null)
 
- Static Public Member Functions inherited from Barotrauma.Prefab
static void DisallowCallFromConstructor ()
 

Public Attributes

readonly Dictionary< int, float > CommonnessPerZone = new Dictionary<int, float>()
 
readonly Dictionary< int, int > MinCountPerZone = new Dictionary<int, int>()
 
readonly LocalizedString Name
 
readonly LocalizedString Description
 
readonly Identifier ForceLocationName
 
readonly float BeaconStationChance
 
readonly CharacterTeamType OutpostTeam
 
readonly List< LocationTypeChangeCanChangeTo = new List<LocationTypeChange>()
 
readonly ImmutableArray< IdentifierMissionIdentifiers
 
readonly ImmutableArray< IdentifierMissionTags
 
readonly List< string > HideEntitySubcategories = new List<string>()
 
readonly bool ShowSonarMarker = true
 
- Public Attributes inherited from Barotrauma.Prefab
readonly Identifier Identifier
 
readonly ContentFile ContentFile
 

Static Public Attributes

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

Properties

bool IsEnterable [get]
 
bool AllowAsBiomeGate [get]
 
bool AllowInRandomLevels [get]
 Can this location type be used in the random, non-campaign levels that don't take place in any specific zone More...
 
bool UsePortraitInRandomLoadingScreens [get]
 
IReadOnlyList< string > NameFormats [get]
 
bool HasHireableCharacters [get]
 
bool HasOutpost [get]
 
Identifier ReplaceInRadiation [get]
 
Sprite Sprite [get]
 
Sprite RadiationSprite [get]
 
bool IgnoreGenericEvents [get]
 If set to true, only event sets that explicitly define this location type in EventSet.LocationTypeIdentifiers can be selected at this location. Defaults to false. More...
 
Color SpriteColor [get]
 
float StoreMaxReputationModifier = 0.1f [get]
 
float StoreSellPriceModifier = 0.3f [get]
 
float DailySpecialPriceModifier = 0.5f [get]
 
float RequestGoodPriceModifier = 2f [get]
 
int StoreInitialBalance = 5000 [get]
 
int StorePriceModifierRange = 5 [get]
 In percentages More...
 
int DailySpecialsCount = 1 [get]
 
int RequestedGoodsCount = 1 [get]
 
- Properties inherited from Barotrauma.PrefabWithUintIdentifier
UInt32 UintIdentifier [get, set]
 
- Properties inherited from Barotrauma.Prefab
ContentPackageContentPackage [get]
 
ContentPath FilePath [get]
 

Additional Inherited Members

- Protected Member Functions inherited from Barotrauma.PrefabWithUintIdentifier
 PrefabWithUintIdentifier (ContentFile file, Identifier identifier)
 
 PrefabWithUintIdentifier (ContentFile file, ContentXElement element)
 
- Protected Member Functions inherited from Barotrauma.Prefab
virtual Identifier DetermineIdentifier (XElement element)
 

Detailed Description

Definition at line 13 of file LocationType.cs.

Constructor & Destructor Documentation

◆ LocationType()

Barotrauma.LocationType.LocationType ( ContentXElement  element,
LocationTypesFile  file 
)

Definition at line 124 of file LocationType.cs.

Member Function Documentation

◆ Dispose()

override void Barotrauma.LocationType.Dispose ( )
virtual

Implements Barotrauma.Prefab.

Definition at line 391 of file LocationType.cs.

◆ GetForcedOutpostGenerationParams()

OutpostGenerationParams Barotrauma.LocationType.GetForcedOutpostGenerationParams ( )

Definition at line 382 of file LocationType.cs.

◆ GetPortrait()

Sprite Barotrauma.LocationType.GetPortrait ( int  randomSeed)

Definition at line 273 of file LocationType.cs.

◆ GetRandomHireable()

JobPrefab Barotrauma.LocationType.GetRandomHireable ( )

Definition at line 260 of file LocationType.cs.

◆ GetRandomNameId()

Identifier Barotrauma.LocationType.GetRandomNameId ( Random  rand,
IEnumerable< Location existingLocations 
)

Definition at line 279 of file LocationType.cs.

◆ GetRandomRawName()

string Barotrauma.LocationType.GetRandomRawName ( Random  rand,
IEnumerable< Location existingLocations 
)

For backwards compatibility. Chooses a random name from the names defined in the .txt name files (rawNamePaths).

Definition at line 325 of file LocationType.cs.

◆ Random()

static LocationType Barotrauma.LocationType.Random ( Random  rand,
int?  zone = null,
bool  requireOutpost = false,
Func< LocationType, bool >  predicate = null 
)
static

Definition at line 339 of file LocationType.cs.

◆ ToString()

override string Barotrauma.LocationType.ToString ( )

Definition at line 119 of file LocationType.cs.

Member Data Documentation

◆ BeaconStationChance

readonly float Barotrauma.LocationType.BeaconStationChance

Definition at line 32 of file LocationType.cs.

◆ CanChangeTo

readonly List<LocationTypeChange> Barotrauma.LocationType.CanChangeTo = new List<LocationTypeChange>()

Definition at line 36 of file LocationType.cs.

◆ CommonnessPerZone

readonly Dictionary<int, float> Barotrauma.LocationType.CommonnessPerZone = new Dictionary<int, float>()

Definition at line 24 of file LocationType.cs.

◆ Description

readonly LocalizedString Barotrauma.LocationType.Description

Definition at line 28 of file LocationType.cs.

◆ ForceLocationName

readonly Identifier Barotrauma.LocationType.ForceLocationName

Definition at line 30 of file LocationType.cs.

◆ HideEntitySubcategories

readonly List<string> Barotrauma.LocationType.HideEntitySubcategories = new List<string>()

Definition at line 41 of file LocationType.cs.

◆ MinCountPerZone

readonly Dictionary<int, int> Barotrauma.LocationType.MinCountPerZone = new Dictionary<int, int>()

Definition at line 25 of file LocationType.cs.

◆ MissionIdentifiers

readonly ImmutableArray<Identifier> Barotrauma.LocationType.MissionIdentifiers

Definition at line 38 of file LocationType.cs.

◆ MissionTags

readonly ImmutableArray<Identifier> Barotrauma.LocationType.MissionTags

Definition at line 39 of file LocationType.cs.

◆ Name

readonly LocalizedString Barotrauma.LocationType.Name

Definition at line 27 of file LocationType.cs.

◆ OutpostTeam

readonly CharacterTeamType Barotrauma.LocationType.OutpostTeam

Definition at line 34 of file LocationType.cs.

◆ Prefabs

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

Definition at line 15 of file LocationType.cs.

◆ ShowSonarMarker

readonly bool Barotrauma.LocationType.ShowSonarMarker = true

Definition at line 117 of file LocationType.cs.

Property Documentation

◆ AllowAsBiomeGate

bool Barotrauma.LocationType.AllowAsBiomeGate
get

Definition at line 45 of file LocationType.cs.

◆ AllowInRandomLevels

bool Barotrauma.LocationType.AllowInRandomLevels
get

Can this location type be used in the random, non-campaign levels that don't take place in any specific zone

Definition at line 50 of file LocationType.cs.

◆ DailySpecialPriceModifier

float Barotrauma.LocationType.DailySpecialPriceModifier = 0.5f
get

Definition at line 107 of file LocationType.cs.

◆ DailySpecialsCount

int Barotrauma.LocationType.DailySpecialsCount = 1
get

Definition at line 114 of file LocationType.cs.

◆ HasHireableCharacters

bool Barotrauma.LocationType.HasHireableCharacters
get

Definition at line 76 of file LocationType.cs.

◆ HasOutpost

bool Barotrauma.LocationType.HasOutpost
get

Definition at line 81 of file LocationType.cs.

◆ IgnoreGenericEvents

bool Barotrauma.LocationType.IgnoreGenericEvents
get

If set to true, only event sets that explicitly define this location type in EventSet.LocationTypeIdentifiers can be selected at this location. Defaults to false.

Definition at line 97 of file LocationType.cs.

◆ IsEnterable

bool Barotrauma.LocationType.IsEnterable
get

Definition at line 43 of file LocationType.cs.

◆ NameFormats

IReadOnlyList<string> Barotrauma.LocationType.NameFormats
get

Definition at line 63 of file LocationType.cs.

◆ RadiationSprite

Sprite Barotrauma.LocationType.RadiationSprite
get

Definition at line 90 of file LocationType.cs.

◆ ReplaceInRadiation

Identifier Barotrauma.LocationType.ReplaceInRadiation
get

Definition at line 87 of file LocationType.cs.

◆ RequestedGoodsCount

int Barotrauma.LocationType.RequestedGoodsCount = 1
get

Definition at line 115 of file LocationType.cs.

◆ RequestGoodPriceModifier

float Barotrauma.LocationType.RequestGoodPriceModifier = 2f
get

Definition at line 108 of file LocationType.cs.

◆ Sprite

Sprite Barotrauma.LocationType.Sprite
get

Definition at line 89 of file LocationType.cs.

◆ SpriteColor

Color Barotrauma.LocationType.SpriteColor
get

Definition at line 99 of file LocationType.cs.

◆ StoreInitialBalance

int Barotrauma.LocationType.StoreInitialBalance = 5000
get

Definition at line 109 of file LocationType.cs.

◆ StoreMaxReputationModifier

float Barotrauma.LocationType.StoreMaxReputationModifier = 0.1f
get

Definition at line 105 of file LocationType.cs.

◆ StorePriceModifierRange

int Barotrauma.LocationType.StorePriceModifierRange = 5
get

In percentages

Definition at line 113 of file LocationType.cs.

◆ StoreSellPriceModifier

float Barotrauma.LocationType.StoreSellPriceModifier = 0.3f
get

Definition at line 106 of file LocationType.cs.

◆ UsePortraitInRandomLoadingScreens

bool Barotrauma.LocationType.UsePortraitInRandomLoadingScreens
get

Definition at line 52 of file LocationType.cs.