Barotrauma Client
|
Classes | |
class | AbyssIsland |
class | Cave |
struct | ClusterLocation |
struct | InterestingPosition |
struct | PathPoint |
class | Tunnel |
Public Types | |
enum | PlacementType { Top , Bottom } |
enum | EventType { SingleDestructibleWall , GlobalDestructibleWall } |
enum | PositionType { None = 0 , MainPath = 0x1 , SidePath = 0x2 , Cave = 0x4 , Ruin = 0x8 , Wreck = 0x10 , BeaconStation = 0x20 , Abyss = 0x40 , AbyssCave = 0x80 , Outpost = 0x100 } |
enum | TunnelType { MainPath , SidePath , Cave } |
enum | LevelGenStage { LevelGenParams , Size , GenStart , TunnelGen1 , TunnelGen2 , AbyssGen , CaveGen , VoronoiGen , VoronoiGen2 , VoronoiGen3 , Ruins , Outposts , FloatingIce , LevelBodies , IceSpires , TopAndBottom , PlaceLevelObjects , GenerateItems , Finish } |
Random integers generated during the level generation. If these values differ between clients/server, it means the levels aren't identical for some reason and there will most likely be major ID mismatches. More... | |
Public Member Functions | |||
bool | IsAllowedDifficulty (float minDifficulty, float maxDifficulty) | ||
Inclusive (matching the min an max values is accepted). | |||
bool | ShouldSpawnCrewInsideOutpost () | ||
List< VoronoiCell > | GetTooCloseCells (Vector2 position, float minDistance) | ||
List< Item > | GenerateMissionResources (ItemPrefab prefab, int requiredAmount, PositionType positionType, IEnumerable< Cave > targetCaves=null) | ||
| |||
Vector2 | GetRandomItemPos (PositionType spawnPosType, float randomSpread, float minDistFromSubs, float offsetFromWall=10.0f, Func< InterestingPosition, bool > filter=null) | ||
bool | TryGetInterestingPositionAwayFromPoint (bool useSyncedRand, PositionType positionType, float minDistFromSubs, out InterestingPosition position, Vector2 awayPoint, float minDistFromPoint, Func< InterestingPosition, bool > filter=null) | ||
bool | TryGetInterestingPosition (bool useSyncedRand, PositionType positionType, float minDistFromSubs, out InterestingPosition position, Func< InterestingPosition, bool > filter=null, bool suppressWarning=false) | ||
bool | TryGetInterestingPosition (bool useSyncedRand, PositionType positionType, float minDistFromSubs, out InterestingPosition position, Vector2 awayPoint, float minDistFromPoint=0f, Func< InterestingPosition, bool > filter=null, bool suppressWarning=false) | ||
bool | IsPositionInsideWall (Vector2 worldPosition) | ||
void | Update (float deltaTime, Camera cam) | ||
Vector2 | GetBottomPosition (float xPosition) | ||
List< VoronoiCell > | GetAllCells () | ||
List< VoronoiCell > | GetCells (Vector2 worldPos, int searchDepth=2) | ||
VoronoiCell | GetClosestCell (Vector2 worldPos) | ||
bool | IsCloseToStart (Vector2 position, float minDist) | ||
bool | IsCloseToEnd (Vector2 position, float minDist) | ||
bool | IsCloseToStart (Point position, float minDist) | ||
bool | IsCloseToEnd (Point position, float minDist) | ||
void | PrepareBeaconStation () | ||
void | DisconnectBeaconStationWires (float disconnectWireProbability) | ||
void | DamageBeaconStationDevices (float breakDeviceProbability) | ||
void | DamageBeaconStationWalls (float damageWallProbability) | ||
bool | CheckBeaconActive () | ||
void | SpawnCorpses () | ||
void | SpawnNPCs () | ||
float | GetRealWorldDepth (float worldPositionY) | ||
Calculate the "real" depth in meters from the surface of Europa (the value you see on the nav terminal) | |||
void | DebugSetStartLocation (Location newStartLocation) | ||
void | DebugSetEndLocation (Location newEndLocation) | ||
override void | Remove () | ||
![]() | |||
Entity (Submarine submarine, ushort id) | |||
void | FreeID () | ||
Removes the entity from the entity dictionary and frees up the ID it was using. | |||
Static Public Member Functions | |
static Level | Generate (LevelData levelData, bool mirror, Location startLocation, Location endLocation, SubmarineInfo startOutpost=null, SubmarineInfo endOutpost=null) |
![]() | |
static IReadOnlyCollection< Entity > | GetEntities () |
static int | FindFreeIdBlock (int minBlockSize) |
Finds a contiguous block of free IDs of at least the given size. | |
static Entity | FindEntityByID (ushort ID) |
Find an entity based on the ID. | |
static void | RemoveAll () |
static void | DumpIds (int count, string filename) |
Public Attributes | |
List< AbyssIsland > | AbyssIslands = new List<AbyssIsland>() |
List< double > | siteCoordsX |
List< double > | siteCoordsY |
List<(Point point, double distance)> | distanceField |
readonly LevelData | LevelData |
![]() | |
readonly ushort | ID |
Unique, but non-persistent identifier. Stays the same if the entities are created in the exactly same order, but doesn't persist e.g. between the rounds. | |
readonly string | CreationStackTrace |
readonly UInt64 | CreationIndex |
Static Public Attributes | |
const int | MaxEntityDepth = -1000000 |
const float | ShaftHeight = 1000.0f |
const float | OutsideBoundsCurrentMargin = 30000.0f |
How far outside the boundaries of the level the water current that pushes subs towards the level starts. | |
const float | OutsideBoundsCurrentMarginExponential = 150000.0f |
How far outside the boundaries of the level the strength of the current starts to increase exponentially. | |
const float | OutsideBoundsCurrentHardLimit = 200000.0f |
How far outside the boundaries of the level the current stops submarines entirely. | |
const int | MaxSubmarineWidth = 16000 |
The level generator won't try to adjust the width of the main path above this limit. | |
const float | ExitDistance = 6000.0f |
const int | GridCellSize = 2000 |
const float | DefaultRealWorldCrushDepth = 3500.0f |
static ? float | ForcedDifficulty |
![]() | |
const ushort | NullEntityID = 0 |
const ushort | EntitySpawnerID = ushort.MaxValue |
const ushort | RespawnManagerID = ushort.MaxValue - 1 |
const ushort | DummyID = ushort.MaxValue - 2 |
const ushort | ReservedIDStart = ushort.MaxValue - 3 |
const ushort | MaxEntityCount = ushort.MaxValue - 4 |
static EntitySpawner | Spawner |
Properties | |
static Level | Loaded [get] |
Rectangle | AbyssArea [get] |
int | AbyssStart [get] |
int | AbyssEnd [get] |
Vector2 | StartPosition [get] |
Vector2 | StartExitPosition [get] |
Point | Size [get] |
Vector2 | EndPosition [get] |
Vector2 | EndExitPosition [get] |
int | BottomPos [get] |
int | SeaFloorTopPos [get] |
float | CrushDepth [get] |
The crush depth of a non-upgraded submarine in in-game coordinates. Note that this can be above the top of the level! | |
float | RealWorldCrushDepth [get] |
The crush depth of a non-upgraded submarine in "real world units" (meters from the surface of Europa). Note that this can be above the top of the level! | |
LevelWall | SeaFloor [get] |
List< Ruin > | Ruins [get] |
List< Submarine > | Wrecks [get] |
Submarine | BeaconStation [get] |
List< LevelWall > | ExtraWalls [get] |
List< LevelWall > | UnsyncedExtraWalls [get] |
List< Tunnel > | Tunnels = new List<Tunnel>() [get] |
List< Cave > | Caves = new List<Cave>() [get] |
List< InterestingPosition > | PositionsOfInterest [get] |
Submarine | StartOutpost [get] |
Submarine | EndOutpost [get] |
IReadOnlyDictionary< LevelGenStage, int > | EqualityCheckValues [get] |
List< Entity > | EntitiesBeforeGenerate = new List<Entity>() [get] |
int | EntityCountBeforeGenerate [get] |
int | EntityCountAfterGenerate [get] |
Body | TopBarrier [get] |
Body | BottomBarrier [get] |
LevelObjectManager | LevelObjectManager [get] |
bool | Generating [get] |
Location | StartLocation [get] |
Location | EndLocation [get] |
bool | Mirrored [get] |
string | Seed [get] |
float | Difficulty [get] |
LevelData.LevelType | Type [get] |
bool | IsEndBiome [get] |
static bool | IsLoadedOutpost [get] |
Is there a loaded level set and is it an outpost? | |
static bool | IsLoadedFriendlyOutpost [get] |
Is there a loaded level set, and is it a friendly outpost (FriendlyNPC or Team1). Does not take reputation into account. | |
LevelGenerationParams | GenerationParams [get] |
Color | BackgroundTextureColor [get] |
Color | BackgroundColor [get] |
Color | WallColor [get] |
List< PathPoint > | PathPoints = new List<PathPoint>() [get] |
List< ClusterLocation > | AbyssResources = new List<ClusterLocation>() [get] |
![]() | |
static int | EntityCount [get] |
bool | Removed [get] |
bool | IdFreed [get] |
virtual Vector2 | SimPosition [get] |
virtual Vector2 | Position [get] |
virtual Vector2 | WorldPosition [get] |
virtual Vector2 | DrawPosition [get] |
Submarine | Submarine [get, set] |
AITarget | AiTarget [get] |
bool | InDetectable [get, set] |
Indetectable characters can't be spotted by AIs and aren't visible on the sonar or health scanner. | |
double | SpawnTime [get] |
string | ErrorLine [get] |
![]() |
Additional Inherited Members | |
![]() | |
virtual ushort | DetermineID (ushort id, Submarine submarine) |
![]() | |
AITarget | aiTarget |
Random integers generated during the level generation. If these values differ between clients/server, it means the levels aren't identical for some reason and there will most likely be major ID mismatches.
bool Barotrauma.Level.CheckBeaconActive | ( | ) |
void Barotrauma.Level.DamageBeaconStationDevices | ( | float | breakDeviceProbability | ) |
void Barotrauma.Level.DamageBeaconStationWalls | ( | float | damageWallProbability | ) |
void Barotrauma.Level.DebugSetEndLocation | ( | Location | newEndLocation | ) |
void Barotrauma.Level.DebugSetStartLocation | ( | Location | newStartLocation | ) |
void Barotrauma.Level.DisconnectBeaconStationWires | ( | float | disconnectWireProbability | ) |
|
static |
List< Item > Barotrauma.Level.GenerateMissionResources | ( | ItemPrefab | prefab, |
int | requiredAmount, | ||
PositionType | positionType, | ||
IEnumerable< Cave > | targetCaves = null ) |
rotation | Used by clients to set the rotation for the resources |
List< VoronoiCell > Barotrauma.Level.GetAllCells | ( | ) |
Vector2 Barotrauma.Level.GetBottomPosition | ( | float | xPosition | ) |
List< VoronoiCell > Barotrauma.Level.GetCells | ( | Vector2 | worldPos, |
int | searchDepth = 2 ) |
VoronoiCell Barotrauma.Level.GetClosestCell | ( | Vector2 | worldPos | ) |
Vector2 Barotrauma.Level.GetRandomItemPos | ( | PositionType | spawnPosType, |
float | randomSpread, | ||
float | minDistFromSubs, | ||
float | offsetFromWall = 10::0f, | ||
Func< InterestingPosition, bool > | filter = null ) |
float Barotrauma.Level.GetRealWorldDepth | ( | float | worldPositionY | ) |
Calculate the "real" depth in meters from the surface of Europa (the value you see on the nav terminal)
List< VoronoiCell > Barotrauma.Level.GetTooCloseCells | ( | Vector2 | position, |
float | minDistance ) |
bool Barotrauma.Level.IsAllowedDifficulty | ( | float | minDifficulty, |
float | maxDifficulty ) |
Inclusive (matching the min an max values is accepted).
bool Barotrauma.Level.IsCloseToEnd | ( | Point | position, |
float | minDist ) |
bool Barotrauma.Level.IsCloseToEnd | ( | Vector2 | position, |
float | minDist ) |
bool Barotrauma.Level.IsCloseToStart | ( | Point | position, |
float | minDist ) |
bool Barotrauma.Level.IsCloseToStart | ( | Vector2 | position, |
float | minDist ) |
bool Barotrauma.Level.IsPositionInsideWall | ( | Vector2 | worldPosition | ) |
void Barotrauma.Level.PrepareBeaconStation | ( | ) |
|
virtual |
Reimplemented from Barotrauma.Entity.
bool Barotrauma.Level.ShouldSpawnCrewInsideOutpost | ( | ) |
void Barotrauma.Level.SpawnCorpses | ( | ) |
void Barotrauma.Level.SpawnNPCs | ( | ) |
bool Barotrauma.Level.TryGetInterestingPosition | ( | bool | useSyncedRand, |
PositionType | positionType, | ||
float | minDistFromSubs, | ||
out InterestingPosition | position, | ||
Func< InterestingPosition, bool > | filter = null, | ||
bool | suppressWarning = false ) |
bool Barotrauma.Level.TryGetInterestingPosition | ( | bool | useSyncedRand, |
PositionType | positionType, | ||
float | minDistFromSubs, | ||
out InterestingPosition | position, | ||
Vector2 | awayPoint, | ||
float | minDistFromPoint = 0f, | ||
Func< InterestingPosition, bool > | filter = null, | ||
bool | suppressWarning = false ) |
bool Barotrauma.Level.TryGetInterestingPositionAwayFromPoint | ( | bool | useSyncedRand, |
PositionType | positionType, | ||
float | minDistFromSubs, | ||
out InterestingPosition | position, | ||
Vector2 | awayPoint, | ||
float | minDistFromPoint, | ||
Func< InterestingPosition, bool > | filter = null ) |
void Barotrauma.Level.Update | ( | float | deltaTime, |
Camera | cam ) |
List<AbyssIsland> Barotrauma.Level.AbyssIslands = new List<AbyssIsland>() |
|
static |
List<(Point point, double distance)> Barotrauma.Level.distanceField |
|
static |
|
static |
|
static |
readonly LevelData Barotrauma.Level.LevelData |
|
static |
|
static |
The level generator won't try to adjust the width of the main path above this limit.
|
static |
How far outside the boundaries of the level the current stops submarines entirely.
|
static |
How far outside the boundaries of the level the water current that pushes subs towards the level starts.
|
static |
How far outside the boundaries of the level the strength of the current starts to increase exponentially.
|
static |
List<double> Barotrauma.Level.siteCoordsX |
List<double> Barotrauma.Level.siteCoordsY |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
The crush depth of a non-upgraded submarine in in-game coordinates. Note that this can be above the top of the level!
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
staticget |
Is there a loaded level set, and is it a friendly outpost (FriendlyNPC or Team1). Does not take reputation into account.
|
staticget |
Is there a loaded level set and is it an outpost?
|
get |
|
staticget |
|
get |
|
get |
|
get |
The crush depth of a non-upgraded submarine in "real world units" (meters from the surface of Europa). Note that this can be above the top of the level!
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |