Barotrauma Client Doc
Barotrauma.Hull Class Reference
Inheritance diagram for Barotrauma.Hull:
Barotrauma.MapEntity Barotrauma.ISerializableEntity Barotrauma.Networking.IServerSerializable Barotrauma.MapEntity Barotrauma.ISerializableEntity Barotrauma.Networking.IServerSerializable Barotrauma.Networking.IClientSerializable Barotrauma.Networking.INetSerializable Barotrauma.Networking.INetSerializable Barotrauma.Entity Barotrauma.ISpatialEntity Barotrauma.Entity Barotrauma.Networking.INetSerializable Barotrauma.Entity Barotrauma.ISpatialEntity Barotrauma.Entity

Classes

struct  BallastFloraEventData
 
interface  IEventData
 
struct  NetworkFireSource
 

Public Types

enum class  EventType {
  Status = 0 , Decal = 1 , BackgroundSections = 2 , BallastFlora = 3 ,
  MinValue = 0 , MaxValue = 3
}
 

Public Member Functions

 Hull (Rectangle rectangle)
 
 Hull (Rectangle rectangle, Submarine submarine, ushort id=Entity.NullEntityID)
 
override MapEntity Clone ()
 
void SetModuleTags (IEnumerable< Identifier > tags)
 
override void OnMapLoaded ()
 
void AddToGrid (Submarine submarine)
 
int GetWaveIndex (Vector2 position)
 
int GetWaveIndex (float xPos)
 
override void Move (Vector2 amount, bool ignoreContacts=true)
 
override void ShallowRemove ()
 Remove the entity from the entity list without removing links to other entities More...
 
override void Remove ()
 
void AddFireSource (FireSource fireSource)
 
Decal AddDecal (UInt32 decalId, Vector2 worldPosition, float scale, bool isNetworkEvent, int? spriteIndex=null)
 
Decal AddDecal (string decalName, Vector2 worldPosition, float scale, bool isNetworkEvent, int? spriteIndex=null)
 
override void Update (float deltaTime, Camera cam)
 
void ApplyFlowForces (float deltaTime, Item item)
 
void Extinguish (float deltaTime, float amount, Vector2 position, bool extinguishRealFires=true, bool extinguishFakeFires=true)
 
void RemoveFire (FireSource fire)
 
IEnumerable< HullGetConnectedHulls (bool includingThis, int? searchDepth=null, bool ignoreClosedGaps=false)
 
float GetApproximateDistance (Vector2 startPos, Vector2 endPos, Hull targetHull, float maxDistance, float distanceMultiplierPerClosedDoor=0)
 Approximate distance from this hull to the target hull, moving through open gaps without passing through walls. Uses a greedy algo and may not use the most optimal path. Returns float.MaxValue if no path is found. More...
 
string CreateRoomName ()
 
bool LeadsOutside (Character character)
 Does this hull have any doors leading outside? More...
 
BackgroundSection GetBackgroundSection (Vector2 worldPosition)
 
IEnumerable< BackgroundSectionGetBackgroundSectionsViaContaining (Rectangle rectArea)
 
bool DoesSectionMatch (int index, int row)
 
void IncreaseSectionColorOrStrength (BackgroundSection section, Color? color, float? strength, bool requiresUpdate, bool isCleaning)
 
void SetSectionColorOrStrength (BackgroundSection section, Color? color, float? strength)
 
void CleanSection (BackgroundSection section, float cleanVal, bool updateRequired)
 
override XElement Save (XElement parentElement)
 
override string ToString ()
 
override bool IsVisible (Rectangle worldView)
 
override bool IsMouseOn (Vector2 position)
 
override void UpdateEditing (Camera cam, float deltaTime)
 
override void Draw (SpriteBatch spriteBatch, bool editing, bool back=true)
 
void DrawSectionColors (SpriteBatch spriteBatch)
 
void ClientEventWrite (IWriteMessage msg, NetEntityEvent.IData extraData=null)
 
void ClientEventRead (IReadMessage msg, float sendingTime)
 
- Public Member Functions inherited from Barotrauma.MapEntity
void AddLinked (MapEntity entity)
 
 MapEntity (MapEntityPrefab prefab, Submarine submarine, ushort id)
 
void ResolveLinks (IdRemap childRemap)
 
bool HasUpgrade (Identifier identifier)
 
Upgrade GetUpgrade (Identifier identifier)
 
List< Upgrade > GetUpgrades ()
 
void SetUpgrade (Upgrade upgrade, bool createNetworkEvent=false)
 
virtual bool AddUpgrade (Upgrade upgrade, bool createNetworkEvent=false)
 Adds a new upgrade to the item More...
 
override void Remove ()
 
virtual void FlipX (bool relativeToSub)
 Flip the entity horizontally More...
 
virtual void FlipY (bool relativeToSub)
 Flip the entity vertically More...
 
virtual Quad2D GetTransformedQuad ()
 
void RemoveLinked (MapEntity e)
 
HashSet< T > GetLinkedEntities< T > (HashSet< T > list=null, int? maxDepth=null, Func< T, bool > filter=null)
 Gets all linked entities of specific type. More...
 
float GetDrawDepth (float baseDepth, Sprite sprite)
 A method that modifies the draw depth to prevent z-fighting between entities with the same sprite depth More...
 
MapEntity GetReplacementOrThis ()
 
virtual void AddToGUIUpdateList (int order=0)
 
virtual void DrawEditing (SpriteBatch spriteBatch, Camera cam)
 
- Public Member Functions inherited from Barotrauma.Entity
 Entity (Submarine submarine, ushort id)
 
void FreeID ()
 Removes the entity from the entity dictionary and frees up the ID it was using. More...
 

Static Public Member Functions

static Rectangle GetBorders ()
 
static EntityGrid GenerateEntityGrid (Rectangle worldRect)
 
static EntityGrid GenerateEntityGrid (Submarine submarine)
 
static Hull FindHull (Vector2 position, Hull guess=null, bool useWorldCoordinates=true, bool inclusive=true)
 Returns the hull which contains the point (or null if it isn't inside any) More...
 
static Hull FindHullUnoptimized (Vector2 position, Hull guess=null, bool useWorldCoordinates=true, bool inclusive=true)
 Returns the hull which contains the point (or null if it isn't inside any). The difference to FindHull is that this method goes through all hulls without trying to first find the sub the point is inside and checking the hulls in that sub. = This is slower, use with caution in situations where the sub's extents or hulls may have changed after it was loaded. More...
 
static void DetectItemVisibility (Character c=null)
 
static Hull GetCleanTarget (Vector2 worldPosition)
 
static Hull Load (ContentXElement element, Submarine submarine, IdRemap idRemap)
 
static void UpdateCheats (float deltaTime, Camera cam)
 
static void UpdateVertices (Camera cam, WaterRenderer renderer)
 
- Static Public Member Functions inherited from Barotrauma.MapEntity
static void ClearHighlightedEntities ()
 
static List< MapEntityClone (List< MapEntity > entitiesToClone)
 
static void UpdateAll (float deltaTime, Camera cam)
 Call Update() on every object in Entity.list More...
 
static List< MapEntityLoadAll (Submarine submarine, XElement parentElement, string filePath, int idOffset)
 
static void MapLoaded (List< MapEntity > entities, bool updateHulls)
 
static void InitializeLoadedLinks (IEnumerable< MapEntity > entities)
 
static void UpdateSelecting (Camera cam)
 Update the selection logic in submarine editor More...
 
static void StopSelection ()
 
static Vector2 GetNudgeAmount (bool doHold=true)
 
static Item GetPotentialContainer (Vector2 position, HashSet< MapEntity > entities=null)
 
static void UpdateHighlighting (List< MapEntity > highlightedEntities, bool wiringMode=false)
 Updates the logic that runs the highlight box when the mouse is sitting still. More...
 
static void AddSelection (MapEntity entity)
 
static void RemoveSelection (MapEntity entity)
 
static void DrawSelecting (SpriteBatch spriteBatch, Camera cam)
 Draw the "selection rectangle" and outlines of entities that are being dragged (if any) More...
 
static void DrawSelectionRect (SpriteBatch spriteBatch, Vector2 pos, Vector2 size, Color color)
 
static void UpdateEditor (Camera cam, float deltaTime)
 
static void DrawEditor (SpriteBatch spriteBatch, Camera cam)
 
static void DeselectAll ()
 
static void SelectEntity (MapEntity entity)
 
static void Copy (List< MapEntity > entities)
 Copy the selected entities to the "clipboard" (copiedList) More...
 
static void Cut (List< MapEntity > entities)
 
static void Paste (Vector2 position)
 
static List< MapEntityCopyEntities (List< MapEntity > entities)
 copies a list of entities to the "clipboard" (copiedList) More...
 
static HashSet< MapEntityFindSelectedEntities (Vector2 pos, Vector2 size)
 Find entities whose rect intersects with the "selection rect" More...
 
- Static Public Member Functions inherited from Barotrauma.Entity
static IReadOnlyCollection< EntityGetEntities ()
 
static int FindFreeIdBlock (int minBlockSize)
 Finds a contiguous block of free IDs of at least the given size More...
 
static Entity FindEntityByID (ushort ID)
 Find an entity based on the ID More...
 
static void RemoveAll ()
 
static void DumpIds (int count, string filename)
 

Public Attributes

readonly Dictionary< Identifier, SerializablePropertyproperties
 
bool Visible = true
 
readonly List< GapConnectedGaps = new List<Gap>()
 
Color? OriginalAmbientLight = null
 
int xBackgroundMax
 
- Public Attributes inherited from Barotrauma.MapEntity
readonly MapEntityPrefab Prefab
 
List< ushort > unresolvedLinkedToID
 
readonly HashSet< IdentifierDisallowedUpgradeSet = new HashSet<Identifier>()
 
readonly List< MapEntitylinkedTo = new List<MapEntity>()
 
bool ShouldBeSaved = true
 
int OriginalModuleIndex = -1
 The index of the outpost module this entity originally spawned in (-1 if not an outpost item) More...
 
int OriginalContainerIndex = -1
 
MapEntity ReplacedBy
 Used for undo/redo to determine what this item has been replaced with More...
 
- Public Attributes inherited from Barotrauma.Entity
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. More...
 
readonly string CreationStackTrace
 
readonly UInt64 CreationIndex
 

Static Public Attributes

static readonly List< HullHullList = new List<Hull>()
 
static readonly List< EntityGridEntityGrids = new List<EntityGrid>()
 
static bool ShowHulls = true
 
static bool EditWater
 
const float OxygenDistributionSpeed = 30000.0f
 
const float OxygenDeteriorationSpeed = 0.3f
 
const float OxygenConsumptionSpeed = 700.0f
 
const int WaveWidth = 32
 
static float WaveStiffness = 0.01f
 
static float WaveSpread = 0.02f
 
static float WaveDampening = 0.02f
 
const float MaxCompress = 1.05f
 
const int BackgroundSectionSize = 16
 
const int BackgroundSectionsPerNetworkEvent = 16
 
const float PressureBuildUpSpeed = 15.0f
 How fast the pressure in the hull builds up when there's a gap leading outside More...
 
const float PressureDropSpeed = 10.0f
 How fast the pressure in the hull goes back to normal when it's no longer full of water More...
 
const int MaxDecalsPerHull = 10
 
- Static Public Attributes inherited from Barotrauma.MapEntity
static readonly List< MapEntityMapEntityList = new List<MapEntity>()
 
static int MapEntityUpdateInterval = 1
 
static int PoweredUpdateInterval = 1
 
static bool SelectionChanged
 
static List< MapEntityCopiedList = new List<MapEntity>()
 
- Static Public Attributes inherited from Barotrauma.Entity
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

Dictionary< Identifier, SerializablePropertySerializableProperties [get]
 
override string Name [get]
 
LocalizedString DisplayName [get]
 
IEnumerable< IdentifierOutpostModuleTags [get]
 Inherited flags from outpost generation. More...
 
string RoomName [get, set]
 
Color AmbientLight [get, set]
 
override Rectangle Rect [get, set]
 
override bool Linkable [get]
 
float LethalPressure [get, set]
 
Vector2 Size [get]
 
float CeilingHeight [get]
 
float Surface [get]
 
float? WorldSurface [get]
 
float WaterVolume [get, set]
 
float Oxygen [get, set]
 
bool IsAirlock [get]
 
bool IsWetRoom [get, set]
 
bool AvoidStaying [get, set]
 
float WaterPercentage [get]
 
float? OxygenPercentage [get, set]
 
float Volume [get]
 
float Pressure [get, set]
 
float[] WaveY [get]
 
float[] WaveVel [get]
 
List< BackgroundSectionBackgroundSections [get]
 
bool SupportsPaintedColors [get]
 
Color AveragePaintedColor [get]
 Average color of the background sections More...
 
bool IsRed [get]
 Returns true if the red component of the background color is twice as bright as the blue and green. Can be used by StatusEffects. More...
 
bool IsGreen [get]
 Returns true if the green component of the background color is twice as bright as the red and blue. Can be used by StatusEffects. More...
 
bool IsBlue [get]
 Returns true if the blue component of the background color is twice as bright as the red and green. Can be used by StatusEffects. More...
 
List< FireSourceFireSources [get]
 
List< DummyFireSourceFakeFireSources [get]
 
int FireCount [get]
 Can be used by conditionals More...
 
BallastFloraBehavior BallastFlora [get, set]
 
float DrawSurface [get, set]
 
override bool SelectableInEditor [get]
 
override bool DrawBelowWater [get]
 
override bool DrawOverWater [get]
 
- Properties inherited from Barotrauma.MapEntity
string DisallowedUpgrades [get, set]
 
bool FlippedX [get]
 
bool FlippedY [get]
 
static IEnumerable< MapEntityHighlightedEntities [get]
 
bool ExternalHighlight [get, set]
 
bool IsHighlighted [get, set]
 
virtual Rectangle Rect [get, set]
 
Rectangle? WorldRect [get]
 
virtual Sprite Sprite [get]
 
virtual bool DrawBelowWater [get]
 
virtual bool DrawOverWater [get]
 
virtual bool Linkable [get]
 
IEnumerable< IdentifierAllowedLinks [get]
 
bool ResizeHorizontal [get]
 
bool ResizeVertical [get]
 
int RectWidth [get, set]
 
int RectHeight [get, set]
 
bool SpriteDepthOverrideIsSet [get]
 
float SpriteOverrideDepth [get]
 
float? SpriteDepth [get, set]
 
virtual float Scale = 1 [get, set]
 
bool HiddenInGame [get, set]
 
override Vector2 Position [get]
 
override Vector2 SimPosition [get]
 
float SoundRange [get, set]
 
float SightRange [get, set]
 
bool RemoveIfLinkedOutpostDoorInUse = true [get, protected set]
 
string Layer [get, set]
 
virtual string Name [get]
 
static Vector2 StartMovingPos [get]
 
static Vector2 SelectionPos [get]
 
static bool Resizing [get]
 
static HashSet< MapEntitySelectedList = new HashSet<MapEntity>() [get]
 
static GUIListBox HighlightedListBox [get]
 
static GUIComponent EditingHUD [get]
 
static bool DisableSelect [get, set]
 
virtual bool SelectableInEditor [get]
 
static bool SelectedAny [get]
 
bool IsSelected [get]
 
bool IsIncludedInSelection [get, set]
 
static List< MapEntityFilteredSelectedList = new List<MapEntity>() [get]
 
- Properties inherited from Barotrauma.Entity
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]
 
double SpawnTime [get]
 
string ErrorLine [get]
 
- Properties inherited from Barotrauma.ISpatialEntity
Vector2 Position [get]
 
Vector2 WorldPosition [get]
 
Vector2 SimPosition [get]
 
Submarine Submarine [get]
 
- Properties inherited from Barotrauma.ISerializableEntity
string Name [get]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get]
 

Additional Inherited Members

- Protected Member Functions inherited from Barotrauma.MapEntity
void ParseLinks (XElement element, IdRemap idRemap)
 
virtual void CheckIsHighlighted ()
 
void InsertToList ()
 
Vector2 GetCollapseEffectOffset ()
 
- Protected Member Functions inherited from Barotrauma.Entity
virtual ushort DetermineID (ushort id, Submarine submarine)
 
- Static Protected Member Functions inherited from Barotrauma.MapEntity
static void ColorFlipButton (GUIButton btn, bool flip)
 
static void PositionEditingHUD ()
 
- Protected Attributes inherited from Barotrauma.MapEntity
List< ushort > linkedToID
 
readonly List< Upgrade > Upgrades = new List<Upgrade>()
 List of upgrades this item has More...
 
bool flippedX
 
Rectangle rect
 
- Protected Attributes inherited from Barotrauma.Entity
AITarget aiTarget
 
- Static Protected Attributes inherited from Barotrauma.MapEntity
static readonly HashSet< MapEntityhighlightedEntities = new HashSet<MapEntity>()
 
static Vector2 selectionPos = Vector2.Zero
 
static Vector2 selectionSize = Vector2.Zero
 
static GUIComponent editingHUD
 
- Events inherited from Barotrauma.MapEntity
Action< Rectangle > Resized
 

Detailed Description

Definition at line 114 of file BarotraumaShared/SharedSource/Map/Hull.cs.

Member Enumeration Documentation

◆ EventType

Enumerator
Status 
Decal 
BackgroundSections 
BallastFlora 
MinValue 
MaxValue 

Definition at line 14 of file HullEventData.cs.

Constructor & Destructor Documentation

◆ Hull() [1/2]

Barotrauma.Hull.Hull ( Rectangle  rectangle)

Definition at line 452 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Hull() [2/2]

Barotrauma.Hull.Hull ( Rectangle  rectangle,
Submarine  submarine,
ushort  id = Entity.NullEntityID 
)

Definition at line 463 of file BarotraumaShared/SharedSource/Map/Hull.cs.

Member Function Documentation

◆ AddDecal() [1/2]

Decal Barotrauma.Hull.AddDecal ( string  decalName,
Vector2  worldPosition,
float  scale,
bool  isNetworkEvent,
int?  spriteIndex = null 
)

Definition at line 752 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ AddDecal() [2/2]

Decal Barotrauma.Hull.AddDecal ( UInt32  decalId,
Vector2  worldPosition,
float  scale,
bool  isNetworkEvent,
int?  spriteIndex = null 
)

Definition at line 734 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ AddFireSource()

void Barotrauma.Hull.AddFireSource ( FireSource  fireSource)

Definition at line 717 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ AddToGrid()

void Barotrauma.Hull.AddToGrid ( Submarine  submarine)

Definition at line 607 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ ApplyFlowForces()

void Barotrauma.Hull.ApplyFlowForces ( float  deltaTime,
Item  item 
)

Definition at line 1047 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ CleanSection()

void Barotrauma.Hull.CleanSection ( BackgroundSection  section,
float  cleanVal,
bool  updateRequired 
)

Definition at line 1583 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ ClientEventRead()

void Barotrauma.Hull.ClientEventRead ( IReadMessage  msg,
float  sendingTime 
)

◆ ClientEventWrite()

void Barotrauma.Hull.ClientEventWrite ( IWriteMessage  msg,
NetEntityEvent.IData  extraData = null 
)

◆ Clone()

override MapEntity Barotrauma.Hull.Clone ( )
virtual

Implements Barotrauma.MapEntity.

Definition at line 540 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ CreateRoomName()

string Barotrauma.Hull.CreateRoomName ( )

Definition at line 1318 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ DetectItemVisibility()

static void Barotrauma.Hull.DetectItemVisibility ( Character  c = null)
static

Definition at line 1259 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ DoesSectionMatch()

bool Barotrauma.Hull.DoesSectionMatch ( int  index,
int  row 
)

Definition at line 1505 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Draw()

override void Barotrauma.Hull.Draw ( SpriteBatch  spriteBatch,
bool  editing,
bool  back = true 
)
virtual

Reimplemented from Barotrauma.MapEntity.

Definition at line 258 of file BarotraumaClient/ClientSource/Map/Hull.cs.

◆ DrawSectionColors()

void Barotrauma.Hull.DrawSectionColors ( SpriteBatch  spriteBatch)

Definition at line 387 of file BarotraumaClient/ClientSource/Map/Hull.cs.

◆ Extinguish()

void Barotrauma.Hull.Extinguish ( float  deltaTime,
float  amount,
Vector2  position,
bool  extinguishRealFires = true,
bool  extinguishFakeFires = true 
)

Definition at line 1064 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ FindHull()

static Hull Barotrauma.Hull.FindHull ( Vector2  position,
Hull  guess = null,
bool  useWorldCoordinates = true,
bool  inclusive = true 
)
static

Returns the hull which contains the point (or null if it isn't inside any)

Parameters
positionThe position to check
guessThis hull is checked first: if the current hull is known, this can be used as an optimization
useWorldCoordinatesShould world coordinates or the sub's local coordinates be used?
inclusiveDoes being exactly at the edge of the hull count as being inside?

Definition at line 1182 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ FindHullUnoptimized()

static Hull Barotrauma.Hull.FindHullUnoptimized ( Vector2  position,
Hull  guess = null,
bool  useWorldCoordinates = true,
bool  inclusive = true 
)
static

Returns the hull which contains the point (or null if it isn't inside any). The difference to FindHull is that this method goes through all hulls without trying to first find the sub the point is inside and checking the hulls in that sub. = This is slower, use with caution in situations where the sub's extents or hulls may have changed after it was loaded.

Definition at line 1244 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ GenerateEntityGrid() [1/2]

static EntityGrid Barotrauma.Hull.GenerateEntityGrid ( Rectangle  worldRect)
static

Definition at line 554 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ GenerateEntityGrid() [2/2]

static EntityGrid Barotrauma.Hull.GenerateEntityGrid ( Submarine  submarine)
static

Definition at line 561 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ GetApproximateDistance()

float Barotrauma.Hull.GetApproximateDistance ( Vector2  startPos,
Vector2  endPos,
Hull  targetHull,
float  maxDistance,
float  distanceMultiplierPerClosedDoor = 0 
)

Approximate distance from this hull to the target hull, moving through open gaps without passing through walls. Uses a greedy algo and may not use the most optimal path. Returns float.MaxValue if no path is found.

Definition at line 1124 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ GetBackgroundSection()

BackgroundSection Barotrauma.Hull.GetBackgroundSection ( Vector2  worldPosition)

Definition at line 1462 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ GetBackgroundSectionsViaContaining()

IEnumerable<BackgroundSection> Barotrauma.Hull.GetBackgroundSectionsViaContaining ( Rectangle  rectArea)

Definition at line 1477 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ GetBorders()

static Rectangle Barotrauma.Hull.GetBorders ( )
static

Definition at line 512 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ GetCleanTarget()

static Hull Barotrauma.Hull.GetCleanTarget ( Vector2  worldPosition)
static

Definition at line 1450 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ GetConnectedHulls()

IEnumerable<Hull> Barotrauma.Hull.GetConnectedHulls ( bool  includingThis,
int?  searchDepth = null,
bool  ignoreClosedGaps = false 
)

Definition at line 1092 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ GetWaveIndex() [1/2]

int Barotrauma.Hull.GetWaveIndex ( float  xPos)

Definition at line 627 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ GetWaveIndex() [2/2]

int Barotrauma.Hull.GetWaveIndex ( Vector2  position)

Definition at line 622 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ IncreaseSectionColorOrStrength()

void Barotrauma.Hull.IncreaseSectionColorOrStrength ( BackgroundSection  section,
Color?  color,
float?  strength,
bool  requiresUpdate,
bool  isCleaning 
)

Definition at line 1510 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ IsMouseOn()

override bool Barotrauma.Hull.IsMouseOn ( Vector2  position)
virtual

Reimplemented from Barotrauma.MapEntity.

Definition at line 96 of file BarotraumaClient/ClientSource/Map/Hull.cs.

◆ IsVisible()

override bool Barotrauma.Hull.IsVisible ( Rectangle  worldView)
virtual

Reimplemented from Barotrauma.MapEntity.

Definition at line 81 of file BarotraumaClient/ClientSource/Map/Hull.cs.

◆ LeadsOutside()

bool Barotrauma.Hull.LeadsOutside ( Character  character)

Does this hull have any doors leading outside?

Parameters
characterUsed to check if this character has access to the door leading outside

Definition at line 1408 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Load()

static Hull Barotrauma.Hull.Load ( ContentXElement  element,
Submarine  submarine,
IdRemap  idRemap 
)
static

Definition at line 1606 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Move()

override void Barotrauma.Hull.Move ( Vector2  amount,
bool  ignoreContacts = true 
)
virtual

Reimplemented from Barotrauma.MapEntity.

Definition at line 634 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ OnMapLoaded()

override void Barotrauma.Hull.OnMapLoaded ( )
virtual

Reimplemented from Barotrauma.MapEntity.

Definition at line 581 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Remove()

override void Barotrauma.Hull.Remove ( )
virtual

Reimplemented from Barotrauma.Entity.

Definition at line 687 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ RemoveFire()

void Barotrauma.Hull.RemoveFire ( FireSource  fire)

Definition at line 1082 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Save()

override XElement Barotrauma.Hull.Save ( XElement  parentElement)
virtual

Reimplemented from Barotrauma.MapEntity.

Definition at line 1690 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ SetModuleTags()

void Barotrauma.Hull.SetModuleTags ( IEnumerable< Identifier tags)

Definition at line 572 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ SetSectionColorOrStrength()

void Barotrauma.Hull.SetSectionColorOrStrength ( BackgroundSection  section,
Color?  color,
float?  strength 
)

Definition at line 1564 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ ShallowRemove()

override void Barotrauma.Hull.ShallowRemove ( )
virtual

Remove the entity from the entity list without removing links to other entities

Reimplemented from Barotrauma.MapEntity.

Definition at line 658 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ ToString()

override string Barotrauma.Hull.ToString ( )

Definition at line 1749 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Update()

override void Barotrauma.Hull.Update ( float  deltaTime,
Camera  cam 
)
virtual

Reimplemented from Barotrauma.MapEntity.

Definition at line 866 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ UpdateCheats()

static void Barotrauma.Hull.UpdateCheats ( float  deltaTime,
Camera  cam 
)
static

Definition at line 207 of file BarotraumaClient/ClientSource/Map/Hull.cs.

◆ UpdateEditing()

override void Barotrauma.Hull.UpdateEditing ( Camera  cam,
float  deltaTime 
)
virtual

Reimplemented from Barotrauma.MapEntity.

Definition at line 118 of file BarotraumaClient/ClientSource/Map/Hull.cs.

◆ UpdateVertices()

static void Barotrauma.Hull.UpdateVertices ( Camera  cam,
WaterRenderer  renderer 
)
static

Definition at line 416 of file BarotraumaClient/ClientSource/Map/Hull.cs.

Member Data Documentation

◆ BackgroundSectionSize

const int Barotrauma.Hull.BackgroundSectionSize = 16
static

Definition at line 135 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ BackgroundSectionsPerNetworkEvent

const int Barotrauma.Hull.BackgroundSectionsPerNetworkEvent = 16
static

Definition at line 137 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ ConnectedGaps

readonly List<Gap> Barotrauma.Hull.ConnectedGaps = new List<Gap>()

Definition at line 178 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ EditWater

bool Barotrauma.Hull.EditWater
static

Definition at line 121 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ EntityGrids

readonly List<EntityGrid> Barotrauma.Hull.EntityGrids = new List<EntityGrid>()
static

Definition at line 117 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ HullList

readonly List<Hull> Barotrauma.Hull.HullList = new List<Hull>()
static

Definition at line 116 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ MaxCompress

const float Barotrauma.Hull.MaxCompress = 1.05f
static

Definition at line 133 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ MaxDecalsPerHull

const int Barotrauma.Hull.MaxDecalsPerHull = 10
static

Definition at line 173 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ OriginalAmbientLight

Color? Barotrauma.Hull.OriginalAmbientLight = null

Definition at line 212 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ OxygenConsumptionSpeed

const float Barotrauma.Hull.OxygenConsumptionSpeed = 700.0f
static

Definition at line 124 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ OxygenDeteriorationSpeed

const float Barotrauma.Hull.OxygenDeteriorationSpeed = 0.3f
static

Definition at line 123 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ OxygenDistributionSpeed

const float Barotrauma.Hull.OxygenDistributionSpeed = 30000.0f
static

Definition at line 122 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ PressureBuildUpSpeed

const float Barotrauma.Hull.PressureBuildUpSpeed = 15.0f
static

How fast the pressure in the hull builds up when there's a gap leading outside

Definition at line 148 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ PressureDropSpeed

const float Barotrauma.Hull.PressureDropSpeed = 10.0f
static

How fast the pressure in the hull goes back to normal when it's no longer full of water

Definition at line 153 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ properties

readonly Dictionary<Identifier, SerializableProperty> Barotrauma.Hull.properties

Definition at line 139 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ ShowHulls

bool Barotrauma.Hull.ShowHulls = true
static

Definition at line 119 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Visible

bool Barotrauma.Hull.Visible = true

Definition at line 165 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ WaveDampening

float Barotrauma.Hull.WaveDampening = 0.02f
static

Definition at line 129 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ WaveSpread

float Barotrauma.Hull.WaveSpread = 0.02f
static

Definition at line 128 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ WaveStiffness

float Barotrauma.Hull.WaveStiffness = 0.01f
static

Definition at line 127 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ WaveWidth

const int Barotrauma.Hull.WaveWidth = 32
static

Definition at line 126 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ xBackgroundMax

int Barotrauma.Hull.xBackgroundMax

Definition at line 402 of file BarotraumaShared/SharedSource/Map/Hull.cs.

Property Documentation

◆ AmbientLight

Color Barotrauma.Hull.AmbientLight
getset

Definition at line 217 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ AveragePaintedColor

Color Barotrauma.Hull.AveragePaintedColor
get

Average color of the background sections

Definition at line 424 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ AvoidStaying

bool Barotrauma.Hull.AvoidStaying
getset

Definition at line 351 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ BackgroundSections

List<BackgroundSection> Barotrauma.Hull.BackgroundSections
get

Definition at line 394 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ BallastFlora

BallastFloraBehavior Barotrauma.Hull.BallastFlora
getset

Definition at line 450 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ CeilingHeight

float Barotrauma.Hull.CeilingHeight
get

Definition at line 283 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ DisplayName

LocalizedString Barotrauma.Hull.DisplayName
get

Definition at line 182 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ DrawBelowWater

override bool Barotrauma.Hull.DrawBelowWater
get

Definition at line 62 of file BarotraumaClient/ClientSource/Map/Hull.cs.

◆ DrawOverWater

override bool Barotrauma.Hull.DrawOverWater
get

Definition at line 70 of file BarotraumaClient/ClientSource/Map/Hull.cs.

◆ DrawSurface

float Barotrauma.Hull.DrawSurface
getset

Definition at line 43 of file BarotraumaClient/ClientSource/Map/Hull.cs.

◆ FakeFireSources

List<DummyFireSource> Barotrauma.Hull.FakeFireSources
get

Definition at line 443 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ FireCount

int Barotrauma.Hull.FireCount
get

Can be used by conditionals

Definition at line 448 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ FireSources

List<FireSource> Barotrauma.Hull.FireSources
get

Definition at line 441 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ IsAirlock

bool Barotrauma.Hull.IsAirlock
get

Definition at line 325 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ IsBlue

bool Barotrauma.Hull.IsBlue
get

Returns true if the blue component of the background color is twice as bright as the red and green. Can be used by StatusEffects.

Definition at line 439 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ IsGreen

bool Barotrauma.Hull.IsGreen
get

Returns true if the green component of the background color is twice as bright as the red and blue. Can be used by StatusEffects.

Definition at line 434 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ IsRed

bool Barotrauma.Hull.IsRed
get

Returns true if the red component of the background color is twice as bright as the blue and green. Can be used by StatusEffects.

Definition at line 429 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ IsWetRoom

bool Barotrauma.Hull.IsWetRoom
getset

Definition at line 336 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ LethalPressure

float Barotrauma.Hull.LethalPressure
getset

Definition at line 272 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Linkable

override bool Barotrauma.Hull.Linkable
get

Definition at line 267 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Name

override string Barotrauma.Hull.Name
get

Definition at line 180 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ OutpostModuleTags

IEnumerable<Identifier> Barotrauma.Hull.OutpostModuleTags
get

Inherited flags from outpost generation.

Definition at line 193 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Oxygen

float Barotrauma.Hull.Oxygen
getset

Definition at line 315 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ OxygenPercentage

float? Barotrauma.Hull.OxygenPercentage
getset

Definition at line 366 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Pressure

float Barotrauma.Hull.Pressure
getset

Definition at line 377 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Rect

override Rectangle Barotrauma.Hull.Rect
getset

Definition at line 229 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ RoomName

string Barotrauma.Hull.RoomName
getset

Definition at line 197 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ SelectableInEditor

override bool Barotrauma.Hull.SelectableInEditor
get

Definition at line 54 of file BarotraumaClient/ClientSource/Map/Hull.cs.

◆ SerializableProperties

Dictionary<Identifier, SerializableProperty> Barotrauma.Hull.SerializableProperties
get

Definition at line 140 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Size

Vector2 Barotrauma.Hull.Size
get

Definition at line 278 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ SupportsPaintedColors

bool Barotrauma.Hull.SupportsPaintedColors
get

Definition at line 404 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Surface

float Barotrauma.Hull.Surface
get

Definition at line 289 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ Volume

float Barotrauma.Hull.Volume
get

Definition at line 372 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ WaterPercentage

float Barotrauma.Hull.WaterPercentage
get

Definition at line 364 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ WaterVolume

float Barotrauma.Hull.WaterVolume
getset

Definition at line 299 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ WaveVel

float [] Barotrauma.Hull.WaveVel
get

Definition at line 388 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ WaveY

float [] Barotrauma.Hull.WaveY
get

Definition at line 383 of file BarotraumaShared/SharedSource/Map/Hull.cs.

◆ WorldSurface

float? Barotrauma.Hull.WorldSurface
get

Definition at line 294 of file BarotraumaShared/SharedSource/Map/Hull.cs.