diff --git a/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaDocs.cs b/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaDocs.cs
index 1cf7e4932..1c59fc5ff 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaDocs.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaDocs.cs
@@ -78,6 +78,7 @@ namespace Barotrauma
GenerateDocs(typeof(Item), "Item.lua");
GenerateDocs(typeof(ItemPrefab), "ItemPrefab.lua");
GenerateDocs(typeof(Submarine), "Submarine.lua");
+ GenerateDocs(typeof(SubmarineInfo), "SubmarineInfo.lua");
GenerateDocs(typeof(Job), "Job.lua");
GenerateDocs(typeof(JobPrefab), "JobPrefab.lua");
GenerateDocs(typeof(GameSession), "GameSession.lua", "Game.GameSession");
@@ -87,6 +88,10 @@ namespace Barotrauma
GenerateDocs(typeof(Inventory), "Inventory.lua", "Inventory");
GenerateDocs(typeof(ItemInventory), "ItemInventory.lua", "ItemInventory");
GenerateDocs(typeof(CharacterInventory), "CharacterInventory.lua", "CharacterInventory");
+ GenerateDocs(typeof(Hull), "Hull.lua", "Hull");
+ GenerateDocs(typeof(Level), "Level.lua", "Level");
+ GenerateDocs(typeof(Affliction), "Affliction.lua", "Affliction");
+ GenerateDocs(typeof(AfflictionPrefab), "AfflictionPrefab.lua", "AfflictionPrefab");
}
public static void GenerateDocs(Type type, string name, string? categoryName = null)
diff --git a/docs/baseluadocs/Affliction.lua b/docs/baseluadocs/Affliction.lua
new file mode 100644
index 000000000..fcfa5ba2c
--- /dev/null
+++ b/docs/baseluadocs/Affliction.lua
@@ -0,0 +1,8 @@
+-- luacheck: ignore 111
+
+--[[--
+Barotrauma.Affliction
+]]
+-- @code Affliction
+-- @pragma nostrip
+local Affliction = {}
\ No newline at end of file
diff --git a/docs/baseluadocs/AfflictionPrefab.lua b/docs/baseluadocs/AfflictionPrefab.lua
new file mode 100644
index 000000000..9404e3b42
--- /dev/null
+++ b/docs/baseluadocs/AfflictionPrefab.lua
@@ -0,0 +1,8 @@
+-- luacheck: ignore 111
+
+--[[--
+Barotrauma.AfflictionPrefab
+]]
+-- @code AfflictionPrefab
+-- @pragma nostrip
+local AfflictionPrefab = {}
\ No newline at end of file
diff --git a/docs/baseluadocs/Hull.lua b/docs/baseluadocs/Hull.lua
new file mode 100644
index 000000000..bc09c3cac
--- /dev/null
+++ b/docs/baseluadocs/Hull.lua
@@ -0,0 +1,8 @@
+-- luacheck: ignore 111
+
+--[[--
+Barotrauma.Hull
+]]
+-- @code Hull
+-- @pragma nostrip
+local Hull = {}
\ No newline at end of file
diff --git a/docs/baseluadocs/Level.lua b/docs/baseluadocs/Level.lua
new file mode 100644
index 000000000..b247afb17
--- /dev/null
+++ b/docs/baseluadocs/Level.lua
@@ -0,0 +1,8 @@
+-- luacheck: ignore 111
+
+--[[--
+Barotrauma.Level
+]]
+-- @code Level
+-- @pragma nostrip
+local Level = {}
\ No newline at end of file
diff --git a/docs/baseluadocs/SubmarineInfo.lua b/docs/baseluadocs/SubmarineInfo.lua
new file mode 100644
index 000000000..11f9fbaba
--- /dev/null
+++ b/docs/baseluadocs/SubmarineInfo.lua
@@ -0,0 +1,8 @@
+-- luacheck: ignore 111
+
+--[[--
+Barotrauma.SubmarineInfo
+]]
+-- @code SubmarineInfo
+-- @pragma nostrip
+local SubmarineInfo = {}
\ No newline at end of file
diff --git a/docs/lua/generated/Affliction.lua b/docs/lua/generated/Affliction.lua
new file mode 100644
index 000000000..76d7febb5
--- /dev/null
+++ b/docs/lua/generated/Affliction.lua
@@ -0,0 +1,255 @@
+-- luacheck: ignore 111
+
+--[[--
+Barotrauma.Affliction
+]]
+-- @code Affliction
+-- @pragma nostrip
+local Affliction = {}
+
+--- Serialize
+-- @realm shared
+-- @tparam XElement element
+function Serialize(element) end
+
+--- Deserialize
+-- @realm shared
+-- @tparam XElement element
+function Deserialize(element) end
+
+--- CreateMultiplied
+-- @realm shared
+-- @tparam number multiplier
+-- @treturn Affliction
+function CreateMultiplied(multiplier) end
+
+--- ToString
+-- @realm shared
+-- @treturn string
+function ToString() end
+
+--- GetActiveEffect
+-- @realm shared
+-- @treturn Effect
+function GetActiveEffect() end
+
+--- GetVitalityDecrease
+-- @realm shared
+-- @tparam CharacterHealth characterHealth
+-- @treturn number
+function GetVitalityDecrease(characterHealth) end
+
+--- GetScreenGrainStrength
+-- @realm shared
+-- @treturn number
+function GetScreenGrainStrength() end
+
+--- GetScreenDistortStrength
+-- @realm shared
+-- @treturn number
+function GetScreenDistortStrength() end
+
+--- GetRadialDistortStrength
+-- @realm shared
+-- @treturn number
+function GetRadialDistortStrength() end
+
+--- GetChromaticAberrationStrength
+-- @realm shared
+-- @treturn number
+function GetChromaticAberrationStrength() end
+
+--- GetAfflictionOverlayMultiplier
+-- @realm shared
+-- @treturn number
+function GetAfflictionOverlayMultiplier() end
+
+--- GetFaceTint
+-- @realm shared
+-- @treturn Color
+function GetFaceTint() end
+
+--- GetBodyTint
+-- @realm shared
+-- @treturn Color
+function GetBodyTint() end
+
+--- GetScreenBlurStrength
+-- @realm shared
+-- @treturn number
+function GetScreenBlurStrength() end
+
+--- GetSkillMultiplier
+-- @realm shared
+-- @treturn number
+function GetSkillMultiplier() end
+
+--- CalculateDamagePerSecond
+-- @realm shared
+-- @tparam number currentVitalityDecrease
+function CalculateDamagePerSecond(currentVitalityDecrease) end
+
+--- GetResistance
+-- @realm shared
+-- @tparam AfflictionPrefab affliction
+-- @treturn number
+function GetResistance(affliction) end
+
+--- GetSpeedMultiplier
+-- @realm shared
+-- @treturn number
+function GetSpeedMultiplier() end
+
+--- GetStatValue
+-- @realm shared
+-- @tparam StatTypes statType
+-- @treturn number
+function GetStatValue(statType) end
+
+--- HasFlag
+-- @realm shared
+-- @tparam AbilityFlags flagType
+-- @treturn bool
+function HasFlag(flagType) end
+
+--- Update
+-- @realm shared
+-- @tparam CharacterHealth characterHealth
+-- @tparam Limb targetLimb
+-- @tparam number deltaTime
+function Update(characterHealth, targetLimb, deltaTime) end
+
+--- ApplyStatusEffects
+-- @realm shared
+-- @tparam function type
+-- @tparam number deltaTime
+-- @tparam CharacterHealth characterHealth
+-- @tparam Limb targetLimb
+function ApplyStatusEffects(type, deltaTime, characterHealth, targetLimb) end
+
+--- ApplyStatusEffect
+-- @realm shared
+-- @tparam function type
+-- @tparam StatusEffect statusEffect
+-- @tparam number deltaTime
+-- @tparam CharacterHealth characterHealth
+-- @tparam Limb targetLimb
+function ApplyStatusEffect(type, statusEffect, deltaTime, characterHealth, targetLimb) end
+
+--- SetStrength
+-- @realm shared
+-- @tparam number strength
+function SetStrength(strength) end
+
+--- ShouldShowIcon
+-- @realm shared
+-- @tparam Character afflictedCharacter
+-- @treturn bool
+function ShouldShowIcon(afflictedCharacter) end
+
+--- GetType
+-- @realm shared
+-- @treturn Type
+function GetType() end
+
+--- Equals
+-- @realm shared
+-- @tparam Object obj
+-- @treturn bool
+function Equals(obj) end
+
+--- GetHashCode
+-- @realm shared
+-- @treturn number
+function GetHashCode() end
+
+---
+-- Name, Field of type string
+-- @realm shared
+-- @string Name
+
+---
+-- SerializableProperties, Field of type table
+-- @realm shared
+-- @table SerializableProperties
+
+---
+-- PendingAdditionStrength, Field of type number
+-- @realm shared
+-- @number PendingAdditionStrength
+
+---
+-- AdditionStrength, Field of type number
+-- @realm shared
+-- @number AdditionStrength
+
+---
+-- Strength, Field of type number
+-- @realm shared
+-- @number Strength
+
+---
+-- NonClampedStrength, Field of type number
+-- @realm shared
+-- @number NonClampedStrength
+
+---
+-- Identifier, Field of type string
+-- @realm shared
+-- @string Identifier
+
+---
+-- Probability, Field of type number
+-- @realm shared
+-- @number Probability
+
+---
+-- Prefab, Field of type AfflictionPrefab
+-- @realm shared
+-- @AfflictionPrefab Prefab
+
+---
+-- DamagePerSecond, Field of type number
+-- @realm shared
+-- @number DamagePerSecond
+
+---
+-- DamagePerSecondTimer, Field of type number
+-- @realm shared
+-- @number DamagePerSecondTimer
+
+---
+-- PreviousVitalityDecrease, Field of type number
+-- @realm shared
+-- @number PreviousVitalityDecrease
+
+---
+-- StrengthDiminishMultiplier, Field of type number
+-- @realm shared
+-- @number StrengthDiminishMultiplier
+
+---
+-- MultiplierSource, Field of type Affliction
+-- @realm shared
+-- @Affliction MultiplierSource
+
+---
+-- PeriodicEffectTimers, Field of type table
+-- @realm shared
+-- @table PeriodicEffectTimers
+
+---
+-- AppliedAsSuccessfulTreatmentTime, Field of type number
+-- @realm shared
+-- @number AppliedAsSuccessfulTreatmentTime
+
+---
+-- AppliedAsFailedTreatmentTime, Field of type number
+-- @realm shared
+-- @number AppliedAsFailedTreatmentTime
+
+---
+-- Source, Field of type Character
+-- @realm shared
+-- @Character Source
+
diff --git a/docs/lua/generated/AfflictionPrefab.lua b/docs/lua/generated/AfflictionPrefab.lua
new file mode 100644
index 000000000..b9f8ad93e
--- /dev/null
+++ b/docs/lua/generated/AfflictionPrefab.lua
@@ -0,0 +1,288 @@
+-- luacheck: ignore 111
+
+--[[--
+Barotrauma.AfflictionPrefab
+]]
+-- @code AfflictionPrefab
+-- @pragma nostrip
+local AfflictionPrefab = {}
+
+--- Dispose
+-- @realm shared
+function Dispose() end
+
+--- LoadAll
+-- @realm shared
+-- @tparam Enumerable files
+function AfflictionPrefab.LoadAll(files) end
+
+--- LoadFromFile
+-- @realm shared
+-- @tparam ContentFile file
+function AfflictionPrefab.LoadFromFile(file) end
+
+--- RemoveByFile
+-- @realm shared
+-- @tparam string filePath
+function AfflictionPrefab.RemoveByFile(filePath) end
+
+--- ToString
+-- @realm shared
+-- @treturn string
+function ToString() end
+
+--- Instantiate
+-- @realm shared
+-- @tparam number strength
+-- @tparam Character source
+-- @treturn Affliction
+function Instantiate(strength, source) end
+
+--- GetActiveEffect
+-- @realm shared
+-- @tparam number currentStrength
+-- @treturn Effect
+function GetActiveEffect(currentStrength) end
+
+--- GetTreatmentSuitability
+-- @realm shared
+-- @tparam Item item
+-- @treturn number
+function GetTreatmentSuitability(item) end
+
+--- GetType
+-- @realm shared
+-- @treturn Type
+function GetType() end
+
+--- Equals
+-- @realm shared
+-- @tparam Object obj
+-- @treturn bool
+function Equals(obj) end
+
+--- GetHashCode
+-- @realm shared
+-- @treturn number
+function GetHashCode() end
+
+---
+-- AfflictionPrefab.List, Field of type Enumerable
+-- @realm shared
+-- @Enumerable AfflictionPrefab.List
+
+---
+-- FilePath, Field of type string
+-- @realm shared
+-- @string FilePath
+
+---
+-- UIntIdentifier, Field of type number
+-- @realm shared
+-- @number UIntIdentifier
+
+---
+-- Identifier, Field of type string
+-- @realm shared
+-- @string Identifier
+
+---
+-- OriginalName, Field of type string
+-- @realm shared
+-- @string OriginalName
+
+---
+-- ContentPackage, Field of type ContentPackage
+-- @realm shared
+-- @ContentPackage ContentPackage
+
+---
+-- Effects, Field of type Enumerable
+-- @realm shared
+-- @Enumerable Effects
+
+---
+-- PeriodicEffects, Field of type IList`1
+-- @realm shared
+-- @IList`1 PeriodicEffects
+
+---
+-- TreatmentSuitability, Field of type Enumerable
+-- @realm shared
+-- @Enumerable TreatmentSuitability
+
+---
+-- AfflictionPrefab.ListArray, Field of type AfflictionPrefab[]
+-- @realm shared
+-- @AfflictionPrefab[] AfflictionPrefab.ListArray
+
+---
+-- AfflictionType, Field of type string
+-- @realm shared
+-- @string AfflictionType
+
+---
+-- LimbSpecific, Field of type bool
+-- @realm shared
+-- @bool LimbSpecific
+
+---
+-- IndicatorLimb, Field of type LimbType
+-- @realm shared
+-- @LimbType IndicatorLimb
+
+---
+-- Name, Field of type string
+-- @realm shared
+-- @string Name
+
+---
+-- Description, Field of type string
+-- @realm shared
+-- @string Description
+
+---
+-- TranslationOverride, Field of type string
+-- @realm shared
+-- @string TranslationOverride
+
+---
+-- IsBuff, Field of type bool
+-- @realm shared
+-- @bool IsBuff
+
+---
+-- CauseOfDeathDescription, Field of type string
+-- @realm shared
+-- @string CauseOfDeathDescription
+
+---
+-- SelfCauseOfDeathDescription, Field of type string
+-- @realm shared
+-- @string SelfCauseOfDeathDescription
+
+---
+-- ActivationThreshold, Field of type number
+-- @realm shared
+-- @number ActivationThreshold
+
+---
+-- ShowIconThreshold, Field of type number
+-- @realm shared
+-- @number ShowIconThreshold
+
+---
+-- ShowIconToOthersThreshold, Field of type number
+-- @realm shared
+-- @number ShowIconToOthersThreshold
+
+---
+-- MaxStrength, Field of type number
+-- @realm shared
+-- @number MaxStrength
+
+---
+-- GrainBurst, Field of type number
+-- @realm shared
+-- @number GrainBurst
+
+---
+-- ShowInHealthScannerThreshold, Field of type number
+-- @realm shared
+-- @number ShowInHealthScannerThreshold
+
+---
+-- TreatmentThreshold, Field of type number
+-- @realm shared
+-- @number TreatmentThreshold
+
+---
+-- KarmaChangeOnApplied, Field of type number
+-- @realm shared
+-- @number KarmaChangeOnApplied
+
+---
+-- BurnOverlayAlpha, Field of type number
+-- @realm shared
+-- @number BurnOverlayAlpha
+
+---
+-- DamageOverlayAlpha, Field of type number
+-- @realm shared
+-- @number DamageOverlayAlpha
+
+---
+-- AchievementOnRemoved, Field of type string
+-- @realm shared
+-- @string AchievementOnRemoved
+
+---
+-- Icon, Field of type Sprite
+-- @realm shared
+-- @Sprite Icon
+
+---
+-- IconColors, Field of type Color[]
+-- @realm shared
+-- @Color[] IconColors
+
+---
+-- AfflictionOverlay, Field of type Sprite
+-- @realm shared
+-- @Sprite AfflictionOverlay
+
+---
+-- AfflictionOverlayAlphaIsLinear, Field of type bool
+-- @realm shared
+-- @bool AfflictionOverlayAlphaIsLinear
+
+---
+-- AfflictionPrefab.InternalDamage, Field of type AfflictionPrefab
+-- @realm shared
+-- @AfflictionPrefab AfflictionPrefab.InternalDamage
+
+---
+-- AfflictionPrefab.ImpactDamage, Field of type AfflictionPrefab
+-- @realm shared
+-- @AfflictionPrefab AfflictionPrefab.ImpactDamage
+
+---
+-- AfflictionPrefab.Bleeding, Field of type AfflictionPrefab
+-- @realm shared
+-- @AfflictionPrefab AfflictionPrefab.Bleeding
+
+---
+-- AfflictionPrefab.Burn, Field of type AfflictionPrefab
+-- @realm shared
+-- @AfflictionPrefab AfflictionPrefab.Burn
+
+---
+-- AfflictionPrefab.OxygenLow, Field of type AfflictionPrefab
+-- @realm shared
+-- @AfflictionPrefab AfflictionPrefab.OxygenLow
+
+---
+-- AfflictionPrefab.Bloodloss, Field of type AfflictionPrefab
+-- @realm shared
+-- @AfflictionPrefab AfflictionPrefab.Bloodloss
+
+---
+-- AfflictionPrefab.Pressure, Field of type AfflictionPrefab
+-- @realm shared
+-- @AfflictionPrefab AfflictionPrefab.Pressure
+
+---
+-- AfflictionPrefab.Stun, Field of type AfflictionPrefab
+-- @realm shared
+-- @AfflictionPrefab AfflictionPrefab.Stun
+
+---
+-- AfflictionPrefab.RadiationSickness, Field of type AfflictionPrefab
+-- @realm shared
+-- @AfflictionPrefab AfflictionPrefab.RadiationSickness
+
+---
+-- AfflictionPrefab.Prefabs, Field of type PrefabCollection`1
+-- @realm shared
+-- @PrefabCollection`1 AfflictionPrefab.Prefabs
+
diff --git a/docs/lua/generated/Hull.lua b/docs/lua/generated/Hull.lua
new file mode 100644
index 000000000..7f2aa2d16
--- /dev/null
+++ b/docs/lua/generated/Hull.lua
@@ -0,0 +1,809 @@
+-- luacheck: ignore 111
+
+--[[--
+Barotrauma.Hull
+]]
+-- @code Hull
+-- @pragma nostrip
+local Hull = {}
+
+--- IncreaseSectionColorOrStrength
+-- @realm shared
+-- @tparam BackgroundSection section
+-- @tparam Nullable`1 color
+-- @tparam Nullable`1 strength
+-- @tparam bool requiresUpdate
+-- @tparam bool isCleaning
+function IncreaseSectionColorOrStrength(section, color, strength, requiresUpdate, isCleaning) end
+
+--- SetSectionColorOrStrength
+-- @realm shared
+-- @tparam BackgroundSection section
+-- @tparam Nullable`1 color
+-- @tparam Nullable`1 strength
+function SetSectionColorOrStrength(section, color, strength) end
+
+--- DirtySections
+-- @realm shared
+-- @tparam table sections
+-- @tparam number dirtyVal
+function DirtySections(sections, dirtyVal) end
+
+--- CleanSection
+-- @realm shared
+-- @tparam BackgroundSection section
+-- @tparam number cleanVal
+-- @tparam bool updateRequired
+function CleanSection(section, cleanVal, updateRequired) end
+
+--- Load
+-- @realm shared
+-- @tparam XElement element
+-- @tparam Submarine submarine
+-- @tparam IdRemap idRemap
+-- @treturn Hull
+function Hull.Load(element, submarine, idRemap) end
+
+--- Save
+-- @realm shared
+-- @tparam XElement parentElement
+-- @treturn XElement
+function Save(parentElement) end
+
+--- IsMouseOn
+-- @realm shared
+-- @tparam Vector2 position
+-- @treturn bool
+function IsMouseOn(position) end
+
+--- ServerWrite
+-- @realm shared
+-- @tparam IWriteMessage message
+-- @tparam Client c
+-- @tparam Object[] extraData
+function ServerWrite(message, c, extraData) end
+
+--- ServerRead
+-- @realm shared
+-- @tparam ClientNetObject type
+-- @tparam IReadMessage msg
+-- @tparam Client c
+function ServerRead(type, msg, c) end
+
+--- GetBorders
+-- @realm shared
+-- @treturn Rectangle
+function Hull.GetBorders() end
+
+--- Clone
+-- @realm shared
+-- @treturn MapEntity
+function Clone() end
+
+--- GenerateEntityGrid
+-- @realm shared
+-- @tparam Rectangle worldRect
+-- @treturn EntityGrid
+function Hull.GenerateEntityGrid(worldRect) end
+
+--- GenerateEntityGrid
+-- @realm shared
+-- @tparam Submarine submarine
+-- @treturn EntityGrid
+function Hull.GenerateEntityGrid(submarine) end
+
+--- SetModuleTags
+-- @realm shared
+-- @tparam Enumerable tags
+function SetModuleTags(tags) end
+
+--- OnMapLoaded
+-- @realm shared
+function OnMapLoaded() end
+
+--- AddToGrid
+-- @realm shared
+-- @tparam Submarine submarine
+function AddToGrid(submarine) end
+
+--- GetWaveIndex
+-- @realm shared
+-- @tparam Vector2 position
+-- @treturn number
+function GetWaveIndex(position) end
+
+--- GetWaveIndex
+-- @realm shared
+-- @tparam number xPos
+-- @treturn number
+function GetWaveIndex(xPos) end
+
+--- Move
+-- @realm shared
+-- @tparam Vector2 amount
+function Move(amount) end
+
+--- ShallowRemove
+-- @realm shared
+function ShallowRemove() end
+
+--- Remove
+-- @realm shared
+function Remove() end
+
+--- AddFireSource
+-- @realm shared
+-- @tparam FireSource fireSource
+function AddFireSource(fireSource) end
+
+--- AddDecal
+-- @realm shared
+-- @tparam number decalId
+-- @tparam Vector2 worldPosition
+-- @tparam number scale
+-- @tparam bool isNetworkEvent
+-- @tparam Nullable`1 spriteIndex
+-- @treturn Decal
+function AddDecal(decalId, worldPosition, scale, isNetworkEvent, spriteIndex) end
+
+--- AddDecal
+-- @realm shared
+-- @tparam string decalName
+-- @tparam Vector2 worldPosition
+-- @tparam number scale
+-- @tparam bool isNetworkEvent
+-- @tparam Nullable`1 spriteIndex
+-- @treturn Decal
+function AddDecal(decalName, worldPosition, scale, isNetworkEvent, spriteIndex) end
+
+--- Update
+-- @realm shared
+-- @tparam number deltaTime
+-- @tparam Camera cam
+function Update(deltaTime, cam) end
+
+--- ApplyFlowForces
+-- @realm shared
+-- @tparam number deltaTime
+-- @tparam Item item
+function ApplyFlowForces(deltaTime, item) end
+
+--- Extinguish
+-- @realm shared
+-- @tparam number deltaTime
+-- @tparam number amount
+-- @tparam Vector2 position
+-- @tparam bool extinguishRealFires
+-- @tparam bool extinguishFakeFires
+function Extinguish(deltaTime, amount, position, extinguishRealFires, extinguishFakeFires) end
+
+--- RemoveFire
+-- @realm shared
+-- @tparam FireSource fire
+function RemoveFire(fire) end
+
+--- GetConnectedHulls
+-- @realm shared
+-- @tparam bool includingThis
+-- @tparam Nullable`1 searchDepth
+-- @tparam bool ignoreClosedGaps
+-- @treturn Enumerable
+function GetConnectedHulls(includingThis, searchDepth, ignoreClosedGaps) end
+
+--- GetApproximateDistance
+-- @realm shared
+-- @tparam Vector2 startPos
+-- @tparam Vector2 endPos
+-- @tparam Hull targetHull
+-- @tparam number maxDistance
+-- @tparam number distanceMultiplierPerClosedDoor
+-- @treturn number
+function GetApproximateDistance(startPos, endPos, targetHull, maxDistance, distanceMultiplierPerClosedDoor) end
+
+--- FindHull
+-- @realm shared
+-- @tparam Vector2 position
+-- @tparam Hull guess
+-- @tparam bool useWorldCoordinates
+-- @tparam bool inclusive
+-- @treturn Hull
+function Hull.FindHull(position, guess, useWorldCoordinates, inclusive) end
+
+--- FindHullUnoptimized
+-- @realm shared
+-- @tparam Vector2 position
+-- @tparam Hull guess
+-- @tparam bool useWorldCoordinates
+-- @tparam bool inclusive
+-- @treturn Hull
+function Hull.FindHullUnoptimized(position, guess, useWorldCoordinates, inclusive) end
+
+--- DetectItemVisibility
+-- @realm shared
+-- @tparam Character c
+function Hull.DetectItemVisibility(c) end
+
+--- CreateRoomName
+-- @realm shared
+-- @treturn string
+function CreateRoomName() end
+
+--- IsTaggedAirlock
+-- @realm shared
+-- @treturn bool
+function IsTaggedAirlock() end
+
+--- LeadsOutside
+-- @realm shared
+-- @tparam Character character
+-- @treturn bool
+function LeadsOutside(character) end
+
+--- GetCleanTarget
+-- @realm shared
+-- @tparam Vector2 worldPosition
+-- @treturn Hull
+function Hull.GetCleanTarget(worldPosition) end
+
+--- GetBackgroundSection
+-- @realm shared
+-- @tparam Vector2 worldPosition
+-- @treturn BackgroundSection
+function GetBackgroundSection(worldPosition) end
+
+--- GetBackgroundSectionsViaContaining
+-- @realm shared
+-- @tparam Rectangle rectArea
+-- @treturn Enumerable
+function GetBackgroundSectionsViaContaining(rectArea) end
+
+--- RefreshSubmergedSections
+-- @realm shared
+-- @tparam Rectangle waterArea
+function RefreshSubmergedSections(waterArea) end
+
+--- DoesSectionMatch
+-- @realm shared
+-- @tparam number index
+-- @tparam number row
+-- @treturn bool
+function DoesSectionMatch(index, row) end
+
+--- ResolveLinks
+-- @realm shared
+-- @tparam IdRemap childRemap
+function ResolveLinks(childRemap) end
+
+--- HasUpgrade
+-- @realm shared
+-- @tparam string identifier
+-- @treturn bool
+function HasUpgrade(identifier) end
+
+--- GetUpgrade
+-- @realm shared
+-- @tparam string identifier
+-- @treturn Upgrade
+function GetUpgrade(identifier) end
+
+--- GetUpgrades
+-- @realm shared
+-- @treturn table
+function GetUpgrades() end
+
+--- SetUpgrade
+-- @realm shared
+-- @tparam Upgrade upgrade
+-- @tparam bool createNetworkEvent
+function SetUpgrade(upgrade, createNetworkEvent) end
+
+--- AddUpgrade
+-- @realm shared
+-- @tparam Upgrade upgrade
+-- @tparam bool createNetworkEvent
+-- @treturn bool
+function AddUpgrade(upgrade, createNetworkEvent) end
+
+--- FlipX
+-- @realm shared
+-- @tparam bool relativeToSub
+function FlipX(relativeToSub) end
+
+--- FlipY
+-- @realm shared
+-- @tparam bool relativeToSub
+function FlipY(relativeToSub) end
+
+--- RemoveLinked
+-- @realm shared
+-- @tparam MapEntity e
+function RemoveLinked(e) end
+
+--- GetLinkedEntities
+-- @realm shared
+-- @tparam HashSet`1 list
+-- @tparam Nullable`1 maxDepth
+-- @tparam function filter
+-- @treturn HashSet`1
+function GetLinkedEntities(list, maxDepth, filter) end
+
+--- FreeID
+-- @realm shared
+function FreeID() end
+
+--- GetType
+-- @realm shared
+-- @treturn Type
+function GetType() end
+
+--- ToString
+-- @realm shared
+-- @treturn string
+function ToString() end
+
+--- Equals
+-- @realm shared
+-- @tparam Object obj
+-- @treturn bool
+function Equals(obj) end
+
+--- GetHashCode
+-- @realm shared
+-- @treturn number
+function GetHashCode() end
+
+---
+-- Hull.EntityGrids, Field of type table
+-- @realm shared
+-- @table Hull.EntityGrids
+
+---
+-- SerializableProperties, Field of type table
+-- @realm shared
+-- @table SerializableProperties
+
+---
+-- Name, Field of type string
+-- @realm shared
+-- @string Name
+
+---
+-- DisplayName, Field of type string
+-- @realm shared
+-- @string DisplayName
+
+---
+-- OutpostModuleTags, Field of type Enumerable
+-- @realm shared
+-- @Enumerable OutpostModuleTags
+
+---
+-- RoomName, Field of type string
+-- @realm shared
+-- @string RoomName
+
+---
+-- AmbientLight, Field of type Color
+-- @realm shared
+-- @Color AmbientLight
+
+---
+-- Rect, Field of type Rectangle
+-- @realm shared
+-- @Rectangle Rect
+
+---
+-- Linkable, Field of type bool
+-- @realm shared
+-- @bool Linkable
+
+---
+-- LethalPressure, Field of type number
+-- @realm shared
+-- @number LethalPressure
+
+---
+-- Size, Field of type Vector2
+-- @realm shared
+-- @Vector2 Size
+
+---
+-- CeilingHeight, Field of type number
+-- @realm shared
+-- @number CeilingHeight
+
+---
+-- Surface, Field of type number
+-- @realm shared
+-- @number Surface
+
+---
+-- DrawSurface, Field of type number
+-- @realm shared
+-- @number DrawSurface
+
+---
+-- WorldSurface, Field of type number
+-- @realm shared
+-- @number WorldSurface
+
+---
+-- WaterVolume, Field of type number
+-- @realm shared
+-- @number WaterVolume
+
+---
+-- Oxygen, Field of type number
+-- @realm shared
+-- @number Oxygen
+
+---
+-- IsWetRoom, Field of type bool
+-- @realm shared
+-- @bool IsWetRoom
+
+---
+-- AvoidStaying, Field of type bool
+-- @realm shared
+-- @bool AvoidStaying
+
+---
+-- WaterPercentage, Field of type number
+-- @realm shared
+-- @number WaterPercentage
+
+---
+-- OxygenPercentage, Field of type number
+-- @realm shared
+-- @number OxygenPercentage
+
+---
+-- Volume, Field of type number
+-- @realm shared
+-- @number Volume
+
+---
+-- Pressure, Field of type number
+-- @realm shared
+-- @number Pressure
+
+---
+-- WaveY, Field of type Single[]
+-- @realm shared
+-- @Single[] WaveY
+
+---
+-- WaveVel, Field of type Single[]
+-- @realm shared
+-- @Single[] WaveVel
+
+---
+-- BackgroundSections, Field of type table
+-- @realm shared
+-- @table BackgroundSections
+
+---
+-- SupportsPaintedColors, Field of type bool
+-- @realm shared
+-- @bool SupportsPaintedColors
+
+---
+-- FireSources, Field of type table
+-- @realm shared
+-- @table FireSources
+
+---
+-- FakeFireSources, Field of type table
+-- @realm shared
+-- @table FakeFireSources
+
+---
+-- BallastFlora, Field of type BallastFloraBehavior
+-- @realm shared
+-- @BallastFloraBehavior BallastFlora
+
+---
+-- DisallowedUpgrades, Field of type string
+-- @realm shared
+-- @string DisallowedUpgrades
+
+---
+-- FlippedX, Field of type bool
+-- @realm shared
+-- @bool FlippedX
+
+---
+-- FlippedY, Field of type bool
+-- @realm shared
+-- @bool FlippedY
+
+---
+-- IsHighlighted, Field of type bool
+-- @realm shared
+-- @bool IsHighlighted
+
+---
+-- WorldRect, Field of type Rectangle
+-- @realm shared
+-- @Rectangle WorldRect
+
+---
+-- Sprite, Field of type Sprite
+-- @realm shared
+-- @Sprite Sprite
+
+---
+-- DrawBelowWater, Field of type bool
+-- @realm shared
+-- @bool DrawBelowWater
+
+---
+-- DrawOverWater, Field of type bool
+-- @realm shared
+-- @bool DrawOverWater
+
+---
+-- AllowedLinks, Field of type table
+-- @realm shared
+-- @table AllowedLinks
+
+---
+-- ResizeHorizontal, Field of type bool
+-- @realm shared
+-- @bool ResizeHorizontal
+
+---
+-- ResizeVertical, Field of type bool
+-- @realm shared
+-- @bool ResizeVertical
+
+---
+-- RectWidth, Field of type number
+-- @realm shared
+-- @number RectWidth
+
+---
+-- RectHeight, Field of type number
+-- @realm shared
+-- @number RectHeight
+
+---
+-- SpriteDepthOverrideIsSet, Field of type bool
+-- @realm shared
+-- @bool SpriteDepthOverrideIsSet
+
+---
+-- SpriteOverrideDepth, Field of type number
+-- @realm shared
+-- @number SpriteOverrideDepth
+
+---
+-- SpriteDepth, Field of type number
+-- @realm shared
+-- @number SpriteDepth
+
+---
+-- Scale, Field of type number
+-- @realm shared
+-- @number Scale
+
+---
+-- HiddenInGame, Field of type bool
+-- @realm shared
+-- @bool HiddenInGame
+
+---
+-- Position, Field of type Vector2
+-- @realm shared
+-- @Vector2 Position
+
+---
+-- SimPosition, Field of type Vector2
+-- @realm shared
+-- @Vector2 SimPosition
+
+---
+-- SoundRange, Field of type number
+-- @realm shared
+-- @number SoundRange
+
+---
+-- SightRange, Field of type number
+-- @realm shared
+-- @number SightRange
+
+---
+-- RemoveIfLinkedOutpostDoorInUse, Field of type bool
+-- @realm shared
+-- @bool RemoveIfLinkedOutpostDoorInUse
+
+---
+-- Removed, Field of type bool
+-- @realm shared
+-- @bool Removed
+
+---
+-- IdFreed, Field of type bool
+-- @realm shared
+-- @bool IdFreed
+
+---
+-- WorldPosition, Field of type Vector2
+-- @realm shared
+-- @Vector2 WorldPosition
+
+---
+-- DrawPosition, Field of type Vector2
+-- @realm shared
+-- @Vector2 DrawPosition
+
+---
+-- Submarine, Field of type Submarine
+-- @realm shared
+-- @Submarine Submarine
+
+---
+-- AiTarget, Field of type AITarget
+-- @realm shared
+-- @AITarget AiTarget
+
+---
+-- InDetectable, Field of type bool
+-- @realm shared
+-- @bool InDetectable
+
+---
+-- SpawnTime, Field of type number
+-- @realm shared
+-- @number SpawnTime
+
+---
+-- properties, Field of type table
+-- @realm shared
+-- @table properties
+
+---
+-- Visible, Field of type bool
+-- @realm shared
+-- @bool Visible
+
+---
+-- ConnectedGaps, Field of type table
+-- @realm shared
+-- @table ConnectedGaps
+
+---
+-- OriginalAmbientLight, Field of type Nullable`1
+-- @realm shared
+-- @Nullable`1 OriginalAmbientLight
+
+---
+-- xBackgroundMax, Field of type number
+-- @realm shared
+-- @number xBackgroundMax
+
+---
+-- yBackgroundMax, Field of type number
+-- @realm shared
+-- @number yBackgroundMax
+
+---
+-- Hull.hullList, Field of type table
+-- @realm shared
+-- @table Hull.hullList
+
+---
+-- Hull.ShowHulls, Field of type bool
+-- @realm shared
+-- @bool Hull.ShowHulls
+
+---
+-- Hull.EditWater, Field of type bool
+-- @realm shared
+-- @bool Hull.EditWater
+
+---
+-- Hull.EditFire, Field of type bool
+-- @realm shared
+-- @bool Hull.EditFire
+
+---
+-- Hull.WaveStiffness, Field of type number
+-- @realm shared
+-- @number Hull.WaveStiffness
+
+---
+-- Hull.WaveSpread, Field of type number
+-- @realm shared
+-- @number Hull.WaveSpread
+
+---
+-- Hull.WaveDampening, Field of type number
+-- @realm shared
+-- @number Hull.WaveDampening
+
+---
+-- Hull.OxygenDistributionSpeed, Field of type number
+-- @realm shared
+-- @number Hull.OxygenDistributionSpeed
+
+---
+-- Hull.OxygenDeteriorationSpeed, Field of type number
+-- @realm shared
+-- @number Hull.OxygenDeteriorationSpeed
+
+---
+-- Hull.OxygenConsumptionSpeed, Field of type number
+-- @realm shared
+-- @number Hull.OxygenConsumptionSpeed
+
+---
+-- Hull.WaveWidth, Field of type number
+-- @realm shared
+-- @number Hull.WaveWidth
+
+---
+-- Hull.MaxCompress, Field of type number
+-- @realm shared
+-- @number Hull.MaxCompress
+
+---
+-- Hull.BackgroundSectionSize, Field of type number
+-- @realm shared
+-- @number Hull.BackgroundSectionSize
+
+---
+-- Hull.BackgroundSectionsPerNetworkEvent, Field of type number
+-- @realm shared
+-- @number Hull.BackgroundSectionsPerNetworkEvent
+
+---
+-- Hull.MaxDecalsPerHull, Field of type number
+-- @realm shared
+-- @number Hull.MaxDecalsPerHull
+
+---
+-- prefab, Field of type MapEntityPrefab
+-- @realm shared
+-- @MapEntityPrefab prefab
+
+---
+-- unresolvedLinkedToID, Field of type table
+-- @realm shared
+-- @table unresolvedLinkedToID
+
+---
+-- disallowedUpgrades, Field of type HashSet`1
+-- @realm shared
+-- @HashSet`1 disallowedUpgrades
+
+---
+-- linkedTo, Field of type table
+-- @realm shared
+-- @table linkedTo
+
+---
+-- ShouldBeSaved, Field of type bool
+-- @realm shared
+-- @bool ShouldBeSaved
+
+---
+-- ExternalHighlight, Field of type bool
+-- @realm shared
+-- @bool ExternalHighlight
+
+---
+-- OriginalModuleIndex, Field of type number
+-- @realm shared
+-- @number OriginalModuleIndex
+
+---
+-- OriginalContainerIndex, Field of type number
+-- @realm shared
+-- @number OriginalContainerIndex
+
+---
+-- ID, Field of type number
+-- @realm shared
+-- @number ID
+
diff --git a/docs/lua/generated/Level.lua b/docs/lua/generated/Level.lua
new file mode 100644
index 000000000..0479a8849
--- /dev/null
+++ b/docs/lua/generated/Level.lua
@@ -0,0 +1,551 @@
+-- luacheck: ignore 111
+
+--[[--
+Barotrauma.Level
+]]
+-- @code Level
+-- @pragma nostrip
+local Level = {}
+
+--- GenerateMissionResources
+-- @realm shared
+-- @tparam ItemPrefab prefab
+-- @tparam number requiredAmount
+-- @tparam Single& rotation
+-- @treturn table
+function GenerateMissionResources(prefab, requiredAmount, rotation) end
+
+--- GetRandomItemPos
+-- @realm shared
+-- @tparam PositionType spawnPosType
+-- @tparam number randomSpread
+-- @tparam number minDistFromSubs
+-- @tparam number offsetFromWall
+-- @tparam function filter
+-- @treturn Vector2
+function GetRandomItemPos(spawnPosType, randomSpread, minDistFromSubs, offsetFromWall, filter) end
+
+--- TryGetInterestingPositionAwayFromPoint
+-- @realm shared
+-- @tparam bool useSyncedRand
+-- @tparam PositionType positionType
+-- @tparam number minDistFromSubs
+-- @tparam Vector2& position
+-- @tparam Vector2 awayPoint
+-- @tparam number minDistFromPoint
+-- @tparam function filter
+-- @treturn bool
+function TryGetInterestingPositionAwayFromPoint(useSyncedRand, positionType, minDistFromSubs, position, awayPoint, minDistFromPoint, filter) end
+
+--- TryGetInterestingPosition
+-- @realm shared
+-- @tparam bool useSyncedRand
+-- @tparam PositionType positionType
+-- @tparam number minDistFromSubs
+-- @tparam Vector2& position
+-- @tparam function filter
+-- @treturn bool
+function TryGetInterestingPosition(useSyncedRand, positionType, minDistFromSubs, position, filter) end
+
+--- TryGetInterestingPosition
+-- @realm shared
+-- @tparam bool useSyncedRand
+-- @tparam PositionType positionType
+-- @tparam number minDistFromSubs
+-- @tparam Point& position
+-- @tparam Vector2 awayPoint
+-- @tparam number minDistFromPoint
+-- @tparam function filter
+-- @treturn bool
+function TryGetInterestingPosition(useSyncedRand, positionType, minDistFromSubs, position, awayPoint, minDistFromPoint, filter) end
+
+--- Update
+-- @realm shared
+-- @tparam number deltaTime
+-- @tparam Camera cam
+function Update(deltaTime, cam) end
+
+--- GetBottomPosition
+-- @realm shared
+-- @tparam number xPosition
+-- @treturn Vector2
+function GetBottomPosition(xPosition) end
+
+--- GetAllCells
+-- @realm shared
+-- @treturn table
+function GetAllCells() end
+
+--- GetCells
+-- @realm shared
+-- @tparam Vector2 worldPos
+-- @tparam number searchDepth
+-- @treturn table
+function GetCells(worldPos, searchDepth) end
+
+--- GetClosestCell
+-- @realm shared
+-- @tparam Vector2 worldPos
+-- @treturn VoronoiCell
+function GetClosestCell(worldPos) end
+
+--- GetWreckIDTag
+-- @realm shared
+-- @tparam string originalTag
+-- @tparam Submarine wreck
+-- @treturn string
+function GetWreckIDTag(originalTag, wreck) end
+
+--- IsCloseToStart
+-- @realm shared
+-- @tparam Vector2 position
+-- @tparam number minDist
+-- @treturn bool
+function IsCloseToStart(position, minDist) end
+
+--- IsCloseToEnd
+-- @realm shared
+-- @tparam Vector2 position
+-- @tparam number minDist
+-- @treturn bool
+function IsCloseToEnd(position, minDist) end
+
+--- IsCloseToStart
+-- @realm shared
+-- @tparam Point position
+-- @tparam number minDist
+-- @treturn bool
+function IsCloseToStart(position, minDist) end
+
+--- IsCloseToEnd
+-- @realm shared
+-- @tparam Point position
+-- @tparam number minDist
+-- @treturn bool
+function IsCloseToEnd(position, minDist) end
+
+--- PrepareBeaconStation
+-- @realm shared
+function PrepareBeaconStation() end
+
+--- CheckBeaconActive
+-- @realm shared
+-- @treturn bool
+function CheckBeaconActive() end
+
+--- SpawnCorpses
+-- @realm shared
+function SpawnCorpses() end
+
+--- SpawnNPCs
+-- @realm shared
+function SpawnNPCs() end
+
+--- GetRealWorldDepth
+-- @realm shared
+-- @tparam number worldPositionY
+-- @treturn number
+function GetRealWorldDepth(worldPositionY) end
+
+--- DebugSetStartLocation
+-- @realm shared
+-- @tparam Location newStartLocation
+function DebugSetStartLocation(newStartLocation) end
+
+--- DebugSetEndLocation
+-- @realm shared
+-- @tparam Location newEndLocation
+function DebugSetEndLocation(newEndLocation) end
+
+--- Remove
+-- @realm shared
+function Remove() end
+
+--- ServerWrite
+-- @realm shared
+-- @tparam IWriteMessage msg
+-- @tparam Client c
+-- @tparam Object[] extraData
+function ServerWrite(msg, c, extraData) end
+
+--- Generate
+-- @realm shared
+-- @tparam LevelData levelData
+-- @tparam bool mirror
+-- @tparam SubmarineInfo startOutpost
+-- @tparam SubmarineInfo endOutpost
+-- @treturn Level
+function Level.Generate(levelData, mirror, startOutpost, endOutpost) end
+
+--- GetTooCloseCells
+-- @realm shared
+-- @tparam Vector2 position
+-- @tparam number minDistance
+-- @treturn table
+function GetTooCloseCells(position, minDistance) end
+
+--- FreeID
+-- @realm shared
+function FreeID() end
+
+--- GetType
+-- @realm shared
+-- @treturn Type
+function GetType() end
+
+--- ToString
+-- @realm shared
+-- @treturn string
+function ToString() end
+
+--- Equals
+-- @realm shared
+-- @tparam Object obj
+-- @treturn bool
+function Equals(obj) end
+
+--- GetHashCode
+-- @realm shared
+-- @treturn number
+function GetHashCode() end
+
+---
+-- Level.Loaded, Field of type Level
+-- @realm shared
+-- @Level Level.Loaded
+
+---
+-- AbyssArea, Field of type Rectangle
+-- @realm shared
+-- @Rectangle AbyssArea
+
+---
+-- AbyssStart, Field of type number
+-- @realm shared
+-- @number AbyssStart
+
+---
+-- AbyssEnd, Field of type number
+-- @realm shared
+-- @number AbyssEnd
+
+---
+-- StartPosition, Field of type Vector2
+-- @realm shared
+-- @Vector2 StartPosition
+
+---
+-- StartExitPosition, Field of type Vector2
+-- @realm shared
+-- @Vector2 StartExitPosition
+
+---
+-- Size, Field of type Point
+-- @realm shared
+-- @Point Size
+
+---
+-- EndPosition, Field of type Vector2
+-- @realm shared
+-- @Vector2 EndPosition
+
+---
+-- EndExitPosition, Field of type Vector2
+-- @realm shared
+-- @Vector2 EndExitPosition
+
+---
+-- BottomPos, Field of type number
+-- @realm shared
+-- @number BottomPos
+
+---
+-- SeaFloorTopPos, Field of type number
+-- @realm shared
+-- @number SeaFloorTopPos
+
+---
+-- CrushDepth, Field of type number
+-- @realm shared
+-- @number CrushDepth
+
+---
+-- RealWorldCrushDepth, Field of type number
+-- @realm shared
+-- @number RealWorldCrushDepth
+
+---
+-- SeaFloor, Field of type LevelWall
+-- @realm shared
+-- @LevelWall SeaFloor
+
+---
+-- Ruins, Field of type table
+-- @realm shared
+-- @table Ruins
+
+---
+-- Wrecks, Field of type table
+-- @realm shared
+-- @table Wrecks
+
+---
+-- BeaconStation, Field of type Submarine
+-- @realm shared
+-- @Submarine BeaconStation
+
+---
+-- ExtraWalls, Field of type table
+-- @realm shared
+-- @table ExtraWalls
+
+---
+-- UnsyncedExtraWalls, Field of type table
+-- @realm shared
+-- @table UnsyncedExtraWalls
+
+---
+-- Tunnels, Field of type table
+-- @realm shared
+-- @table Tunnels
+
+---
+-- Caves, Field of type table
+-- @realm shared
+-- @table Caves
+
+---
+-- PositionsOfInterest, Field of type table
+-- @realm shared
+-- @table PositionsOfInterest
+
+---
+-- StartOutpost, Field of type Submarine
+-- @realm shared
+-- @Submarine StartOutpost
+
+---
+-- EndOutpost, Field of type Submarine
+-- @realm shared
+-- @Submarine EndOutpost
+
+---
+-- EqualityCheckValues, Field of type table
+-- @realm shared
+-- @table EqualityCheckValues
+
+---
+-- EntitiesBeforeGenerate, Field of type table
+-- @realm shared
+-- @table EntitiesBeforeGenerate
+
+---
+-- EntityCountBeforeGenerate, Field of type number
+-- @realm shared
+-- @number EntityCountBeforeGenerate
+
+---
+-- EntityCountAfterGenerate, Field of type number
+-- @realm shared
+-- @number EntityCountAfterGenerate
+
+---
+-- TopBarrier, Field of type Body
+-- @realm shared
+-- @Body TopBarrier
+
+---
+-- BottomBarrier, Field of type Body
+-- @realm shared
+-- @Body BottomBarrier
+
+---
+-- LevelObjectManager, Field of type LevelObjectManager
+-- @realm shared
+-- @LevelObjectManager LevelObjectManager
+
+---
+-- Generating, Field of type bool
+-- @realm shared
+-- @bool Generating
+
+---
+-- StartLocation, Field of type Location
+-- @realm shared
+-- @Location StartLocation
+
+---
+-- EndLocation, Field of type Location
+-- @realm shared
+-- @Location EndLocation
+
+---
+-- Mirrored, Field of type bool
+-- @realm shared
+-- @bool Mirrored
+
+---
+-- Seed, Field of type string
+-- @realm shared
+-- @string Seed
+
+---
+-- Difficulty, Field of type number
+-- @realm shared
+-- @number Difficulty
+
+---
+-- Type, Field of type LevelType
+-- @realm shared
+-- @LevelType Type
+
+---
+-- Level.IsLoadedOutpost, Field of type bool
+-- @realm shared
+-- @bool Level.IsLoadedOutpost
+
+---
+-- GenerationParams, Field of type LevelGenerationParams
+-- @realm shared
+-- @LevelGenerationParams GenerationParams
+
+---
+-- BackgroundTextureColor, Field of type Color
+-- @realm shared
+-- @Color BackgroundTextureColor
+
+---
+-- BackgroundColor, Field of type Color
+-- @realm shared
+-- @Color BackgroundColor
+
+---
+-- WallColor, Field of type Color
+-- @realm shared
+-- @Color WallColor
+
+---
+-- PathPoints, Field of type table
+-- @realm shared
+-- @table PathPoints
+
+---
+-- AbyssResources, Field of type table
+-- @realm shared
+-- @table AbyssResources
+
+---
+-- Removed, Field of type bool
+-- @realm shared
+-- @bool Removed
+
+---
+-- IdFreed, Field of type bool
+-- @realm shared
+-- @bool IdFreed
+
+---
+-- SimPosition, Field of type Vector2
+-- @realm shared
+-- @Vector2 SimPosition
+
+---
+-- Position, Field of type Vector2
+-- @realm shared
+-- @Vector2 Position
+
+---
+-- WorldPosition, Field of type Vector2
+-- @realm shared
+-- @Vector2 WorldPosition
+
+---
+-- DrawPosition, Field of type Vector2
+-- @realm shared
+-- @Vector2 DrawPosition
+
+---
+-- Submarine, Field of type Submarine
+-- @realm shared
+-- @Submarine Submarine
+
+---
+-- AiTarget, Field of type AITarget
+-- @realm shared
+-- @AITarget AiTarget
+
+---
+-- InDetectable, Field of type bool
+-- @realm shared
+-- @bool InDetectable
+
+---
+-- SpawnTime, Field of type number
+-- @realm shared
+-- @number SpawnTime
+
+---
+-- AbyssIslands, Field of type table
+-- @realm shared
+-- @table AbyssIslands
+
+---
+-- siteCoordsX, Field of type table
+-- @realm shared
+-- @table siteCoordsX
+
+---
+-- siteCoordsY, Field of type table
+-- @realm shared
+-- @table siteCoordsY
+
+---
+-- distanceField, Field of type table
+-- @realm shared
+-- @table distanceField
+
+---
+-- LevelData, Field of type LevelData
+-- @realm shared
+-- @LevelData LevelData
+
+---
+-- Level.ForcedDifficulty, Field of type Nullable`1
+-- @realm shared
+-- @Nullable`1 Level.ForcedDifficulty
+
+---
+-- Level.MaxEntityDepth, Field of type number
+-- @realm shared
+-- @number Level.MaxEntityDepth
+
+---
+-- Level.ShaftHeight, Field of type number
+-- @realm shared
+-- @number Level.ShaftHeight
+
+---
+-- Level.MaxSubmarineWidth, Field of type number
+-- @realm shared
+-- @number Level.MaxSubmarineWidth
+
+---
+-- Level.ExitDistance, Field of type number
+-- @realm shared
+-- @number Level.ExitDistance
+
+---
+-- Level.GridCellSize, Field of type number
+-- @realm shared
+-- @number Level.GridCellSize
+
+---
+-- Level.DefaultRealWorldCrushDepth, Field of type number
+-- @realm shared
+-- @number Level.DefaultRealWorldCrushDepth
+
+---
+-- ID, Field of type number
+-- @realm shared
+-- @number ID
+
diff --git a/docs/lua/generated/SubmarineInfo.lua b/docs/lua/generated/SubmarineInfo.lua
new file mode 100644
index 000000000..43a919e25
--- /dev/null
+++ b/docs/lua/generated/SubmarineInfo.lua
@@ -0,0 +1,308 @@
+-- luacheck: ignore 111
+
+--[[--
+Barotrauma.SubmarineInfo
+]]
+-- @code SubmarineInfo
+-- @pragma nostrip
+local SubmarineInfo = {}
+
+--- ToString
+-- @realm shared
+-- @treturn string
+function ToString() end
+
+--- Reload
+-- @realm shared
+function Reload() end
+
+--- Dispose
+-- @realm shared
+function Dispose() end
+
+--- IsVanillaSubmarine
+-- @realm shared
+-- @treturn bool
+function IsVanillaSubmarine() end
+
+--- StartHashDocTask
+-- @realm shared
+-- @tparam XDocument doc
+function StartHashDocTask(doc) end
+
+--- HasTag
+-- @realm shared
+-- @tparam SubmarineTag tag
+-- @treturn bool
+function HasTag(tag) end
+
+--- AddTag
+-- @realm shared
+-- @tparam SubmarineTag tag
+function AddTag(tag) end
+
+--- RemoveTag
+-- @realm shared
+-- @tparam SubmarineTag tag
+function RemoveTag(tag) end
+
+--- CheckSubsLeftBehind
+-- @realm shared
+-- @tparam XElement element
+function CheckSubsLeftBehind(element) end
+
+--- GetRealWorldCrushDepth
+-- @realm shared
+-- @treturn number
+function GetRealWorldCrushDepth() end
+
+--- GetRealWorldCrushDepthMultiplier
+-- @realm shared
+-- @treturn number
+function GetRealWorldCrushDepthMultiplier() end
+
+--- SaveAs
+-- @realm shared
+-- @tparam string filePath
+-- @tparam MemoryStream previewImage
+-- @treturn bool
+function SaveAs(filePath, previewImage) end
+
+--- AddToSavedSubs
+-- @realm shared
+-- @tparam SubmarineInfo subInfo
+function SubmarineInfo.AddToSavedSubs(subInfo) end
+
+--- RefreshSavedSub
+-- @realm shared
+-- @tparam string filePath
+function SubmarineInfo.RefreshSavedSub(filePath) end
+
+--- RefreshSavedSubs
+-- @realm shared
+function SubmarineInfo.RefreshSavedSubs() end
+
+--- OpenFile
+-- @realm shared
+-- @tparam string file
+-- @treturn XDocument
+function SubmarineInfo.OpenFile(file) end
+
+--- OpenFile
+-- @realm shared
+-- @tparam string file
+-- @tparam Exception& exception
+-- @treturn XDocument
+function SubmarineInfo.OpenFile(file, exception) end
+
+--- GetType
+-- @realm shared
+-- @treturn Type
+function GetType() end
+
+--- Equals
+-- @realm shared
+-- @tparam Object obj
+-- @treturn bool
+function Equals(obj) end
+
+--- GetHashCode
+-- @realm shared
+-- @treturn number
+function GetHashCode() end
+
+---
+-- SubmarineInfo.SavedSubmarines, Field of type Enumerable
+-- @realm shared
+-- @Enumerable SubmarineInfo.SavedSubmarines
+
+---
+-- Tags, Field of type SubmarineTag
+-- @realm shared
+-- @SubmarineTag Tags
+
+---
+-- EqualityCheckVal, Field of type number
+-- @realm shared
+-- @number EqualityCheckVal
+
+---
+-- Name, Field of type string
+-- @realm shared
+-- @string Name
+
+---
+-- DisplayName, Field of type string
+-- @realm shared
+-- @string DisplayName
+
+---
+-- Description, Field of type string
+-- @realm shared
+-- @string Description
+
+---
+-- Price, Field of type number
+-- @realm shared
+-- @number Price
+
+---
+-- InitialSuppliesSpawned, Field of type bool
+-- @realm shared
+-- @bool InitialSuppliesSpawned
+
+---
+-- GameVersion, Field of type Version
+-- @realm shared
+-- @Version GameVersion
+
+---
+-- Type, Field of type SubmarineType
+-- @realm shared
+-- @SubmarineType Type
+
+---
+-- OutpostModuleInfo, Field of type OutpostModuleInfo
+-- @realm shared
+-- @OutpostModuleInfo OutpostModuleInfo
+
+---
+-- IsOutpost, Field of type bool
+-- @realm shared
+-- @bool IsOutpost
+
+---
+-- IsWreck, Field of type bool
+-- @realm shared
+-- @bool IsWreck
+
+---
+-- IsBeacon, Field of type bool
+-- @realm shared
+-- @bool IsBeacon
+
+---
+-- IsPlayer, Field of type bool
+-- @realm shared
+-- @bool IsPlayer
+
+---
+-- IsRuin, Field of type bool
+-- @realm shared
+-- @bool IsRuin
+
+---
+-- IsCampaignCompatible, Field of type bool
+-- @realm shared
+-- @bool IsCampaignCompatible
+
+---
+-- IsCampaignCompatibleIgnoreClass, Field of type bool
+-- @realm shared
+-- @bool IsCampaignCompatibleIgnoreClass
+
+---
+-- MD5Hash, Field of type Md5Hash
+-- @realm shared
+-- @Md5Hash MD5Hash
+
+---
+-- CalculatingHash, Field of type bool
+-- @realm shared
+-- @bool CalculatingHash
+
+---
+-- Dimensions, Field of type Vector2
+-- @realm shared
+-- @Vector2 Dimensions
+
+---
+-- CargoCapacity, Field of type number
+-- @realm shared
+-- @number CargoCapacity
+
+---
+-- FilePath, Field of type string
+-- @realm shared
+-- @string FilePath
+
+---
+-- SubmarineElement, Field of type XElement
+-- @realm shared
+-- @XElement SubmarineElement
+
+---
+-- IsFileCorrupted, Field of type bool
+-- @realm shared
+-- @bool IsFileCorrupted
+
+---
+-- RequiredContentPackagesInstalled, Field of type bool
+-- @realm shared
+-- @bool RequiredContentPackagesInstalled
+
+---
+-- SubsLeftBehind, Field of type bool
+-- @realm shared
+-- @bool SubsLeftBehind
+
+---
+-- LeftBehindSubDockingPortOccupied, Field of type bool
+-- @realm shared
+-- @bool LeftBehindSubDockingPortOccupied
+
+---
+-- LastModifiedTime, Field of type DateTime
+-- @realm shared
+-- @DateTime LastModifiedTime
+
+---
+-- RecommendedCrewSizeMin, Field of type number
+-- @realm shared
+-- @number RecommendedCrewSizeMin
+
+---
+-- RecommendedCrewSizeMax, Field of type number
+-- @realm shared
+-- @number RecommendedCrewSizeMax
+
+---
+-- RecommendedCrewExperience, Field of type string
+-- @realm shared
+-- @string RecommendedCrewExperience
+
+---
+-- RequiredContentPackages, Field of type HashSet`1
+-- @realm shared
+-- @HashSet`1 RequiredContentPackages
+
+---
+-- SubmarineClass, Field of type SubmarineClass
+-- @realm shared
+-- @SubmarineClass SubmarineClass
+
+---
+-- LeftBehindDockingPortIDs, Field of type table
+-- @realm shared
+-- @table LeftBehindDockingPortIDs
+
+---
+-- BlockedDockingPortIDs, Field of type table
+-- @realm shared
+-- @table BlockedDockingPortIDs
+
+---
+-- OutpostGenerationParams, Field of type OutpostGenerationParams
+-- @realm shared
+-- @OutpostGenerationParams OutpostGenerationParams
+
+---
+-- OutpostNPCs, Field of type table
+-- @realm shared
+-- @table OutpostNPCs
+
+---
+-- SubmarineInfo.SavePath, Field of type string
+-- @realm shared
+-- @string SubmarineInfo.SavePath
+
diff --git a/docs/manual/getting-started.md b/docs/manual/getting-started.md
index 9830ebbb8..2bde81102 100644
--- a/docs/manual/getting-started.md
+++ b/docs/manual/getting-started.md
@@ -3,12 +3,14 @@
If you want to learn how Lua works and the syntax, you can check these websites: [https://www.lua.org/manual/5.2/](https://www.lua.org/manual/5.2/) [https://www.tutorialspoint.com/lua/lua_overview.htm](https://www.tutorialspoint.com/lua/lua_overview.htm)
## How mods are executed
-When the server finishes loading everything, Lua For Barotrauma starts up and reads the file `Lua/LuaSetup.lua` and executes it, this Lua script registers classes to be available on the C# side, creates static references and puts them in the global space, and then executes the mod's autorun folder. By default it only executes mods enabled in the settings menu, you can bypass that by editing the file `LuaSetup.lua` and setting `local runDisabledMods = false` to `local runDisabledMods = true`.
+When the server finishes loading everything, Lua For Barotrauma starts up and reads the file `Lua/LuaSetup.lua` and executes it, this Lua script registers classes to be available on the Lua side, creates static references and puts them in the global space, and then executes the mod's autorun folder. By default it only executes mods enabled in the settings menu, you can bypass that by editing the file `LuaSetup.lua` and setting `local runDisabledMods = false` to `local runDisabledMods = true`.
## Creating your first mod
-When creating a new Lua mod, you will need to create a new folder on the **Mods** folder, then inside this folder you will need to create a folder called **Lua**, and then inside the Lua folder you create a folder called **Autorun**, inside this folder you can add your lua scripts that will be executed automatically, it will look something like this `Mods/MyMod/Lua/Autorun/test.lua`, remember that if you are using the default LuaSetup settings, your mod will only be executed if its enabled in the game's settings, so you will need to create a `filelist.xml` as unusual.
+When creating a new Lua mod, you will need to create a new folder on the **Mods** folder, then inside this folder you will need to create a folder called **Lua**, and then inside the Lua folder you create a folder called **Autorun**, inside this folder you can add your Lua scripts that will be executed automatically, it will look something like this `Mods/MyMod/Lua/Autorun/test.lua`, remember that if you are using the default LuaSetup settings, your mod will only be executed if its enabled in the game's settings, so you will need to create a `filelist.xml` as unusual.
Now you can open **test.lua** in your favorite text editor (vscode recommended) and type in **print("Hello, world")**, now start the server by hosting a game or running the server executable manually, you will see in your console a text appear with the text that you entered in print, you can now type in the server console `reloadlua`, this will re-execute all the Lua scripts. You can also type in `lua yourscript` to run a short lua snippet, like this `lua print('Hello, world')`, remember to remove double quotes, because Barotrauma console automatically formats those.
## Learning the libraries
-In the sidebar of the documentation, you can see a tab named Code, in there you can check out all the functions and fields that each class has, each one of them has a box with a color on it, where means Server-Side, means Client-Side and means both Server-Side and Client-Side, by clicking on them you can learn more about them. Not everything is documented here, theres stuff missing that still needs to be added, if you want to find more in-depth functions and fields in the Barotrauma classes, you should check the Barotrauma source code.
\ No newline at end of file
+In the sidebar of the documentation, you can see a tab named Code, in there you can check out all the functions and fields that each class has, each one of them has a box with a color on it, where means Server-Side, means Client-Side and means both Server-Side and Client-Side, by clicking on them you can learn more about them. Not everything is documented here, theres stuff missing that still needs to be added, if you want to find more in-depth functions and fields in the Barotrauma classes, you should check the Barotrauma source code.
+
+See Lua Examples, Common Questions
\ No newline at end of file
diff --git a/docs/manual/installing-lua-for-barotrauma-manually.md b/docs/manual/installing-lua-for-barotrauma-manually.md
index 32f0092ed..12e32842b 100644
--- a/docs/manual/installing-lua-for-barotrauma-manually.md
+++ b/docs/manual/installing-lua-for-barotrauma-manually.md
@@ -1,17 +1,18 @@
## Installing Lua For Barotrauma
1 - Download [latest version of Barotrauma Lua](https://github.com/evilfactory/Barotrauma-lua-attempt/releases/download/latest/barotrauma_lua_windows.zip)
-2 - Extract the zip file, you should get a folder called barotrauma_lua
+2 - Extract the zip file
3 - Find the Content folder in your original Barotrauma game:



-4 - Copy the Content folder to the barotrauma_lua folder
+4 - Copy the Content folder to the extracted folder

5 - Done! Now run Barotrauma.exe to run the modded game
-## Updating
-To update you only need to replace the DedicatedServer.dll file from the latest release.
+
+### Dedicated Servers
+For dedicated servers, it should be the same steps as before, just instead you execute DedicatedServer.exe
diff --git a/docs/manual/lua-examples.md b/docs/manual/lua-examples.md
index 407fa2b3a..6f32e2030 100644
--- a/docs/manual/lua-examples.md
+++ b/docs/manual/lua-examples.md
@@ -61,23 +61,6 @@ Hook.Add("chatMessage", "discordIntegration", function (msg, client)
end)
```
-```lua
-local enabledPackages = Game.GetEnabledContentPackages()
-local shouldRun = false
-
-for key, value in pairs(enabledPackages) do
- if value.Name == "MyContentPackage" then
- shouldRun = true
- end
-end
-
-if Game.IsDedicated then shouldRun = true end
-
-if not shouldRun then
- return
-end
-```
-
```lua
-- by jimmyl
Hook.Add("chatMessage","controlhuskcommand",function(msg, client)