Barotrauma Client
Loading...
Searching...
No Matches
Barotrauma.Map Class Reference

Classes

struct  LocationChangeInfo
 

Public Member Functions

IEnumerable< int > GetSelectedMissionIndices ()
 
 Map (CampaignSettings settings)
 
 Map (CampaignMode campaign, string seed)
 Generate a new campaign map from the seed.
 
Biome GetBiome (Vector2 mapPos)
 
Biome GetBiome (float xPos)
 
void MoveToNextLocation ()
 
void SetLocation (int index)
 
void SelectLocation (int index)
 
void SelectLocation (Location location)
 
void SelectMission (IEnumerable< int > missionIndices)
 
void SelectRandomLocation (bool preferUndiscovered)
 
void ProgressWorld (CampaignMode campaign, CampaignMode.TransitionType transitionType, float roundDuration)
 
void Discover (Location location, bool checkTalents=true)
 
void Visit (Location location)
 
void ClearLocationHistory ()
 
int? GetDiscoveryIndex (Location location)
 
int? GetVisitIndex (Location location, bool includeLocationsWithoutOutpost=false)
 
bool IsDiscovered (Location location)
 
bool IsVisited (Location location)
 
void LoadState (CampaignMode campaign, XElement element, bool showNotifications)
 Load the state of an existing map from xml (current state of locations, where the crew is now, etc).
 
void Save (XElement element)
 
void Remove ()
 

Static Public Member Functions

static bool LocationOrConnectionWithinDistance (Location startLocation, int maxDistance, Func< Location, bool > criteria, Func< LocationConnection, bool > connectionCriteria=null)
 
static int GetDistanceToClosestLocationOrConnection (Location startLocation, int maxDistance, Func< Location, bool > criteria, Func< LocationConnection, bool > connectionCriteria=null)
 Get the shortest distance from the start location to another location that satisfies the specified criteria.
 
static Map Load (CampaignMode campaign, XElement element)
 Load a previously saved map from an xml element.
 

Public Attributes

bool AllowDebugTeleport
 
Action< Location, LocationConnectionOnLocationSelected
 
Action< LocationConnection, IEnumerable< Mission > > OnMissionsSelected
 
readonly NamedEvent< LocationChangeInfoOnLocationChanged = new NamedEvent<LocationChangeInfo>()
 From -> To.
 
Radiation Radiation
 

Properties

int Width [get]
 
int Height [get]
 
IReadOnlyList< LocationEndLocations [get]
 
Location StartLocation [get]
 
Location CurrentLocation [get]
 
int CurrentLocationIndex [get]
 
Location SelectedLocation [get]
 
int SelectedLocationIndex [get]
 
LocationConnection SelectedConnection [get]
 
string Seed [get]
 
List< LocationLocations [get]
 
List< LocationConnectionConnections [get]
 

Constructor & Destructor Documentation

◆ Map() [1/2]

Barotrauma.Map.Map ( CampaignSettings settings)

◆ Map() [2/2]

Barotrauma.Map.Map ( CampaignMode campaign,
string seed )

Generate a new campaign map from the seed.

Member Function Documentation

◆ ClearLocationHistory()

void Barotrauma.Map.ClearLocationHistory ( )

◆ Discover()

void Barotrauma.Map.Discover ( Location location,
bool checkTalents = true )

◆ GetBiome() [1/2]

Biome Barotrauma.Map.GetBiome ( float xPos)

◆ GetBiome() [2/2]

Biome Barotrauma.Map.GetBiome ( Vector2 mapPos)

◆ GetDiscoveryIndex()

int? Barotrauma.Map.GetDiscoveryIndex ( Location location)

◆ GetDistanceToClosestLocationOrConnection()

static int Barotrauma.Map.GetDistanceToClosestLocationOrConnection ( Location startLocation,
int maxDistance,
Func< Location, bool > criteria,
Func< LocationConnection, bool > connectionCriteria = null )
static

Get the shortest distance from the start location to another location that satisfies the specified criteria.

Returns
The distance to a matching location, or int.MaxValue if none are found.

◆ GetSelectedMissionIndices()

IEnumerable< int > Barotrauma.Map.GetSelectedMissionIndices ( )

◆ GetVisitIndex()

int? Barotrauma.Map.GetVisitIndex ( Location location,
bool includeLocationsWithoutOutpost = false )

◆ IsDiscovered()

bool Barotrauma.Map.IsDiscovered ( Location location)

◆ IsVisited()

bool Barotrauma.Map.IsVisited ( Location location)

◆ Load()

static Map Barotrauma.Map.Load ( CampaignMode campaign,
XElement element )
static

Load a previously saved map from an xml element.

◆ LoadState()

void Barotrauma.Map.LoadState ( CampaignMode campaign,
XElement element,
bool showNotifications )

Load the state of an existing map from xml (current state of locations, where the crew is now, etc).

◆ LocationOrConnectionWithinDistance()

static bool Barotrauma.Map.LocationOrConnectionWithinDistance ( Location startLocation,
int maxDistance,
Func< Location, bool > criteria,
Func< LocationConnection, bool > connectionCriteria = null )
static

◆ MoveToNextLocation()

void Barotrauma.Map.MoveToNextLocation ( )

◆ ProgressWorld()

void Barotrauma.Map.ProgressWorld ( CampaignMode campaign,
CampaignMode.TransitionType transitionType,
float roundDuration )

◆ Remove()

void Barotrauma.Map.Remove ( )

◆ Save()

void Barotrauma.Map.Save ( XElement element)

◆ SelectLocation() [1/2]

void Barotrauma.Map.SelectLocation ( int index)

◆ SelectLocation() [2/2]

void Barotrauma.Map.SelectLocation ( Location location)

◆ SelectMission()

void Barotrauma.Map.SelectMission ( IEnumerable< int > missionIndices)

◆ SelectRandomLocation()

void Barotrauma.Map.SelectRandomLocation ( bool preferUndiscovered)

◆ SetLocation()

void Barotrauma.Map.SetLocation ( int index)

◆ Visit()

void Barotrauma.Map.Visit ( Location location)

Member Data Documentation

◆ AllowDebugTeleport

bool Barotrauma.Map.AllowDebugTeleport

◆ OnLocationChanged

readonly NamedEvent<LocationChangeInfo> Barotrauma.Map.OnLocationChanged = new NamedEvent<LocationChangeInfo>()

From -> To.

◆ OnLocationSelected

Action<Location, LocationConnection> Barotrauma.Map.OnLocationSelected

◆ OnMissionsSelected

Action<LocationConnection, IEnumerable<Mission> > Barotrauma.Map.OnMissionsSelected

◆ Radiation

Radiation Barotrauma.Map.Radiation

Property Documentation

◆ Connections

List<LocationConnection> Barotrauma.Map.Connections
get

◆ CurrentLocation

Location Barotrauma.Map.CurrentLocation
get

◆ CurrentLocationIndex

int Barotrauma.Map.CurrentLocationIndex
get

◆ EndLocations

IReadOnlyList<Location> Barotrauma.Map.EndLocations
get

◆ Height

int Barotrauma.Map.Height
get

◆ Locations

List<Location> Barotrauma.Map.Locations
get

◆ Seed

string Barotrauma.Map.Seed
get

◆ SelectedConnection

LocationConnection Barotrauma.Map.SelectedConnection
get

◆ SelectedLocation

Location Barotrauma.Map.SelectedLocation
get

◆ SelectedLocationIndex

int Barotrauma.Map.SelectedLocationIndex
get

◆ StartLocation

Location Barotrauma.Map.StartLocation
get

◆ Width

int Barotrauma.Map.Width
get

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