Barotrauma Server
Loading...
Searching...
No Matches
Barotrauma.Location Class Reference

Classes

class  AbilityLocation
 
class  StoreInfo
 
class  TakenItem
 

Public Member Functions

void SelectMission (Mission mission)
 
void DeselectMission (Mission mission)
 
List< int > GetSelectedMissionIndices ()
 
void SetSelectedMissionIndices (IEnumerable< int > missionIndices)
 
override string ToString ()
 
 Location (Vector2 mapPosition, int? zone, Random rand, bool requireOutpost=false, LocationType forceLocationType=null, IEnumerable< Location > existingLocations=null)
 
 Location (CampaignMode campaign, XElement element)
 Create a location from save data.
 
void LoadLocationTypeChange (XElement locationElement)
 
void LoadMissions (XElement locationElement)
 
void ChangeType (CampaignMode campaign, LocationType newType, bool createStores=true)
 
void TryAssignFactionBasedOnLocationType (CampaignMode campaign)
 
void UnlockInitialMissions (Rand.RandSync randSync=Rand.RandSync.ServerAndClient)
 
void UnlockMission (MissionPrefab missionPrefab, LocationConnection connection)
 
void UnlockMission (MissionPrefab missionPrefab)
 
Mission UnlockMissionByIdentifier (Identifier identifier, ContentPackage invokingContentPackage=null)
 
Mission UnlockMissionByTag (Identifier tag, Random random=null, ContentPackage invokingContentPackage=null)
 
void InstantiateLoadedMissions (Map map)
 
void ClearMissions ()
 Removes all unlocked missions from the location.
 
bool HasOutpost ()
 
bool IsCriticallyRadiated ()
 
LocationType GetLocationType ()
 
IEnumerable< MissionGetMissionsInConnection (LocationConnection connection)
 
void RemoveHireableCharacter (CharacterInfo character)
 
IEnumerable< CharacterInfoGetHireableCharacters ()
 
void ForceHireableCharacters (IEnumerable< CharacterInfo > hireableCharacters)
 
void ForceName (Identifier nameId)
 
void LoadStores (XElement locationElement)
 
bool IsRadiated ()
 
void RegisterTakenItems (IEnumerable< Item > items)
 Mark the items that have been taken from the outpost to prevent them from spawning when re-entering the outpost.
 
void RegisterKilledCharacters (IEnumerable< Character > characters)
 Mark the characters who have been killed to prevent them from spawning when re-entering the outpost.
 
void RemoveTakenItems ()
 
int GetAdjustedMechanicalCost (int cost)
 
int GetAdjustedHealCost (int cost)
 
StoreInfo GetStore (Identifier identifier)
 
void CreateStores (bool force=false)
 
Parameters
forceIf true, the stores will be recreated if they already exists.

 
void UpdateStores ()
 
void UpdateSpecials ()
 
void AddStock (Dictionary< Identifier, List< SoldItem > > items)
 
void RemoveStock (Dictionary< Identifier, List< PurchasedItem > > items)
 
bool CanHaveSubsForSale ()
 
int HighestSubmarineTierAvailable (SubmarineClass submarineClass=SubmarineClass.Undefined)
 
bool IsSubmarineAvailable (SubmarineInfo info)
 
void Reset (CampaignMode campaign)
 
XElement Save (Map map, XElement parentElement)
 
void Remove ()
 
void RemoveProjSpecific ()
 

Static Public Member Functions

static Location CreateRandom (Vector2 position, int? zone, Random rand, bool requireOutpost, LocationType forceLocationType=null, IEnumerable< Location > existingLocations=null)
 
static int GetExtraSpecialSalesCount ()
 

Public Attributes

readonly List< LocationConnectionConnections = new List<LocationConnection>()
 
readonly Dictionary< LocationTypeChange.Requirement, int > ProximityTimer = new Dictionary<LocationTypeChange.Requirement, int>()
 
LocationTypeChange typeChange
 
LocationTypeChange int delay
 
LocationTypeChange int MissionPrefab? parentMission PendingLocationTypeChange
 
int LocationTypeChangeCooldown
 
bool DisallowLocationTypeChanges
 
string LastTypeChangeMessage
 
int TimeSinceLastTypeChange
 
bool IsGateBetweenBiomes
 
HireManager HireManager
 

Properties

LocalizedString DisplayName [get]
 
Identifier NameIdentifier [get]
 
bool Discovered [get]
 
bool Visited [get]
 
bool LocationTypeChangesBlocked [get]
 Is some mission blocking this location from changing its type, or have location type changes been forcibly disabled on the location?
 
Biome Biome [get, set]
 
Vector2 MapPosition [get]
 
LocationType Type [get]
 
LocationType OriginalType [get]
 
LevelData LevelData [get, set]
 
int PortraitId [get]
 
Faction Faction [get, set]
 
Faction SecondaryFaction [get, set]
 
Reputation Reputation [get]
 
bool IsFactionHostile [get]
 
int TurnsInRadiation [get, set]
 
Dictionary< Identifier, StoreInfoStores [get, set]
 
int StoreInitialBalance [get]
 
int DailySpecialsCount [get]
 
int RequestedGoodsCount [get]
 
HashSet< Identifier > StoreIdentifiers = new HashSet<Identifier>() [get]
 
IEnumerable< TakenItemTakenItems [get]
 
IEnumerable< int > KilledCharacterIdentifiers [get]
 
IEnumerable< MissionAvailableMissions [get]
 
IEnumerable< MissionSelectedMissions [get]
 
float PriceMultiplier [get, set]
 
float MechanicalPriceMultiplier [get, set]
 

Constructor & Destructor Documentation

◆ Location() [1/2]

Barotrauma.Location.Location ( Vector2 mapPosition,
int? zone,
Random rand,
bool requireOutpost = false,
LocationType forceLocationType = null,
IEnumerable< Location > existingLocations = null )

◆ Location() [2/2]

Barotrauma.Location.Location ( CampaignMode campaign,
XElement element )

Create a location from save data.

Member Function Documentation

◆ AddStock()

void Barotrauma.Location.AddStock ( Dictionary< Identifier, List< SoldItem > > items)

◆ CanHaveSubsForSale()

bool Barotrauma.Location.CanHaveSubsForSale ( )

◆ ChangeType()

void Barotrauma.Location.ChangeType ( CampaignMode campaign,
LocationType newType,
bool createStores = true )

◆ ClearMissions()

void Barotrauma.Location.ClearMissions ( )

Removes all unlocked missions from the location.

◆ CreateRandom()

static Location Barotrauma.Location.CreateRandom ( Vector2 position,
int? zone,
Random rand,
bool requireOutpost,
LocationType forceLocationType = null,
IEnumerable< Location > existingLocations = null )
static

◆ CreateStores()

void Barotrauma.Location.CreateStores ( bool force = false)

Parameters
forceIf true, the stores will be recreated if they already exists.

◆ DeselectMission()

void Barotrauma.Location.DeselectMission ( Mission mission)

◆ ForceHireableCharacters()

void Barotrauma.Location.ForceHireableCharacters ( IEnumerable< CharacterInfo > hireableCharacters)

◆ ForceName()

void Barotrauma.Location.ForceName ( Identifier nameId)

◆ GetAdjustedHealCost()

int Barotrauma.Location.GetAdjustedHealCost ( int cost)

◆ GetAdjustedMechanicalCost()

int Barotrauma.Location.GetAdjustedMechanicalCost ( int cost)

◆ GetExtraSpecialSalesCount()

static int Barotrauma.Location.GetExtraSpecialSalesCount ( )
static

◆ GetHireableCharacters()

IEnumerable< CharacterInfo > Barotrauma.Location.GetHireableCharacters ( )

◆ GetLocationType()

LocationType Barotrauma.Location.GetLocationType ( )

◆ GetMissionsInConnection()

IEnumerable< Mission > Barotrauma.Location.GetMissionsInConnection ( LocationConnection connection)

◆ GetSelectedMissionIndices()

List< int > Barotrauma.Location.GetSelectedMissionIndices ( )

◆ GetStore()

StoreInfo Barotrauma.Location.GetStore ( Identifier identifier)

◆ HasOutpost()

bool Barotrauma.Location.HasOutpost ( )

◆ HighestSubmarineTierAvailable()

int Barotrauma.Location.HighestSubmarineTierAvailable ( SubmarineClass submarineClass = SubmarineClass::Undefined)

◆ InstantiateLoadedMissions()

void Barotrauma.Location.InstantiateLoadedMissions ( Map map)

◆ IsCriticallyRadiated()

bool Barotrauma.Location.IsCriticallyRadiated ( )

◆ IsRadiated()

bool Barotrauma.Location.IsRadiated ( )

◆ IsSubmarineAvailable()

bool Barotrauma.Location.IsSubmarineAvailable ( SubmarineInfo info)

◆ LoadLocationTypeChange()

void Barotrauma.Location.LoadLocationTypeChange ( XElement locationElement)

◆ LoadMissions()

void Barotrauma.Location.LoadMissions ( XElement locationElement)

◆ LoadStores()

void Barotrauma.Location.LoadStores ( XElement locationElement)

◆ RegisterKilledCharacters()

void Barotrauma.Location.RegisterKilledCharacters ( IEnumerable< Character > characters)

Mark the characters who have been killed to prevent them from spawning when re-entering the outpost.

◆ RegisterTakenItems()

void Barotrauma.Location.RegisterTakenItems ( IEnumerable< Item > items)

Mark the items that have been taken from the outpost to prevent them from spawning when re-entering the outpost.

◆ Remove()

void Barotrauma.Location.Remove ( )

◆ RemoveHireableCharacter()

void Barotrauma.Location.RemoveHireableCharacter ( CharacterInfo character)

◆ RemoveProjSpecific()

void Barotrauma.Location.RemoveProjSpecific ( )

◆ RemoveStock()

void Barotrauma.Location.RemoveStock ( Dictionary< Identifier, List< PurchasedItem > > items)

◆ RemoveTakenItems()

void Barotrauma.Location.RemoveTakenItems ( )

◆ Reset()

void Barotrauma.Location.Reset ( CampaignMode campaign)

◆ Save()

XElement Barotrauma.Location.Save ( Map map,
XElement parentElement )

◆ SelectMission()

void Barotrauma.Location.SelectMission ( Mission mission)

◆ SetSelectedMissionIndices()

void Barotrauma.Location.SetSelectedMissionIndices ( IEnumerable< int > missionIndices)

◆ ToString()

override string Barotrauma.Location.ToString ( )

◆ TryAssignFactionBasedOnLocationType()

void Barotrauma.Location.TryAssignFactionBasedOnLocationType ( CampaignMode campaign)

◆ UnlockInitialMissions()

void Barotrauma.Location.UnlockInitialMissions ( Rand.RandSync randSync = Rand::RandSync::ServerAndClient)

◆ UnlockMission() [1/2]

void Barotrauma.Location.UnlockMission ( MissionPrefab missionPrefab)

◆ UnlockMission() [2/2]

void Barotrauma.Location.UnlockMission ( MissionPrefab missionPrefab,
LocationConnection connection )

◆ UnlockMissionByIdentifier()

Mission Barotrauma.Location.UnlockMissionByIdentifier ( Identifier identifier,
ContentPackage invokingContentPackage = null )

◆ UnlockMissionByTag()

Mission Barotrauma.Location.UnlockMissionByTag ( Identifier tag,
Random random = null,
ContentPackage invokingContentPackage = null )

◆ UpdateSpecials()

void Barotrauma.Location.UpdateSpecials ( )

◆ UpdateStores()

void Barotrauma.Location.UpdateStores ( )

Member Data Documentation

◆ Connections

readonly List<LocationConnection> Barotrauma.Location.Connections = new List<LocationConnection>()

◆ delay

LocationTypeChange int Barotrauma.Location.delay

◆ DisallowLocationTypeChanges

bool Barotrauma.Location.DisallowLocationTypeChanges

◆ HireManager

HireManager Barotrauma.Location.HireManager

◆ IsGateBetweenBiomes

bool Barotrauma.Location.IsGateBetweenBiomes

◆ LastTypeChangeMessage

string Barotrauma.Location.LastTypeChangeMessage

◆ LocationTypeChangeCooldown

int Barotrauma.Location.LocationTypeChangeCooldown

◆ PendingLocationTypeChange

LocationTypeChange int MissionPrefab? parentMission Barotrauma.Location.PendingLocationTypeChange

◆ ProximityTimer

readonly Dictionary<LocationTypeChange.Requirement, int> Barotrauma.Location.ProximityTimer = new Dictionary<LocationTypeChange.Requirement, int>()

◆ TimeSinceLastTypeChange

int Barotrauma.Location.TimeSinceLastTypeChange

◆ typeChange

LocationTypeChange Barotrauma.Location.typeChange

Property Documentation

◆ AvailableMissions

IEnumerable<Mission> Barotrauma.Location.AvailableMissions
get

◆ Biome

Biome Barotrauma.Location.Biome
getset

◆ DailySpecialsCount

int Barotrauma.Location.DailySpecialsCount
get

◆ Discovered

bool Barotrauma.Location.Discovered
get

◆ DisplayName

LocalizedString Barotrauma.Location.DisplayName
get

◆ Faction

Faction Barotrauma.Location.Faction
getset

◆ IsFactionHostile

bool Barotrauma.Location.IsFactionHostile
get

◆ KilledCharacterIdentifiers

IEnumerable<int> Barotrauma.Location.KilledCharacterIdentifiers
get

◆ LevelData

LevelData Barotrauma.Location.LevelData
getset

◆ LocationTypeChangesBlocked

bool Barotrauma.Location.LocationTypeChangesBlocked
get

Is some mission blocking this location from changing its type, or have location type changes been forcibly disabled on the location?

◆ MapPosition

Vector2 Barotrauma.Location.MapPosition
get

◆ MechanicalPriceMultiplier

float Barotrauma.Location.MechanicalPriceMultiplier
getset

◆ NameIdentifier

Identifier Barotrauma.Location.NameIdentifier
get

◆ OriginalType

LocationType Barotrauma.Location.OriginalType
get

◆ PortraitId

int Barotrauma.Location.PortraitId
get

◆ PriceMultiplier

float Barotrauma.Location.PriceMultiplier
getset

◆ Reputation

Reputation Barotrauma.Location.Reputation
get

◆ RequestedGoodsCount

int Barotrauma.Location.RequestedGoodsCount
get

◆ SecondaryFaction

Faction Barotrauma.Location.SecondaryFaction
getset

◆ SelectedMissions

IEnumerable<Mission> Barotrauma.Location.SelectedMissions
get

◆ StoreIdentifiers

HashSet<Identifier> Barotrauma.Location.StoreIdentifiers = new HashSet<Identifier>()
get

◆ StoreInitialBalance

int Barotrauma.Location.StoreInitialBalance
get

◆ Stores

Dictionary<Identifier, StoreInfo> Barotrauma.Location.Stores
getset

◆ TakenItems

IEnumerable<TakenItem> Barotrauma.Location.TakenItems
get

◆ TurnsInRadiation

int Barotrauma.Location.TurnsInRadiation
getset

◆ Type

LocationType Barotrauma.Location.Type
get

◆ Visited

bool Barotrauma.Location.Visited
get

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