diff --git a/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaDocs.cs b/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaDocs.cs new file mode 100644 index 000000000..408f5e676 --- /dev/null +++ b/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaDocs.cs @@ -0,0 +1,151 @@ +using System; +using System.Collections.Generic; +using System.Text; +using MoonSharp.Interpreter; +using Microsoft.Xna.Framework; +using Barotrauma.Networking; +using System.Threading.Tasks; +using Barotrauma.Items.Components; +using System.IO; +using System.Net; +using System.Linq; +using System.Xml.Linq; +using System.Reflection; + +namespace Barotrauma +{ + + public static class LuaDocs + { + + public static string ConvertTypeName(string type) + { + switch (type) + { + case "Boolean": + return "bool"; + case "String": + return "string"; + case "int": + return "number"; + case "Single": + return "number"; + case "Double": + return "number"; + case "float": + return "number"; + case "UInt16": + return "number"; + case "UInt32": + return "number"; + case "UInt64": + return "number"; + case "Int32": + return "number"; + case "List`1": + return "table"; + case "Dictionary`2": + return "table"; + } + + return type; + } + + public static void GenerateDocs(Type type) + { + var sb = new StringBuilder(); + + var members = type.GetMembers(); + + foreach(var member in members) + { + Console.WriteLine("'{0}' is a {1}", member.Name, member.MemberType); + + if (member.MemberType == MemberTypes.Method) + { + var method = (MethodInfo)member; + + if (method.Name.StartsWith("get_") || method.Name.StartsWith("set_")) + continue; + + sb.Append($"--- {method.Name}\n"); + sb.Append($"-- @realm shared\n"); + + var paramNames = ""; + + var parameters = method.GetParameters(); + for(var i=0; i < parameters.Length; i++) + { + var parameter = parameters[i]; + + if(i == parameters.Length - 1) + paramNames = paramNames + parameter.Name; + else + paramNames = paramNames + parameter.Name + ", "; + + sb.Append($"-- @tparam {ConvertTypeName(parameter.ParameterType.Name)} {parameter.Name}\n"); + } + + if (method.ReturnType != typeof(void)) + { + sb.Append($"-- @treturn {ConvertTypeName(method.ReturnType.Name)}\n"); + } + + if (method.IsStatic) + sb.Append($"function {type.Name}.{method.Name}({paramNames})"); + else + sb.Append($"function {method.Name}({paramNames})"); + sb.Append(" end\n"); + + sb.Append("\n"); + } + + if (member.MemberType == MemberTypes.Field) + { + var field = (FieldInfo)member; + + sb.Append($"---\n"); + sb.Append($"-- "); + + var name = field.Name; + + var returnName = ConvertTypeName(field.FieldType.Name); + + if (field.IsStatic) + name = type.Name + "." + field.Name; + + sb.Append(name); + sb.Append($", Field of type {returnName}\n"); + sb.Append($"-- @realm shared\n"); + sb.Append($"-- @{returnName} {name}\n"); + + sb.Append("\n"); + } + + if (member.MemberType == MemberTypes.Property) + { + var property = (PropertyInfo)member; + + sb.Append($"---\n"); + sb.Append($"-- "); + + var name = property.Name; + + var returnName = ConvertTypeName(property.PropertyType.Name); + + if (property.GetGetMethod().IsStatic) + name = type.Name + "." + property.Name; + + sb.Append(name); + sb.Append($", Field of type {returnName}\n"); + sb.Append($"-- @realm shared\n"); + sb.Append($"-- @{returnName} {name}\n"); + + sb.Append("\n"); + } + } + + File.WriteAllText("luadocs.lua", sb.ToString()); + } + } +} \ No newline at end of file diff --git a/docs/lua/Character.lua b/docs/lua/Character.lua index a00d75795..3820a0564 100644 --- a/docs/lua/Character.lua +++ b/docs/lua/Character.lua @@ -35,259 +35,1412 @@ function TeleportTo(position) end -- @realm shared -- @Character Character.CharacterList +--------- AUTO DOCS ------------ +--- GetVisibleHulls +-- @realm shared +-- @treturn table +function GetVisibleHulls() end + +--- GetRelativeSimPosition +-- @realm shared +-- @tparam ISpatialEntity target +-- @tparam Nullable`1 worldPos +-- @treturn Vector2 +function GetRelativeSimPosition(target, worldPos) end + +--- HasJob +-- @realm shared +-- @tparam string identifier +-- @treturn bool +function HasJob(identifier) end + +--- IsProtectedFromPressure +-- @realm shared +-- @treturn bool +function IsProtectedFromPressure() end + +--- ResetNetState +-- @realm shared +function ResetNetState() end + +--- StackHealthMultiplier +-- @realm shared +-- @tparam number val +function StackHealthMultiplier(val) end + +--- AddStaticHealthMultiplier +-- @realm shared +-- @tparam number newMultiplier +function AddStaticHealthMultiplier(newMultiplier) end + +--- GetTemporarySpeedReduction +-- @realm shared +-- @treturn number +function GetTemporarySpeedReduction() end + +--- GetRightHandPenalty +-- @realm shared +-- @treturn number +function GetRightHandPenalty() end + +--- GetLeftHandPenalty +-- @realm shared +-- @treturn number +function GetLeftHandPenalty() end + +--- GetLegPenalty +-- @realm shared +-- @tparam number startSum +-- @treturn number +function GetLegPenalty(startSum) end + +--- ApplyTemporarySpeedLimits +-- @realm shared +-- @tparam number speed +-- @treturn number +function ApplyTemporarySpeedLimits(speed) end + +--- Control +-- @realm shared +-- @tparam number deltaTime +-- @tparam Camera cam +function Control(deltaTime, cam) end + +--- SetAttackTarget +-- @realm shared +-- @tparam Limb attackLimb +-- @tparam IDamageable damageTarget +-- @tparam Vector2 attackPos +function SetAttackTarget(attackLimb, damageTarget, attackPos) end + +--- CanSeeCharacter +-- @realm shared +-- @tparam Character target +-- @treturn bool +function CanSeeCharacter(target) end + +--- CanSeeTarget +-- @realm shared +-- @tparam ISpatialEntity target +-- @tparam ISpatialEntity seeingEntity +-- @treturn bool +function CanSeeTarget(target, seeingEntity) end + +--- IsFacing +-- @realm shared +-- @tparam Vector2 targetWorldPos +-- @treturn bool +function IsFacing(targetWorldPos) end + +--- HasItem +-- @realm shared +-- @tparam Item item +-- @tparam bool requireEquipped +-- @tparam Nullable`1 slotType +-- @treturn bool +function HasItem(item, requireEquipped, slotType) end + +--- HasEquippedItem +-- @realm shared +-- @tparam Item item +-- @tparam Nullable`1 slotType +-- @treturn bool +function HasEquippedItem(item, slotType) end + +--- HasEquippedItem +-- @realm shared +-- @tparam string tagOrIdentifier +-- @tparam bool allowBroken +-- @tparam Nullable`1 slotType +-- @treturn bool +function HasEquippedItem(tagOrIdentifier, allowBroken, slotType) end + +--- GetEquippedItem +-- @realm shared +-- @tparam string tagOrIdentifier +-- @tparam Nullable`1 slotType +-- @treturn Item +function GetEquippedItem(tagOrIdentifier, slotType) end + +--- CanAccessInventory +-- @realm shared +-- @tparam Inventory inventory +-- @treturn bool +function CanAccessInventory(inventory) end + +--- FindItem +-- @realm shared +-- @tparam Int32& itemIndex +-- @tparam Item& targetItem +-- @tparam IEnumerable`1 identifiers +-- @tparam bool ignoreBroken +-- @tparam IEnumerable`1 ignoredItems +-- @tparam IEnumerable`1 ignoredContainerIdentifiers +-- @tparam Func`2 customPredicate +-- @tparam Func`2 customPriorityFunction +-- @tparam number maxItemDistance +-- @tparam ISpatialEntity positionalReference +-- @treturn bool +function FindItem(itemIndex, targetItem, identifiers, ignoreBroken, ignoredItems, ignoredContainerIdentifiers, customPredicate, customPriorityFunction, maxItemDistance, positionalReference) end + +--- IsItemTakenBySomeoneElse +-- @realm shared +-- @tparam Item item +-- @treturn bool +function IsItemTakenBySomeoneElse(item) end + +--- CanInteractWith +-- @realm shared +-- @tparam Character c +-- @tparam number maxDist +-- @tparam bool checkVisibility +-- @tparam bool skipDistanceCheck +-- @treturn bool +function CanInteractWith(c, maxDist, checkVisibility, skipDistanceCheck) end + +--- CanInteractWith +-- @realm shared +-- @tparam Item item +-- @tparam bool checkLinked +-- @treturn bool +function CanInteractWith(item, checkLinked) end + +--- CanInteractWith +-- @realm shared +-- @tparam Item item +-- @tparam Single& distanceToItem +-- @tparam bool checkLinked +-- @treturn bool +function CanInteractWith(item, distanceToItem, checkLinked) end + +--- SetCustomInteract +-- @realm shared +-- @tparam Action`2 onCustomInteract +-- @tparam string hudText +function SetCustomInteract(onCustomInteract, hudText) end + +--- SelectCharacter +-- @realm shared +-- @tparam Character character +function SelectCharacter(character) end + +--- DeselectCharacter +-- @realm shared +function DeselectCharacter() end + +--- DoInteractionUpdate +-- @realm shared +-- @tparam number deltaTime +-- @tparam Vector2 mouseSimPos +function DoInteractionUpdate(deltaTime, mouseSimPos) end + +--- UpdateAnimAll +-- @realm shared +-- @tparam number deltaTime +function Character.UpdateAnimAll(deltaTime) end + +--- UpdateAll +-- @realm shared +-- @tparam number deltaTime +-- @tparam Camera cam +function Character.UpdateAll(deltaTime, cam) end + +--- Update +-- @realm shared +-- @tparam number deltaTime +-- @tparam Camera cam +function Update(deltaTime, cam) end + +--- AddAttacker +-- @realm shared +-- @tparam Character character +-- @tparam number damage +function AddAttacker(character, damage) end + +--- ForgiveAttacker +-- @realm shared +-- @tparam Character character +function ForgiveAttacker(character) end + +--- DespawnNow +-- @realm shared +-- @tparam bool createNetworkEvents +function DespawnNow(createNetworkEvents) end + +--- RemoveByPrefab +-- @realm shared +-- @tparam CharacterPrefab prefab +function Character.RemoveByPrefab(prefab) end + +--- CanHearCharacter +-- @realm shared +-- @tparam Character speaker +-- @treturn bool +function CanHearCharacter(speaker) end + +--- SetOrder +-- @realm shared +-- @tparam Order order +-- @tparam string orderOption +-- @tparam number priority +-- @tparam Character orderGiver +-- @tparam bool speak +-- @tparam bool force +function SetOrder(order, orderOption, priority, orderGiver, speak, force) end + +--- SetOrder +-- @realm shared +-- @tparam OrderInfo orderInfo +-- @tparam Character orderGiver +-- @tparam bool speak +-- @tparam bool force +function SetOrder(orderInfo, orderGiver, speak, force) end + +--- GetCurrentOrderWithTopPriority +-- @realm shared +-- @treturn Nullable`1 +function GetCurrentOrderWithTopPriority() end + +--- GetCurrentOrder +-- @realm shared +-- @tparam Order order +-- @tparam string option +-- @treturn Nullable`1 +function GetCurrentOrder(order, option) end + +--- DisableLine +-- @realm shared +-- @tparam string identifier +function DisableLine(identifier) end + +--- Speak +-- @realm shared +-- @tparam string message +-- @tparam Nullable`1 messageType +-- @tparam number delay +-- @tparam string identifier +-- @tparam number minDurationBetweenSimilar +function Speak(message, messageType, delay, identifier, minDurationBetweenSimilar) end + +--- ShowSpeechBubble +-- @realm shared +-- @tparam number duration +-- @tparam Color color +function ShowSpeechBubble(duration, color) end + +--- SetAllDamage +-- @realm shared +-- @tparam number damageAmount +-- @tparam number bleedingDamageAmount +-- @tparam number burnDamageAmount +function SetAllDamage(damageAmount, bleedingDamageAmount, burnDamageAmount) end + +--- AddDamage +-- @realm shared +-- @tparam Character attacker +-- @tparam Vector2 worldPosition +-- @tparam Attack attack +-- @tparam number deltaTime +-- @tparam bool playSound +-- @treturn AttackResult +function AddDamage(attacker, worldPosition, attack, deltaTime, playSound) end + +--- ApplyAttack +-- @realm shared +-- @tparam Character attacker +-- @tparam Vector2 worldPosition +-- @tparam Attack attack +-- @tparam number deltaTime +-- @tparam bool playSound +-- @tparam Limb targetLimb +-- @tparam number penetration +-- @treturn AttackResult +function ApplyAttack(attacker, worldPosition, attack, deltaTime, playSound, targetLimb, penetration) end + +--- TrySeverLimbJoints +-- @realm shared +-- @tparam Limb targetLimb +-- @tparam number severLimbsProbability +-- @tparam number damage +-- @tparam bool allowBeheading +function TrySeverLimbJoints(targetLimb, severLimbsProbability, damage, allowBeheading) end + +--- AddDamage +-- @realm shared +-- @tparam Vector2 worldPosition +-- @tparam IEnumerable`1 afflictions +-- @tparam number stun +-- @tparam bool playSound +-- @tparam number attackImpulse +-- @tparam Character attacker +-- @treturn AttackResult +function AddDamage(worldPosition, afflictions, stun, playSound, attackImpulse, attacker) end + +--- AddDamage +-- @realm shared +-- @tparam Vector2 worldPosition +-- @tparam IEnumerable`1 afflictions +-- @tparam number stun +-- @tparam bool playSound +-- @tparam number attackImpulse +-- @tparam Limb& hitLimb +-- @tparam Character attacker +-- @tparam number damageMultiplier +-- @treturn AttackResult +function AddDamage(worldPosition, afflictions, stun, playSound, attackImpulse, hitLimb, attacker, damageMultiplier) end + +--- RecordKill +-- @realm shared +-- @tparam Character target +function RecordKill(target) end + +--- AddEncounter +-- @realm shared +-- @tparam Character other +function AddEncounter(other) end + +--- DamageLimb +-- @realm shared +-- @tparam Vector2 worldPosition +-- @tparam Limb hitLimb +-- @tparam IEnumerable`1 afflictions +-- @tparam number stun +-- @tparam bool playSound +-- @tparam number attackImpulse +-- @tparam Character attacker +-- @tparam number damageMultiplier +-- @tparam bool allowStacking +-- @tparam number penetration +-- @treturn AttackResult +function DamageLimb(worldPosition, hitLimb, afflictions, stun, playSound, attackImpulse, attacker, damageMultiplier, allowStacking, penetration) end + +--- TryAdjustAttackerSkill +-- @realm shared +-- @tparam Character attacker +-- @tparam number healthChange +function TryAdjustAttackerSkill(attacker, healthChange) end + +--- SetStun +-- @realm shared +-- @tparam number newStun +-- @tparam bool allowStunDecrease +-- @tparam bool isNetworkMessage +function SetStun(newStun, allowStunDecrease, isNetworkMessage) end + +--- ApplyStatusEffects +-- @realm shared +-- @tparam ActionType actionType +-- @tparam number deltaTime +function ApplyStatusEffects(actionType, deltaTime) end + +--- BreakJoints +-- @realm shared +function BreakJoints() end + +--- Kill +-- @realm shared +-- @tparam CauseOfDeathType causeOfDeath +-- @tparam Affliction causeOfDeathAffliction +-- @tparam bool isNetworkMessage +-- @tparam bool log +function Kill(causeOfDeath, causeOfDeathAffliction, isNetworkMessage, log) end + +--- Revive +-- @realm shared +function Revive() end + +--- Remove +-- @realm shared +function Remove() end + +--- SaveInventory +-- @realm shared +-- @tparam Inventory inventory +-- @tparam XElement parentElement +function Character.SaveInventory(inventory, parentElement) end + +--- SaveInventory +-- @realm shared +function SaveInventory() end + +--- SpawnInventoryItems +-- @realm shared +-- @tparam Inventory inventory +-- @tparam XElement itemData +function SpawnInventoryItems(inventory, itemData) end + +--- GetAttackContexts +-- @realm shared +-- @treturn IEnumerable`1 +function GetAttackContexts() end + +--- Create +-- @realm shared +-- @tparam CharacterInfo characterInfo +-- @tparam Vector2 position +-- @tparam string seed +-- @tparam number id +-- @tparam bool isRemotePlayer +-- @tparam bool hasAi +-- @tparam RagdollParams ragdoll +-- @treturn Character +function Character.Create(characterInfo, position, seed, id, isRemotePlayer, hasAi, ragdoll) end + +--- Create +-- @realm shared +-- @tparam string speciesName +-- @tparam Vector2 position +-- @tparam string seed +-- @tparam CharacterInfo characterInfo +-- @tparam number id +-- @tparam bool isRemotePlayer +-- @tparam bool hasAi +-- @tparam bool createNetworkEvent +-- @tparam RagdollParams ragdoll +-- @treturn Character +function Character.Create(speciesName, position, seed, characterInfo, id, isRemotePlayer, hasAi, createNetworkEvent, ragdoll) end + +--- ReloadHead +-- @realm shared +-- @tparam Nullable`1 headId +-- @tparam number hairIndex +-- @tparam number beardIndex +-- @tparam number moustacheIndex +-- @tparam number faceAttachmentIndex +function ReloadHead(headId, hairIndex, beardIndex, moustacheIndex, faceAttachmentIndex) end + +--- LoadHeadAttachments +-- @realm shared +function LoadHeadAttachments() end + +--- IsKeyHit +-- @realm shared +-- @tparam InputType inputType +-- @treturn bool +function IsKeyHit(inputType) end + +--- IsKeyDown +-- @realm shared +-- @tparam InputType inputType +-- @treturn bool +function IsKeyDown(inputType) end + +--- SetInput +-- @realm shared +-- @tparam InputType inputType +-- @tparam bool hit +-- @tparam bool held +function SetInput(inputType, hit, held) end + +--- ClearInput +-- @realm shared +-- @tparam InputType inputType +function ClearInput(inputType) end + +--- ClearInputs +-- @realm shared +function ClearInputs() end + +--- ToString +-- @realm shared +-- @treturn string +function ToString() end + +--- GiveJobItems +-- @realm shared +-- @tparam WayPoint spawnPoint +function GiveJobItems(spawnPoint) end + +--- GiveIdCardTags +-- @realm shared +-- @tparam WayPoint spawnPoint +function GiveIdCardTags(spawnPoint) end + +--- GetSkillLevel +-- @realm shared +-- @tparam string skillIdentifier +-- @treturn number +function GetSkillLevel(skillIdentifier) end + +--- GetTargetMovement +-- @realm shared +-- @treturn Vector2 +function GetTargetMovement() end + +--- ApplyMovementLimits +-- @realm shared +-- @tparam Vector2 targetMovement +-- @tparam number currentSpeed +-- @treturn Vector2 +function ApplyMovementLimits(targetMovement, currentSpeed) end + +--- StackSpeedMultiplier +-- @realm shared +-- @tparam number val +function StackSpeedMultiplier(val) end + +--- ResetSpeedMultiplier +-- @realm shared +function ResetSpeedMultiplier() end + +--- GetPositionUpdateInterval +-- @realm shared +-- @tparam Client recipient +-- @treturn number +function GetPositionUpdateInterval(recipient) end + +--- ServerRead +-- @realm shared +-- @tparam ClientNetObject type +-- @tparam IReadMessage msg +-- @tparam Client c +function ServerRead(type, msg, c) end + +--- ServerWrite +-- @realm shared +-- @tparam IWriteMessage msg +-- @tparam Client c +-- @tparam Object[] extraData +function ServerWrite(msg, c, extraData) end + +--- WriteSpawnData +-- @realm shared +-- @tparam IWriteMessage msg +-- @tparam number entityId +-- @tparam bool restrictMessageSize +function WriteSpawnData(msg, entityId, restrictMessageSize) end + +--- SetOriginalTeam +-- @realm shared +-- @tparam CharacterTeamType newTeam +function SetOriginalTeam(newTeam) end + +--- HasTeamChange +-- @realm shared +-- @tparam string identifier +-- @treturn bool +function HasTeamChange(identifier) end + +--- TryAddNewTeamChange +-- @realm shared +-- @tparam string identifier +-- @tparam ActiveTeamChange newTeamChange +-- @treturn bool +function TryAddNewTeamChange(identifier, newTeamChange) end + +--- TryRemoveTeamChange +-- @realm shared +-- @tparam string identifier +-- @treturn bool +function TryRemoveTeamChange(identifier) end + +--- UpdateTeam +-- @realm shared +function UpdateTeam() end + +--- FreeID +-- @realm shared +function FreeID() 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 --- --- IsRemotelyControlled, returns a bool. +-- Enabled, Field of type bool +-- @realm shared +-- @bool Enabled + +--- +-- IsRemotelyControlled, Field of type bool -- @realm shared -- @bool IsRemotelyControlled --- --- IsObserving, returns a bool. +-- IsRemotePlayer, Field of type bool -- @realm shared --- @bool IsObserving +-- @bool IsRemotePlayer --- --- IsBot, returns a bool. +-- IsLocalPlayer, Field of type bool +-- @realm shared +-- @bool IsLocalPlayer + +--- +-- IsPlayer, Field of type bool +-- @realm shared +-- @bool IsPlayer + +--- +-- IsCommanding, Field of type bool +-- @realm shared +-- @bool IsCommanding + +--- +-- IsBot, Field of type bool -- @realm shared -- @bool IsBot --- --- IsDead, returns a bool. +-- IsEscorted, Field of type bool -- @realm shared --- @bool IsDead +-- @bool IsEscorted --- --- IsHuman, returns a bool. +-- SerializableProperties, Field of type table -- @realm shared --- @bool IsHuman +-- @table SerializableProperties --- --- IsMale, returns a bool. +-- Keys, Field of type Key[] -- @realm shared --- @bool IsMale +-- @Key[] Keys --- --- IsFemale, returns a bool. +-- TeamID, Field of type CharacterTeamType -- @realm shared --- @bool IsFemale +-- @CharacterTeamType TeamID --- --- CanSpeak, returns a bool. +-- IsOnPlayerTeam, Field of type bool +-- @realm shared +-- @bool IsOnPlayerTeam + +--- +-- IsInstigator, Field of type bool +-- @realm shared +-- @bool IsInstigator + +--- +-- LastAttackers, Field of type IEnumerable`1 +-- @realm shared +-- @IEnumerable`1 LastAttackers + +--- +-- LastAttacker, Field of type Character +-- @realm shared +-- @Character LastAttacker + +--- +-- SpeciesName, Field of type string +-- @realm shared +-- @string SpeciesName + +--- +-- IsHumanoid, Field of type bool +-- @realm shared +-- @bool IsHumanoid + +--- +-- IsHusk, Field of type bool +-- @realm shared +-- @bool IsHusk + +--- +-- BloodDecalName, Field of type string +-- @realm shared +-- @string BloodDecalName + +--- +-- CanSpeak, Field of type bool -- @realm shared -- @bool CanSpeak --- --- NeedsAir, returns a bool. +-- NeedsAir, Field of type bool -- @realm shared -- @bool NeedsAir --- --- NeedsWater, returns a bool. +-- NeedsWater, Field of type bool -- @realm shared -- @bool NeedsWater --- --- NeedsOxygen, returns a bool. +-- NeedsOxygen, Field of type bool -- @realm shared -- @bool NeedsOxygen --- --- IsTraitor, returns a bool. +-- Noise, Field of type number +-- @realm shared +-- @number Noise + +--- +-- Visibility, Field of type number +-- @realm shared +-- @number Visibility + +--- +-- IsTraitor, Field of type bool -- @realm shared -- @bool IsTraitor --- --- HideFace, returns a bool. +-- IsHuman, Field of type bool -- @realm shared --- @bool HideFace +-- @bool IsHuman --- --- LockHands, returns a bool. +-- IsMale, Field of type bool -- @realm shared --- @bool LockHands +-- @bool IsMale --- --- CanMove, returns a bool. +-- IsFemale, Field of type bool -- @realm shared --- @bool CanMove +-- @bool IsFemale --- --- CanInteract, returns a bool. +-- CurrentOrders, Field of type table -- @realm shared --- @bool CanInteract +-- @table CurrentOrders --- --- ObstructVision, returns a bool. +-- IsDismissed, Field of type bool -- @realm shared --- @bool ObstructVision +-- @bool IsDismissed --- --- IsRagdolled, returns a bool. +-- ViewTarget, Field of type Entity -- @realm shared --- @bool IsRagdolled +-- @Entity ViewTarget --- --- IsIncapacitated, returns a bool. +-- AimRefPosition, Field of type Vector2 -- @realm shared --- @bool IsIncapacitated +-- @Vector2 AimRefPosition --- --- IsUnconscious, returns a bool. +-- Info, Field of type CharacterInfo -- @realm shared --- @bool IsUnconscious +-- @CharacterInfo Info --- --- IsPet, returns a bool. +-- VariantOf, Field of type string -- @realm shared --- @bool IsPet +-- @string VariantOf --- --- UseHullOxygen, returns a bool. --- @realm shared --- @bool UseHullOxygen - ---- --- CanBeSelected, returns a bool. --- @realm shared --- @bool CanBeSelected - ---- --- CanBeDragged, returns a bool. --- @realm shared --- @bool CanBeDragged - ---- --- CanInventoryBeAccessed, returns a bool. --- @realm shared --- @bool CanInventoryBeAccessed - ---- --- GodMode, returns a bool. --- @realm shared --- @bool GodMode - ---- --- IsInFriendlySub, returns a bool. --- @realm shared --- @bool IsInFriendlySub - ---- --- WorldPosition, Vector2 position of the Character in the world --- @realm shared --- @Vector2 WorldPosition - ---- --- Position, returns a Vector2. --- @realm shared --- @Vector2 Position - ---- --- DrawPosition, returns a Vector2. --- @realm shared --- @Vector2 DrawPosition - ---- --- CursorPosition, returns a Vector2. --- @realm shared --- @Vector2 CursorPosition - ---- --- SmoothedCursorPosition, returns a Vector2. --- @realm shared --- @Vector2 SmoothedCursorPosition - ---- --- CursorWorldPosition, returns a Vector2. --- @realm shared --- @Vector2 CursorWorldPosition - ---- --- LowPassMultiplier, returns a number. --- @realm shared --- @number LowPassMultiplier - ---- --- Oxygen, returns a number. --- @realm shared --- @number Oxygen - ---- --- OxygenAvailable, returns a number. --- @realm shared --- @number OxygenAvailable - ---- --- Stun, returns a number. --- @realm shared --- @number Stun - ---- --- Vitality, returns a number. --- @realm shared --- @number Vitality - ---- --- MaxVitality, returns a number. --- @realm shared --- @number MaxVitality - ---- --- Health, returns a number. --- @realm shared --- @number Health - ---- --- HealthPercentage, returns a number. --- @realm shared --- @number HealthPercentage - ---- --- SpeechImpediment, returns a number. --- @realm shared --- @number SpeechImpediment - ---- --- PressureTimer, returns a number. --- @realm shared --- @number PressureTimer - ---- --- CurrentSpeed, returns a number. --- @realm shared --- @number CurrentSpeed - ---- --- FocusedItem, returns a Item. --- @realm shared --- @Item FocusedItem - ---- --- PickingItem, returns a Item. --- @realm shared --- @Item PickingItem - ---- --- Name, returns a string. +-- Name, Field of type string -- @realm shared -- @string Name --- --- DisplayName, returns a string. +-- DisplayName, Field of type string -- @realm shared -- @string DisplayName --- --- LogName, returns a string. +-- LogName, Field of type string -- @realm shared -- @string LogName --- --- Inventory, returns a CharacterInventory. +-- HideFace, Field of type bool +-- @realm shared +-- @bool HideFace + +--- +-- ConfigPath, Field of type string +-- @realm shared +-- @string ConfigPath + +--- +-- Mass, Field of type number +-- @realm shared +-- @number Mass + +--- +-- Inventory, Field of type CharacterInventory -- @realm shared -- @CharacterInventory Inventory --- --- CauseOfDeath, returns a CauseOfDeath. +-- AllowCustomInteract, Field of type bool -- @realm shared --- @CauseOfDeath CauseOfDeath \ No newline at end of file +-- @bool AllowCustomInteract + +--- +-- LockHands, Field of type bool +-- @realm shared +-- @bool LockHands + +--- +-- AllowInput, Field of type bool +-- @realm shared +-- @bool AllowInput + +--- +-- CanMove, Field of type bool +-- @realm shared +-- @bool CanMove + +--- +-- CanInteract, Field of type bool +-- @realm shared +-- @bool CanInteract + +--- +-- CursorPosition, Field of type Vector2 +-- @realm shared +-- @Vector2 CursorPosition + +--- +-- SmoothedCursorPosition, Field of type Vector2 +-- @realm shared +-- @Vector2 SmoothedCursorPosition + +--- +-- CursorWorldPosition, Field of type Vector2 +-- @realm shared +-- @Vector2 CursorWorldPosition + +--- +-- FocusedCharacter, Field of type Character +-- @realm shared +-- @Character FocusedCharacter + +--- +-- SelectedCharacter, Field of type Character +-- @realm shared +-- @Character SelectedCharacter + +--- +-- SelectedBy, Field of type Character +-- @realm shared +-- @Character SelectedBy + +--- +-- HeldItems, Field of type IEnumerable`1 +-- @realm shared +-- @IEnumerable`1 HeldItems + +--- +-- LowPassMultiplier, Field of type number +-- @realm shared +-- @number LowPassMultiplier + +--- +-- ObstructVision, Field of type bool +-- @realm shared +-- @bool ObstructVision + +--- +-- PressureProtection, Field of type number +-- @realm shared +-- @number PressureProtection + +--- +-- IsIncapacitated, Field of type bool +-- @realm shared +-- @bool IsIncapacitated + +--- +-- IsUnconscious, Field of type bool +-- @realm shared +-- @bool IsUnconscious + +--- +-- IsPet, Field of type bool +-- @realm shared +-- @bool IsPet + +--- +-- Oxygen, Field of type number +-- @realm shared +-- @number Oxygen + +--- +-- OxygenAvailable, Field of type number +-- @realm shared +-- @number OxygenAvailable + +--- +-- UseHullOxygen, Field of type bool +-- @realm shared +-- @bool UseHullOxygen + +--- +-- Stun, Field of type number +-- @realm shared +-- @number Stun + +--- +-- CharacterHealth, Field of type CharacterHealth +-- @realm shared +-- @CharacterHealth CharacterHealth + +--- +-- Vitality, Field of type number +-- @realm shared +-- @number Vitality + +--- +-- Health, Field of type number +-- @realm shared +-- @number Health + +--- +-- HealthPercentage, Field of type number +-- @realm shared +-- @number HealthPercentage + +--- +-- MaxVitality, Field of type number +-- @realm shared +-- @number MaxVitality + +--- +-- Bloodloss, Field of type number +-- @realm shared +-- @number Bloodloss + +--- +-- Bleeding, Field of type number +-- @realm shared +-- @number Bleeding + +--- +-- SpeechImpediment, Field of type number +-- @realm shared +-- @number SpeechImpediment + +--- +-- PressureTimer, Field of type number +-- @realm shared +-- @number PressureTimer + +--- +-- DisableImpactDamageTimer, Field of type number +-- @realm shared +-- @number DisableImpactDamageTimer + +--- +-- CurrentSpeed, Field of type number +-- @realm shared +-- @number CurrentSpeed + +--- +-- SelectedConstruction, Field of type Item +-- @realm shared +-- @Item SelectedConstruction + +--- +-- FocusedItem, Field of type Item +-- @realm shared +-- @Item FocusedItem + +--- +-- PickingItem, Field of type Item +-- @realm shared +-- @Item PickingItem + +--- +-- AIController, Field of type AIController +-- @realm shared +-- @AIController AIController + +--- +-- IsDead, Field of type bool +-- @realm shared +-- @bool IsDead + +--- +-- IsObserving, Field of type bool +-- @realm shared +-- @bool IsObserving + +--- +-- EnableDespawn, Field of type bool +-- @realm shared +-- @bool EnableDespawn + +--- +-- CauseOfDeath, Field of type CauseOfDeath +-- @realm shared +-- @CauseOfDeath CauseOfDeath + +--- +-- CanBeSelected, Field of type bool +-- @realm shared +-- @bool CanBeSelected + +--- +-- CanBeDragged, Field of type bool +-- @realm shared +-- @bool CanBeDragged + +--- +-- CanInventoryBeAccessed, Field of type bool +-- @realm shared +-- @bool CanInventoryBeAccessed + +--- +-- CanAim, Field of type bool +-- @realm shared +-- @bool CanAim + +--- +-- InWater, Field of type bool +-- @realm shared +-- @bool InWater + +--- +-- SimPosition, Field of type Vector2 +-- @realm shared +-- @Vector2 SimPosition + +--- +-- Position, Field of type Vector2 +-- @realm shared +-- @Vector2 Position + +--- +-- DrawPosition, Field of type Vector2 +-- @realm shared +-- @Vector2 DrawPosition + +--- +-- IsInFriendlySub, Field of type bool +-- @realm shared +-- @bool IsInFriendlySub + +--- +-- OverrideMovement, Field of type Nullable`1 +-- @realm shared +-- @Nullable`1 OverrideMovement + +--- +-- ForceRun, Field of type bool +-- @realm shared +-- @bool ForceRun + +--- +-- IsClimbing, Field of type bool +-- @realm shared +-- @bool IsClimbing + +--- +-- CanRun, Field of type bool +-- @realm shared +-- @bool CanRun + +--- +-- SpeedMultiplier, Field of type number +-- @realm shared +-- @number SpeedMultiplier + +--- +-- PropulsionSpeedMultiplier, Field of type number +-- @realm shared +-- @number PropulsionSpeedMultiplier + +--- +-- HealthMultiplier, Field of type number +-- @realm shared +-- @number HealthMultiplier + +--- +-- StaticHealthMultiplier, Field of type number +-- @realm shared +-- @number StaticHealthMultiplier + +--- +-- IsKnockedDown, Field of type bool +-- @realm shared +-- @bool IsKnockedDown + +--- +-- IsCaptain, Field of type bool +-- @realm shared +-- @bool IsCaptain + +--- +-- IsEngineer, Field of type bool +-- @realm shared +-- @bool IsEngineer + +--- +-- IsMechanic, Field of type bool +-- @realm shared +-- @bool IsMechanic + +--- +-- IsMedic, Field of type bool +-- @realm shared +-- @bool IsMedic + +--- +-- IsSecurity, Field of type bool +-- @realm shared +-- @bool IsSecurity + +--- +-- IsAssistant, Field of type bool +-- @realm shared +-- @bool IsAssistant + +--- +-- IsWatchman, Field of type bool +-- @realm shared +-- @bool IsWatchman + +--- +-- IsVip, Field of type bool +-- @realm shared +-- @bool IsVip + +--- +-- IsPrisoner, Field of type bool +-- @realm shared +-- @bool IsPrisoner + +--- +-- UniqueNameColor, Field of type Nullable`1 +-- @realm shared +-- @Nullable`1 UniqueNameColor + +--- +-- HealthUpdateInterval, Field of type number +-- @realm shared +-- @number HealthUpdateInterval + +--- +-- MemState, Field of type table +-- @realm shared +-- @table MemState + +--- +-- MemLocalState, Field of type table +-- @realm shared +-- @table MemLocalState + +--- +-- 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 + +--- +-- Submarine, Field of type Submarine +-- @realm shared +-- @Submarine Submarine + +--- +-- AiTarget, Field of type AITarget +-- @realm shared +-- @AITarget AiTarget + +--- +-- SpawnTime, Field of type number +-- @realm shared +-- @number SpawnTime + +--- +-- OwnerClientEndPoint, Field of type string +-- @realm shared +-- @string OwnerClientEndPoint + +--- +-- OwnerClientName, Field of type string +-- @realm shared +-- @string OwnerClientName + +--- +-- ClientDisconnected, Field of type bool +-- @realm shared +-- @bool ClientDisconnected + +--- +-- KillDisconnectedTimer, Field of type number +-- @realm shared +-- @number KillDisconnectedTimer + +--- +-- HealthUpdatePending, Field of type bool +-- @realm shared +-- @bool HealthUpdatePending + +--- +-- PreviousHull, Field of type Hull +-- @realm shared +-- @Hull PreviousHull + +--- +-- CurrentHull, Field of type Hull +-- @realm shared +-- @Hull CurrentHull + +--- +-- Properties, Field of type table +-- @realm shared +-- @table Properties + +--- +-- Prefab, Field of type HumanPrefab +-- @realm shared +-- @HumanPrefab Prefab + +--- +-- CombatAction, Field of type CombatAction +-- @realm shared +-- @CombatAction CombatAction + +--- +-- AnimController, Field of type AnimController +-- @realm shared +-- @AnimController AnimController + +--- +-- Seed, Field of type string +-- @realm shared +-- @string Seed + +--- +-- LastDamageSource, Field of type Entity +-- @realm shared +-- @Entity LastDamageSource + +--- +-- LastDamage, Field of type AttackResult +-- @realm shared +-- @AttackResult LastDamage + +--- +-- InvisibleTimer, Field of type number +-- @realm shared +-- @number InvisibleTimer + +--- +-- Params, Field of type CharacterParams +-- @realm shared +-- @CharacterParams Params + +--- +-- TraitorCurrentObjective, Field of type string +-- @realm shared +-- @string TraitorCurrentObjective + +--- +-- ResetInteract, Field of type bool +-- @realm shared +-- @bool ResetInteract + +--- +-- customInteractHUDText, Field of type string +-- @realm shared +-- @string customInteractHUDText + +--- +-- ActiveConversation, Field of type ConversationAction +-- @realm shared +-- @ConversationAction ActiveConversation + +--- +-- RequireConsciousnessForCustomInteract, Field of type bool +-- @realm shared +-- @bool RequireConsciousnessForCustomInteract + +--- +-- KnockbackCooldownTimer, Field of type number +-- @realm shared +-- @number KnockbackCooldownTimer + +--- +-- IsRagdolled, Field of type bool +-- @realm shared +-- @bool IsRagdolled + +--- +-- IsForceRagdolled, Field of type bool +-- @realm shared +-- @bool IsForceRagdolled + +--- +-- dontFollowCursor, Field of type bool +-- @realm shared +-- @bool dontFollowCursor + +--- +-- DisableHealthWindow, Field of type bool +-- @realm shared +-- @bool DisableHealthWindow + +--- +-- GodMode, Field of type bool +-- @realm shared +-- @bool GodMode + +--- +-- CampaignInteractionType, Field of type InteractionType +-- @realm shared +-- @InteractionType CampaignInteractionType + +--- +-- OnDeath, Field of type OnDeathHandler +-- @realm shared +-- @OnDeathHandler OnDeath + +--- +-- OnAttacked, Field of type OnAttackedHandler +-- @realm shared +-- @OnAttackedHandler OnAttacked + +--- +-- LastNetworkUpdateID, Field of type number +-- @realm shared +-- @number LastNetworkUpdateID + +--- +-- LastProcessedID, Field of type number +-- @realm shared +-- @number LastProcessedID + +--- +-- healthUpdateTimer, Field of type number +-- @realm shared +-- @number healthUpdateTimer + +--- +-- isSynced, Field of type bool +-- @realm shared +-- @bool isSynced + +--- +-- Character.Controlled, Field of type Character +-- @realm shared +-- @Character Character.Controlled + +--- +-- Character.KnockbackCooldown, Field of type number +-- @realm shared +-- @number Character.KnockbackCooldown + +--- +-- ID, Field of type number +-- @realm shared +-- @number ID + diff --git a/docs/lua/CharacterInfo.lua b/docs/lua/CharacterInfo.lua index fddd7025b..6bd6e857c 100644 --- a/docs/lua/CharacterInfo.lua +++ b/docs/lua/CharacterInfo.lua @@ -10,11 +10,427 @@ Barotrauma source code: [CharacterInfo.cs](https://github.com/evilfactory/Barotr local CharacterInfo = {} ---- Instantiates a new CharacterInfo. +--- ApplyHealthData +-- @realm shared +-- @tparam Character character +-- @tparam XElement healthData +function CharacterInfo.ApplyHealthData(character, healthData) end + +--- ReloadHeadAttachments +-- @realm shared +function ReloadHeadAttachments() end + +--- ResetHeadAttachments +-- @realm shared +function ResetHeadAttachments() end + +--- ClearCurrentOrders +-- @realm shared +function ClearCurrentOrders() end + +--- Remove +-- @realm shared +function Remove() end + +--- Create +-- @realm shared +-- @tparam string speciesName +-- @tparam string name +-- @tparam JobPrefab jobPrefab +-- @tparam string ragdollFileName +-- @tparam number variant +-- @tparam RandSync randSync +-- @tparam string npcIdentifier -- @treturn CharacterInfo --- @realm server -- @usage -- local vsauce = CharacterInfo("human", "VSAUCE HERE") -- local character = Character.Create(vsauce, Vector2(0, 0), "some random characters") -- print(character) -function CharacterInfo(speciesName, name, jobPrefab, ragdollFileName, variant, randSync, npcIdentifier) end \ No newline at end of file +function CharacterInfo(speciesName, name, jobPrefab, ragdollFileName, variant, randSync, npcIdentifier) end + +--- ServerWrite +-- @realm shared +-- @tparam IWriteMessage msg +function ServerWrite(msg) end + +--- CheckDisguiseStatus +-- @realm shared +-- @tparam bool handleBuff +-- @tparam IdCard idCard +function CheckDisguiseStatus(handleBuff, idCard) end + +--- GetRandomGender +-- @realm shared +-- @tparam RandSync randSync +-- @treturn Gender +function GetRandomGender(randSync) end + +--- GetRandomRace +-- @realm shared +-- @tparam RandSync randSync +-- @treturn Race +function GetRandomRace(randSync) end + +--- GetRandomHeadID +-- @realm shared +-- @tparam RandSync randSync +-- @treturn number +function GetRandomHeadID(randSync) end + +--- GetIdentifier +-- @realm shared +-- @treturn number +function GetIdentifier() end + +--- GetIdentifierUsingOriginalName +-- @realm shared +-- @treturn number +function GetIdentifierUsingOriginalName() end + +--- FilterByTypeAndHeadID +-- @realm shared +-- @tparam IEnumerable`1 elements +-- @tparam WearableType targetType +-- @tparam number headSpriteId +-- @treturn IEnumerable`1 +function FilterByTypeAndHeadID(elements, targetType, headSpriteId) end + +--- FilterElementsByGenderAndRace +-- @realm shared +-- @tparam IEnumerable`1 elements +-- @tparam Gender gender +-- @tparam Race race +-- @treturn IEnumerable`1 +function FilterElementsByGenderAndRace(elements, gender, race) end + +--- RecreateHead +-- @realm shared +-- @tparam number headID +-- @tparam Race race +-- @tparam Gender gender +-- @tparam number hairIndex +-- @tparam number beardIndex +-- @tparam number moustacheIndex +-- @tparam number faceAttachmentIndex +function RecreateHead(headID, race, gender, hairIndex, beardIndex, moustacheIndex, faceAttachmentIndex) end + +--- LoadHeadSprite +-- @realm shared +function LoadHeadSprite() end + +--- LoadHeadAttachments +-- @realm shared +function LoadHeadAttachments() end + +--- IncreaseSkillLevel +-- @realm shared +-- @tparam string skillIdentifier +-- @tparam number increase +-- @tparam Vector2 pos +function IncreaseSkillLevel(skillIdentifier, increase, pos) end + +--- SetSkillLevel +-- @realm shared +-- @tparam string skillIdentifier +-- @tparam number level +-- @tparam Vector2 pos +function SetSkillLevel(skillIdentifier, level, pos) end + +--- Rename +-- @realm shared +-- @tparam string newName +function Rename(newName) end + +--- ResetName +-- @realm shared +function ResetName() end + +--- Save +-- @realm shared +-- @tparam XElement parentElement +-- @treturn XElement +function Save(parentElement) end + +--- SaveOrders +-- @realm shared +-- @tparam XElement parentElement +-- @tparam OrderInfo[] orders +function CharacterInfo.SaveOrders(parentElement, orders) end + +--- SaveOrderData +-- @realm shared +-- @tparam CharacterInfo characterInfo +-- @tparam XElement parentElement +function CharacterInfo.SaveOrderData(characterInfo, parentElement) end + +--- SaveOrderData +-- @realm shared +function SaveOrderData() end + +--- ApplyOrderData +-- @realm shared +-- @tparam Character character +-- @tparam XElement orderData +function CharacterInfo.ApplyOrderData(character, orderData) end + +--- ApplyOrderData +-- @realm shared +function ApplyOrderData() end + +--- LoadOrders +-- @realm shared +-- @tparam XElement ordersElement +-- @treturn table +function CharacterInfo.LoadOrders(ordersElement) 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 + +--- +-- Head, Field of type HeadInfo +-- @realm shared +-- @HeadInfo Head + +--- +-- Heads, Field of type table +-- @realm shared +-- @table Heads + +--- +-- HasNickname, Field of type bool +-- @realm shared +-- @bool HasNickname + +--- +-- OriginalName, Field of type string +-- @realm shared +-- @string OriginalName + +--- +-- DisplayName, Field of type string +-- @realm shared +-- @string DisplayName + +--- +-- SpeciesName, Field of type string +-- @realm shared +-- @string SpeciesName + +--- +-- HeadSprite, Field of type Sprite +-- @realm shared +-- @Sprite HeadSprite + +--- +-- Portrait, Field of type Sprite +-- @realm shared +-- @Sprite Portrait + +--- +-- AttachmentSprites, Field of type table +-- @realm shared +-- @table AttachmentSprites + +--- +-- CharacterConfigElement, Field of type XElement +-- @realm shared +-- @XElement CharacterConfigElement + +--- +-- CharacterInfo.HighestManualOrderPriority, Field of type number +-- @realm shared +-- @number CharacterInfo.HighestManualOrderPriority + +--- +-- CurrentOrders, Field of type table +-- @realm shared +-- @table CurrentOrders + +--- +-- SpriteTags, Field of type table +-- @realm shared +-- @table SpriteTags + +--- +-- PersonalityTrait, Field of type NPCPersonalityTrait +-- @realm shared +-- @NPCPersonalityTrait PersonalityTrait + +--- +-- HeadSpriteId, Field of type number +-- @realm shared +-- @number HeadSpriteId + +--- +-- Gender, Field of type Gender +-- @realm shared +-- @Gender Gender + +--- +-- Race, Field of type Race +-- @realm shared +-- @Race Race + +--- +-- HairIndex, Field of type number +-- @realm shared +-- @number HairIndex + +--- +-- BeardIndex, Field of type number +-- @realm shared +-- @number BeardIndex + +--- +-- MoustacheIndex, Field of type number +-- @realm shared +-- @number MoustacheIndex + +--- +-- FaceAttachmentIndex, Field of type number +-- @realm shared +-- @number FaceAttachmentIndex + +--- +-- HairElement, Field of type XElement +-- @realm shared +-- @XElement HairElement + +--- +-- BeardElement, Field of type XElement +-- @realm shared +-- @XElement BeardElement + +--- +-- MoustacheElement, Field of type XElement +-- @realm shared +-- @XElement MoustacheElement + +--- +-- FaceAttachment, Field of type XElement +-- @realm shared +-- @XElement FaceAttachment + +--- +-- Ragdoll, Field of type RagdollParams +-- @realm shared +-- @RagdollParams Ragdoll + +--- +-- IsAttachmentsLoaded, Field of type bool +-- @realm shared +-- @bool IsAttachmentsLoaded + +--- +-- Wearables, Field of type IEnumerable`1 +-- @realm shared +-- @IEnumerable`1 Wearables + +--- +-- InventoryData, Field of type XElement +-- @realm shared +-- @XElement InventoryData + +--- +-- HealthData, Field of type XElement +-- @realm shared +-- @XElement HealthData + +--- +-- OrderData, Field of type XElement +-- @realm shared +-- @XElement OrderData + +--- +-- Name, Field of type string +-- @realm shared +-- @string Name + +--- +-- Character, Field of type Character +-- @realm shared +-- @Character Character + +--- +-- Job, Field of type Job +-- @realm shared +-- @Job Job + +--- +-- Salary, Field of type number +-- @realm shared +-- @number Salary + +--- +-- OmitJobInPortraitClothing, Field of type bool +-- @realm shared +-- @bool OmitJobInPortraitClothing + +--- +-- IsDisguised, Field of type bool +-- @realm shared +-- @bool IsDisguised + +--- +-- IsDisguisedAsAnother, Field of type bool +-- @realm shared +-- @bool IsDisguisedAsAnother + +--- +-- ragdollFileName, Field of type string +-- @realm shared +-- @string ragdollFileName + +--- +-- StartItemsGiven, Field of type bool +-- @realm shared +-- @bool StartItemsGiven + +--- +-- IsNewHire, Field of type bool +-- @realm shared +-- @bool IsNewHire + +--- +-- CauseOfDeath, Field of type CauseOfDeath +-- @realm shared +-- @CauseOfDeath CauseOfDeath + +--- +-- TeamID, Field of type CharacterTeamType +-- @realm shared +-- @CharacterTeamType TeamID + +--- +-- ID, Field of type number +-- @realm shared +-- @number ID + +--- +-- HasGenders, Field of type bool +-- @realm shared +-- @bool HasGenders + +--- +-- CharacterInfo.MaxCurrentOrders, Field of type number +-- @realm shared +-- @number CharacterInfo.MaxCurrentOrders + diff --git a/docs/lua/Client.lua b/docs/lua/Client.lua index 1e56baea2..ef5226bf1 100644 --- a/docs/lua/Client.lua +++ b/docs/lua/Client.lua @@ -12,19 +12,19 @@ local Client = {} --- Sets the client character. -- @realm server -function Client:SetClientCharacter(character) end +function SetClientCharacter(character) end --- Kick a client. -- @realm server -function Client:Kick(reason) end +function Kick(reason) end --- Ban a client. -- @realm server -function Client:Ban(reason, range, seconds) end +function Ban(reason, range, seconds) end --- Checks permissions, Client.Permissions. -- @realm server -function Client:CheckPermission(permissions) end +function CheckPermission(permissions) end --- Unban a client. -- @realm server @@ -43,3 +43,439 @@ function Client.Unban(player, endpoint) end -- @Character Character +----------- AUTODOCS -------------- + + +--- InitClientSync +-- @realm shared + +function InitClientSync() end + +--- IsValidName +-- @realm shared +-- @tparam string name +-- @tparam ServerSettings serverSettings +-- @treturn bool +function Client.IsValidName(name, serverSettings) end + +--- EndpointMatches +-- @realm shared +-- @tparam string endPoint +-- @treturn bool +function EndpointMatches(endPoint) end + +--- SetPermissions +-- @realm shared +-- @tparam ClientPermissions permissions +-- @tparam table permittedConsoleCommands + +function SetPermissions(permissions, permittedConsoleCommands) end + +--- GivePermission +-- @realm shared +-- @tparam ClientPermissions permission + +function GivePermission(permission) end + +--- RemovePermission +-- @realm shared +-- @tparam ClientPermissions permission + +function RemovePermission(permission) end + +--- HasPermission +-- @realm shared +-- @tparam ClientPermissions permission +-- @treturn bool +function HasPermission(permission) end + +--- GetVote +-- @realm shared +-- @tparam VoteType voteType +-- @treturn T +function GetVote(voteType) end + +--- SetVote +-- @realm shared +-- @tparam VoteType voteType +-- @tparam Object value + +function SetVote(voteType, value) end + +--- ResetVotes +-- @realm shared + +function ResetVotes() end + +--- AddKickVote +-- @realm shared +-- @tparam Client voter + +function AddKickVote(voter) end + +--- RemoveKickVote +-- @realm shared +-- @tparam Client voter + +function RemoveKickVote(voter) end + +--- HasKickVoteFrom +-- @realm shared +-- @tparam Client voter +-- @treturn bool +function HasKickVoteFrom(voter) end + +--- HasKickVoteFromID +-- @realm shared +-- @tparam number id +-- @treturn bool +function HasKickVoteFromID(id) end + +--- UpdateKickVotes +-- @realm shared +-- @tparam table connectedClients + +function Client.UpdateKickVotes(connectedClients) end + +--- WritePermissions +-- @realm shared +-- @tparam IWriteMessage msg + +function WritePermissions(msg) end + +--- ReadPermissions +-- @realm shared +-- @tparam IReadMessage inc +-- @tparam ClientPermissions& permissions +-- @tparam List`1& permittedCommands + +function Client.ReadPermissions(inc, permissions, permittedCommands) end + +--- ReadPermissions +-- @realm shared +-- @tparam IReadMessage inc + +function ReadPermissions(inc) end + +--- SanitizeName +-- @realm shared +-- @tparam string name +-- @treturn string +function Client.SanitizeName(name) end + +--- Dispose +-- @realm shared + +function Dispose() 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 + +--- +-- CharacterInfo, Field of type CharacterInfo +-- @realm shared +-- @CharacterInfo CharacterInfo + +--- +-- Connection, Field of type NetworkConnection +-- @realm shared +-- @NetworkConnection Connection + +--- +-- Karma, Field of type number +-- @realm shared +-- @number Karma + +--- +-- SpectatePos, Field of type Nullable`1 +-- @realm shared +-- @Nullable`1 SpectatePos + +--- +-- Spectating, Field of type bool +-- @realm shared +-- @bool Spectating + +--- +-- Muted, Field of type bool +-- @realm shared +-- @bool Muted + +--- +-- VoipQueue, Field of type VoipQueue +-- @realm shared +-- @VoipQueue VoipQueue + +--- +-- InGame, Field of type bool +-- @realm shared +-- @bool InGame + +--- +-- PermittedConsoleCommands, Field of type table +-- @realm shared +-- @table PermittedConsoleCommands + +--- +-- KickVoteCount, Field of type number +-- @realm shared +-- @number KickVoteCount + +--- +-- VoiceEnabled, Field of type bool +-- @realm shared +-- @bool VoiceEnabled + +--- +-- LastRecvClientListUpdate, Field of type number +-- @realm shared +-- @number LastRecvClientListUpdate + +--- +-- LastRecvLobbyUpdate, Field of type number +-- @realm shared +-- @number LastRecvLobbyUpdate + +--- +-- LastSentChatMsgID, Field of type number +-- @realm shared +-- @number LastSentChatMsgID + +--- +-- LastRecvChatMsgID, Field of type number +-- @realm shared +-- @number LastRecvChatMsgID + +--- +-- LastSentEntityEventID, Field of type number +-- @realm shared +-- @number LastSentEntityEventID + +--- +-- LastRecvEntityEventID, Field of type number +-- @realm shared +-- @number LastRecvEntityEventID + +--- +-- LastRecvCampaignUpdate, Field of type number +-- @realm shared +-- @number LastRecvCampaignUpdate + +--- +-- LastRecvCampaignSave, Field of type number +-- @realm shared +-- @number LastRecvCampaignSave + +--- +-- LastCampaignSaveSendTime, Field of type Pair`2 +-- @realm shared +-- @Pair`2 LastCampaignSaveSendTime + +--- +-- ChatMsgQueue, Field of type table +-- @realm shared +-- @table ChatMsgQueue + +--- +-- LastChatMsgQueueID, Field of type number +-- @realm shared +-- @number LastChatMsgQueueID + +--- +-- LastSentChatMessages, Field of type table +-- @realm shared +-- @table LastSentChatMessages + +--- +-- ChatSpamSpeed, Field of type number +-- @realm shared +-- @number ChatSpamSpeed + +--- +-- ChatSpamTimer, Field of type number +-- @realm shared +-- @number ChatSpamTimer + +--- +-- ChatSpamCount, Field of type number +-- @realm shared +-- @number ChatSpamCount + +--- +-- RoundsSincePlayedAsTraitor, Field of type number +-- @realm shared +-- @number RoundsSincePlayedAsTraitor + +--- +-- KickAFKTimer, Field of type number +-- @realm shared +-- @number KickAFKTimer + +--- +-- MidRoundSyncTimeOut, Field of type number +-- @realm shared +-- @number MidRoundSyncTimeOut + +--- +-- NeedsMidRoundSync, Field of type bool +-- @realm shared +-- @bool NeedsMidRoundSync + +--- +-- UnreceivedEntityEventCount, Field of type number +-- @realm shared +-- @number UnreceivedEntityEventCount + +--- +-- FirstNewEventID, Field of type number +-- @realm shared +-- @number FirstNewEventID + +--- +-- EntityEventLastSent, Field of type table +-- @realm shared +-- @table EntityEventLastSent + +--- +-- PositionUpdateLastSent, Field of type table +-- @realm shared +-- @table PositionUpdateLastSent + +--- +-- PendingPositionUpdates, Field of type Queue`1 +-- @realm shared +-- @Queue`1 PendingPositionUpdates + +--- +-- ReadyToStart, Field of type bool +-- @realm shared +-- @bool ReadyToStart + +--- +-- JobPreferences, Field of type table +-- @realm shared +-- @table JobPreferences + +--- +-- AssignedJob, Field of type Pair`2 +-- @realm shared +-- @Pair`2 AssignedJob + +--- +-- DeleteDisconnectedTimer, Field of type number +-- @realm shared +-- @number DeleteDisconnectedTimer + +--- +-- SpectateOnly, Field of type bool +-- @realm shared +-- @bool SpectateOnly + +--- +-- WaitForNextRoundRespawn, Field of type Nullable`1 +-- @realm shared +-- @Nullable`1 WaitForNextRoundRespawn + +--- +-- KarmaKickCount, Field of type number +-- @realm shared +-- @number KarmaKickCount + +--- +-- Name, Field of type string +-- @realm shared +-- @string Name + +--- +-- NameID, Field of type number +-- @realm shared +-- @number NameID + +--- +-- ID, Field of type Byte +-- @realm shared +-- @Byte ID + +--- +-- SteamID, Field of type number +-- @realm shared +-- @number SteamID + +--- +-- OwnerSteamID, Field of type number +-- @realm shared +-- @number OwnerSteamID + +--- +-- Language, Field of type string +-- @realm shared +-- @string Language + +--- +-- Ping, Field of type number +-- @realm shared +-- @number Ping + +--- +-- PreferredJob, Field of type string +-- @realm shared +-- @string PreferredJob + +--- +-- TeamID, Field of type CharacterTeamType +-- @realm shared +-- @CharacterTeamType TeamID + +--- +-- PreferredTeam, Field of type CharacterTeamType +-- @realm shared +-- @CharacterTeamType PreferredTeam + +--- +-- CharacterID, Field of type number +-- @realm shared +-- @number CharacterID + +--- +-- HasPermissions, Field of type bool +-- @realm shared +-- @bool HasPermissions + +--- +-- HasSpawned, Field of type bool +-- @realm shared +-- @bool HasSpawned + +--- +-- GivenAchievements, Field of type HashSet`1 +-- @realm shared +-- @HashSet`1 GivenAchievements + +--- +-- Permissions, Field of type ClientPermissions +-- @realm shared +-- @ClientPermissions Permissions + +--- +-- Client.MaxNameLength, Field of type number +-- @realm shared +-- @number Client.MaxNameLength + diff --git a/docs/lua/Item.lua b/docs/lua/Item.lua index c4f691b47..b85093300 100644 --- a/docs/lua/Item.lua +++ b/docs/lua/Item.lua @@ -17,11 +17,11 @@ function Item.AddToRemoveQueue(item) end --- Gets a component from an item by a string name. -- @treturn Component component -- @realm server -function Item:GetComponentString(componentName) end +function GetComponentString(componentName) end --- Sends a signal. -- @realm server -function Item:SendSignal(signalOrString, connectionOrConnectionName) end +function SendSignal(signalOrString, connectionOrConnectionName) end --- -- Physics body of the item. @@ -41,11 +41,1076 @@ function Item:SendSignal(signalOrString, connectionOrConnectionName) end -- @ItemPrefab Prefab --- --- Name, the name of the item. +-- WorldPosition, Vector2 position of the item in the world +-- @realm shared +-- @Vector2 WorldPosition + + +----- AUTO DOCS ------ + +--- IsInsideTrigger +-- @realm shared +-- @tparam Vector2 worldPosition +-- @treturn bool +function IsInsideTrigger(worldPosition) end + +--- IsInsideTrigger +-- @realm shared +-- @tparam Vector2 worldPosition +-- @tparam Rectangle& transformedTrigger +-- @treturn bool +function IsInsideTrigger(worldPosition, transformedTrigger) end + +--- CanClientAccess +-- @realm shared +-- @tparam Client c +-- @treturn bool +function CanClientAccess(c) end + +--- TryInteract +-- @realm shared +-- @tparam Character picker +-- @tparam bool ignoreRequiredItems +-- @tparam bool forceSelectKey +-- @tparam bool forceActionKey +-- @treturn bool +function TryInteract(picker, ignoreRequiredItems, forceSelectKey, forceActionKey) end + +--- GetContainedItemConditionPercentage +-- @realm shared +-- @treturn number +function GetContainedItemConditionPercentage() end + +--- Use +-- @realm shared +-- @tparam number deltaTime +-- @tparam Character character +-- @tparam Limb targetLimb +function Use(deltaTime, character, targetLimb) end + +--- SecondaryUse +-- @realm shared +-- @tparam number deltaTime +-- @tparam Character character +function SecondaryUse(deltaTime, character) end + +--- ApplyTreatment +-- @realm shared +-- @tparam Character user +-- @tparam Character character +-- @tparam Limb targetLimb +function ApplyTreatment(user, character, targetLimb) end + +--- Combine +-- @realm shared +-- @tparam Item item +-- @tparam Character user +-- @treturn bool +function Combine(item, user) end + +--- Drop +-- @realm shared +-- @tparam Character dropper +-- @tparam bool createNetworkEvent +function Drop(dropper, createNetworkEvent) end + +--- Equip +-- @realm shared +-- @tparam Character character +function Equip(character) end + +--- Unequip +-- @realm shared +-- @tparam Character character +function Unequip(character) end + +--- GetProperties +-- @realm shared +-- @treturn table +function GetProperties() end + +--- Load +-- @realm shared +-- @tparam XElement element +-- @tparam Submarine submarine +-- @tparam IdRemap idRemap +-- @treturn Item +function Item.Load(element, submarine, idRemap) end + +--- Load +-- @realm shared +-- @tparam XElement element +-- @tparam Submarine submarine +-- @tparam bool createNetworkEvent +-- @tparam IdRemap idRemap +-- @treturn Item +function Item.Load(element, submarine, createNetworkEvent, idRemap) end + +--- Save +-- @realm shared +-- @tparam XElement parentElement +-- @treturn XElement +function Save(parentElement) end + +--- Reset +-- @realm shared +function Reset() end + +--- OnMapLoaded +-- @realm shared +function OnMapLoaded() end + +--- ShallowRemove +-- @realm shared +function ShallowRemove() end + +--- Remove +-- @realm shared +function Remove() end + +--- RemoveByPrefab +-- @realm shared +-- @tparam ItemPrefab prefab +function Item.RemoveByPrefab(prefab) end + +--- GetComponentString +-- @realm shared +-- @tparam string component +-- @treturn Object +function GetComponentString(component) end + +--- ToString +-- @realm shared +-- @treturn string +function ToString() end + +--- IgnoreByAI +-- @realm shared +-- @tparam Character character +-- @treturn bool +function IgnoreByAI(character) end + +--- IsContainerPreferred +-- @realm shared +-- @tparam ItemContainer container +-- @tparam Boolean& isPreferencesDefined +-- @tparam Boolean& isSecondary +-- @treturn bool +function IsContainerPreferred(container, isPreferencesDefined, isSecondary) end + +--- Clone +-- @realm shared +-- @treturn MapEntity +function Clone() end + +--- AddComponent +-- @realm shared +-- @tparam ItemComponent component +function AddComponent(component) end + +--- EnableDrawableComponent +-- @realm shared +-- @tparam IDrawableComponent drawable +function EnableDrawableComponent(drawable) end + +--- DisableDrawableComponent +-- @realm shared +-- @tparam IDrawableComponent drawable +function DisableDrawableComponent(drawable) end + +--- GetComponentIndex +-- @realm shared +-- @tparam ItemComponent component +-- @treturn number +function GetComponentIndex(component) end + +--- GetComponent +-- @realm shared +-- @treturn T +function GetComponent() end + +--- GetComponents +-- @realm shared +-- @treturn IEnumerable`1 +function GetComponents() end + +--- RemoveContained +-- @realm shared +-- @tparam Item contained +function RemoveContained(contained) end + +--- SetTransform +-- @realm shared +-- @tparam Vector2 simPosition +-- @tparam number rotation +-- @tparam bool findNewHull +-- @tparam bool setPrevTransform +function SetTransform(simPosition, rotation, findNewHull, setPrevTransform) end + +--- AllowDroppingOnSwapWith +-- @realm shared +-- @tparam Item otherItem +-- @treturn bool +function AllowDroppingOnSwapWith(otherItem) end + +--- SetActiveSprite +-- @realm shared +function SetActiveSprite() end + +--- Move +-- @realm shared +-- @tparam Vector2 amount +function Move(amount) end + +--- Move +-- @realm shared +-- @tparam Vector2 amount +-- @tparam bool ignoreContacts +function Move(amount, ignoreContacts) end + +--- TransformTrigger +-- @realm shared +-- @tparam Rectangle trigger +-- @tparam bool world +-- @treturn Rectangle +function TransformTrigger(trigger, world) end + +--- UpdateHulls +-- @realm shared +function Item.UpdateHulls() end + +--- FindHull +-- @realm shared +-- @treturn Hull +function FindHull() end + +--- GetRootContainer +-- @realm shared +-- @treturn Item +function GetRootContainer() end + +--- IsThisOrAnyContainerIgnoredByAI +-- @realm shared +-- @tparam Character character +-- @treturn bool +function IsThisOrAnyContainerIgnoredByAI(character) end + +--- IsOwnedBy +-- @realm shared +-- @tparam Entity entity +-- @treturn bool +function IsOwnedBy(entity) end + +--- GetRootInventoryOwner +-- @realm shared +-- @treturn Entity +function GetRootInventoryOwner() end + +--- FindParentInventory +-- @realm shared +-- @tparam Func`2 predicate +-- @treturn Inventory +function FindParentInventory(predicate) end + +--- SetContainedItemPositions +-- @realm shared +function SetContainedItemPositions() end + +--- AddTag +-- @realm shared +-- @tparam string tag +function AddTag(tag) end + +--- HasTag +-- @realm shared +-- @tparam string tag +-- @treturn bool +function HasTag(tag) end + +--- ReplaceTag +-- @realm shared +-- @tparam string tag +-- @tparam string newTag +function ReplaceTag(tag, newTag) end + +--- GetTags +-- @realm shared +-- @treturn IEnumerable`1 +function GetTags() end + +--- HasTag +-- @realm shared +-- @tparam IEnumerable`1 allowedTags +-- @treturn bool +function HasTag(allowedTags) end + +--- ApplyStatusEffects +-- @realm shared +-- @tparam ActionType type +-- @tparam number deltaTime +-- @tparam Character character +-- @tparam Limb limb +-- @tparam Entity useTarget +-- @tparam bool isNetworkEvent +-- @tparam Nullable`1 worldPosition +function ApplyStatusEffects(type, deltaTime, character, limb, useTarget, isNetworkEvent, worldPosition) end + +--- ApplyStatusEffect +-- @realm shared +-- @tparam StatusEffect effect +-- @tparam ActionType type +-- @tparam number deltaTime +-- @tparam Character character +-- @tparam Limb limb +-- @tparam Entity useTarget +-- @tparam bool isNetworkEvent +-- @tparam bool checkCondition +-- @tparam Nullable`1 worldPosition +function ApplyStatusEffect(effect, type, deltaTime, character, limb, useTarget, isNetworkEvent, checkCondition, worldPosition) end + +--- AddDamage +-- @realm shared +-- @tparam Character attacker +-- @tparam Vector2 worldPosition +-- @tparam Attack attack +-- @tparam number deltaTime +-- @tparam bool playSound +-- @treturn AttackResult +function AddDamage(attacker, worldPosition, attack, deltaTime, playSound) end + +--- SendPendingNetworkUpdates +-- @realm shared +function SendPendingNetworkUpdates() end + +--- Update +-- @realm shared +-- @tparam number deltaTime +-- @tparam Camera cam +function Update(deltaTime, cam) end + +--- UpdateTransform +-- @realm shared +function UpdateTransform() end + +--- FlipX +-- @realm shared +-- @tparam bool relativeToSub +function FlipX(relativeToSub) end + +--- FlipY +-- @realm shared +-- @tparam bool relativeToSub +function FlipY(relativeToSub) end + +--- GetConnectedComponents +-- @realm shared +-- @tparam bool recursive +-- @treturn table +function GetConnectedComponents(recursive) end + +--- GetConnectedComponentsRecursive +-- @realm shared +-- @tparam Connection c +-- @treturn table +function GetConnectedComponentsRecursive(c) end + +--- FindController +-- @realm shared +-- @treturn Controller +function FindController() end + +--- TryFindController +-- @realm shared +-- @tparam Controller& controller +-- @treturn bool +function TryFindController(controller) end + +--- ServerWrite +-- @realm shared +-- @tparam IWriteMessage msg +-- @tparam Client c +-- @tparam Object[] extraData +function ServerWrite(msg, c, extraData) end + +--- ServerRead +-- @realm shared +-- @tparam ClientNetObject type +-- @tparam IReadMessage msg +-- @tparam Client c +function ServerRead(type, msg, c) end + +--- WriteSpawnData +-- @realm shared +-- @tparam IWriteMessage msg +-- @tparam number entityID +-- @tparam number originalInventoryID +-- @tparam Byte originalItemContainerIndex +function WriteSpawnData(msg, entityID, originalInventoryID, originalItemContainerIndex) end + +--- GetPositionUpdateInterval +-- @realm shared +-- @tparam Client recipient +-- @treturn number +function GetPositionUpdateInterval(recipient) end + +--- ServerWritePosition +-- @realm shared +-- @tparam IWriteMessage msg +-- @tparam Client c +-- @tparam Object[] extraData +function ServerWritePosition(msg, c, extraData) end + +--- CreateServerEvent +-- @realm shared +-- @tparam T ic +function CreateServerEvent(ic) end + +--- CreateServerEvent +-- @realm shared +-- @tparam T ic +-- @tparam Object[] extraData +function CreateServerEvent(ic, extraData) end + +--- CreateServerEventString +-- @realm shared +-- @tparam string component +-- @treturn Object +function CreateServerEventString(component) end + +--- CreateServerEventString +-- @realm shared +-- @tparam string component +-- @tparam Object[] extraData +-- @treturn Object +function CreateServerEventString(component, extraData) end + +--- IsInteractable +-- @realm shared +-- @tparam Character character +-- @treturn bool +function IsInteractable(character) end + +--- ResolveLinks +-- @realm shared +-- @tparam IdRemap childRemap +function ResolveLinks(childRemap) end + +--- IsMouseOn +-- @realm shared +-- @tparam Vector2 position +-- @treturn bool +function IsMouseOn(position) 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 + +--- RemoveLinked +-- @realm shared +-- @tparam MapEntity e +function RemoveLinked(e) end + +--- GetLinkedEntities +-- @realm shared +-- @tparam HashSet`1 list +-- @tparam Nullable`1 maxDepth +-- @tparam Func`2 filter +-- @treturn HashSet`1 +function GetLinkedEntities(list, maxDepth, filter) end + +--- FreeID +-- @realm shared +function FreeID() 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 + +--- +-- Sprite, Field of type Sprite +-- @realm shared +-- @Sprite Sprite + +--- +-- CurrentHull, Field of type Hull +-- @realm shared +-- @Hull CurrentHull + +--- +-- CampaignInteractionType, Field of type InteractionType +-- @realm shared +-- @InteractionType CampaignInteractionType + +--- +-- SerializableProperties, Field of type table +-- @realm shared +-- @table SerializableProperties + +--- +-- EditableWhenEquipped, Field of type bool +-- @realm shared +-- @bool EditableWhenEquipped + +--- +-- ParentInventory, Field of type Inventory +-- @realm shared +-- @Inventory ParentInventory + +--- +-- Container, Field of type Item +-- @realm shared +-- @Item Container + +--- +-- Name, Field of type string -- @realm shared -- @string Name --- --- WorldPosition, Vector2 position of the item in the world +-- Description, Field of type string -- @realm shared --- @Vector2 WorldPosition +-- @string Description + +--- +-- NonInteractable, Field of type bool +-- @realm shared +-- @bool NonInteractable + +--- +-- NonPlayerTeamInteractable, Field of type bool +-- @realm shared +-- @bool NonPlayerTeamInteractable + +--- +-- AllowSwapping, Field of type bool +-- @realm shared +-- @bool AllowSwapping + +--- +-- PurchasedNewSwap, Field of type bool +-- @realm shared +-- @bool PurchasedNewSwap + +--- +-- IsPlayerTeamInteractable, Field of type bool +-- @realm shared +-- @bool IsPlayerTeamInteractable + +--- +-- Rotation, Field of type number +-- @realm shared +-- @number Rotation + +--- +-- ImpactTolerance, Field of type number +-- @realm shared +-- @number ImpactTolerance + +--- +-- InteractDistance, Field of type number +-- @realm shared +-- @number InteractDistance + +--- +-- InteractPriority, Field of type number +-- @realm shared +-- @number InteractPriority + +--- +-- Position, Field of type Vector2 +-- @realm shared +-- @Vector2 Position + +--- +-- SimPosition, Field of type Vector2 +-- @realm shared +-- @Vector2 SimPosition + +--- +-- InteractionRect, Field of type Rectangle +-- @realm shared +-- @Rectangle InteractionRect + +--- +-- Scale, Field of type number +-- @realm shared +-- @number Scale + +--- +-- PositionUpdateInterval, Field of type number +-- @realm shared +-- @number PositionUpdateInterval + +--- +-- SpriteColor, Field of type Color +-- @realm shared +-- @Color SpriteColor + +--- +-- InventoryIconColor, Field of type Color +-- @realm shared +-- @Color InventoryIconColor + +--- +-- ContainerColor, Field of type Color +-- @realm shared +-- @Color ContainerColor + +--- +-- ContainerIdentifier, Field of type string +-- @realm shared +-- @string ContainerIdentifier + +--- +-- SonarLabel, Field of type string +-- @realm shared +-- @string SonarLabel + +--- +-- PhysicsBodyActive, Field of type bool +-- @realm shared +-- @bool PhysicsBodyActive + +--- +-- SoundRange, Field of type number +-- @realm shared +-- @number SoundRange + +--- +-- SightRange, Field of type number +-- @realm shared +-- @number SightRange + +--- +-- IsShootable, Field of type bool +-- @realm shared +-- @bool IsShootable + +--- +-- RequireAimToUse, Field of type bool +-- @realm shared +-- @bool RequireAimToUse + +--- +-- RequireAimToSecondaryUse, Field of type bool +-- @realm shared +-- @bool RequireAimToSecondaryUse + +--- +-- Color, Field of type Color +-- @realm shared +-- @Color Color + +--- +-- IsFullCondition, Field of type bool +-- @realm shared +-- @bool IsFullCondition + +--- +-- MaxCondition, Field of type number +-- @realm shared +-- @number MaxCondition + +--- +-- ConditionPercentage, Field of type number +-- @realm shared +-- @number ConditionPercentage + +--- +-- OffsetOnSelectedMultiplier, Field of type number +-- @realm shared +-- @number OffsetOnSelectedMultiplier + +--- +-- HealthMultiplier, Field of type number +-- @realm shared +-- @number HealthMultiplier + +--- +-- Condition, Field of type number +-- @realm shared +-- @number Condition + +--- +-- Health, Field of type number +-- @realm shared +-- @number Health + +--- +-- Indestructible, Field of type bool +-- @realm shared +-- @bool Indestructible + +--- +-- InvulnerableToDamage, Field of type bool +-- @realm shared +-- @bool InvulnerableToDamage + +--- +-- SpawnedInOutpost, Field of type bool +-- @realm shared +-- @bool SpawnedInOutpost + +--- +-- OriginalOutpost, Field of type string +-- @realm shared +-- @string OriginalOutpost + +--- +-- Tags, Field of type string +-- @realm shared +-- @string Tags + +--- +-- FireProof, Field of type bool +-- @realm shared +-- @bool FireProof + +--- +-- WaterProof, Field of type bool +-- @realm shared +-- @bool WaterProof + +--- +-- UseInHealthInterface, Field of type bool +-- @realm shared +-- @bool UseInHealthInterface + +--- +-- InWater, Field of type bool +-- @realm shared +-- @bool InWater + +--- +-- LastSentSignalRecipients, Field of type table +-- @realm shared +-- @table LastSentSignalRecipients + +--- +-- ConfigFile, Field of type string +-- @realm shared +-- @string ConfigFile + +--- +-- AllowedSlots, Field of type IEnumerable`1 +-- @realm shared +-- @IEnumerable`1 AllowedSlots + +--- +-- Connections, Field of type table +-- @realm shared +-- @table Connections + +--- +-- ContainedItems, Field of type IEnumerable`1 +-- @realm shared +-- @IEnumerable`1 ContainedItems + +--- +-- OwnInventory, Field of type ItemInventory +-- @realm shared +-- @ItemInventory OwnInventory + +--- +-- DisplaySideBySideWhenLinked, Field of type bool +-- @realm shared +-- @bool DisplaySideBySideWhenLinked + +--- +-- Repairables, Field of type IEnumerable`1 +-- @realm shared +-- @IEnumerable`1 Repairables + +--- +-- Components, Field of type IEnumerable`1 +-- @realm shared +-- @IEnumerable`1 Components + +--- +-- Linkable, Field of type bool +-- @realm shared +-- @bool Linkable + +--- +-- PositionX, Field of type number +-- @realm shared +-- @number PositionX + +--- +-- PositionY, Field of type number +-- @realm shared +-- @number PositionY + +--- +-- Infector, Field of type BallastFloraBranch +-- @realm shared +-- @BallastFloraBranch Infector + +--- +-- PendingItemSwap, Field of type ItemPrefab +-- @realm shared +-- @ItemPrefab PendingItemSwap + +--- +-- AllPropertyObjects, Field of type IEnumerable`1 +-- @realm shared +-- @IEnumerable`1 AllPropertyObjects + +--- +-- OrderedToBeIgnored, Field of type bool +-- @realm shared +-- @bool OrderedToBeIgnored + +--- +-- 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 + +--- +-- Rect, Field of type Rectangle +-- @realm shared +-- @Rectangle Rect + +--- +-- WorldRect, Field of type Rectangle +-- @realm shared +-- @Rectangle WorldRect + +--- +-- 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 + +--- +-- HiddenInGame, Field of type bool +-- @realm shared +-- @bool HiddenInGame + +--- +-- ParentRuin, Field of type Ruin +-- @realm shared +-- @Ruin ParentRuin + +--- +-- 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 + +--- +-- 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 + +--- +-- SpawnTime, Field of type number +-- @realm shared +-- @number SpawnTime + +--- +-- PreviousParentInventory, Field of type Inventory +-- @realm shared +-- @Inventory PreviousParentInventory + +--- +-- Visible, Field of type bool +-- @realm shared +-- @bool Visible + +--- +-- StaticBodyConfig, Field of type XElement +-- @realm shared +-- @XElement StaticBodyConfig + +--- +-- StaticFixtures, Field of type table +-- @realm shared +-- @table StaticFixtures + +--- +-- StolenDuringRound, Field of type bool +-- @realm shared +-- @bool StolenDuringRound + +--- +-- AllowStealing, Field of type bool +-- @realm shared +-- @bool AllowStealing + +--- +-- AvailableSwaps, Field of type HashSet`1 +-- @realm shared +-- @HashSet`1 AvailableSwaps + +--- +-- Item.ShowLinks, Field of type bool +-- @realm shared +-- @bool Item.ShowLinks + +--- +-- Item.connectionPairs, Field of type Pair`2[] +-- @realm shared +-- @Pair`2[] Item.connectionPairs + +--- +-- 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 ObservableCollection`1 +-- @realm shared +-- @ObservableCollection`1 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/Submarine.lua b/docs/lua/Submarine.lua new file mode 100644 index 000000000..e44957442 --- /dev/null +++ b/docs/lua/Submarine.lua @@ -0,0 +1,591 @@ +-- luacheck: ignore 111 + +--[[-- +Barotrauma Submarine class with some additional functions and fields + +Barotrauma source code: [Submarine.cs](https://github.com/evilfactory/Barotrauma-lua-attempt/blob/master/Barotrauma/BarotraumaShared/SharedSource/Map/Submarine.cs) + +Not all fields and methods will work, this doc was autogenerated. +]] +-- @code Submarine +-- @pragma nostrip + +local Submarine = {} + +--- GetBorders +-- @realm shared +-- @tparam XElement submarineElement +-- @treturn Rectangle +function Submarine.GetBorders(submarineElement) end + +--- Load +-- @realm shared +-- @tparam SubmarineInfo info +-- @tparam bool unloadPrevious +-- @tparam IdRemap linkedRemap +-- @treturn Submarine +function Submarine.Load(info, unloadPrevious, linkedRemap) end + +--- RepositionEntities +-- @realm shared +-- @tparam Vector2 moveAmount +-- @tparam IEnumerable`1 entities +function Submarine.RepositionEntities(moveAmount, entities) end + +--- SaveToXElement +-- @realm shared +-- @tparam XElement element +function SaveToXElement(element) end + +--- SaveAs +-- @realm shared +-- @tparam string filePath +-- @tparam MemoryStream previewImage +-- @treturn bool +function SaveAs(filePath, previewImage) end + +--- Unload +-- @realm shared +function Submarine.Unload() end + +--- Remove +-- @realm shared +function Remove() end + +--- Dispose +-- @realm shared +function Dispose() end + +--- DisableObstructedWayPoints +-- @realm shared +function DisableObstructedWayPoints() end + +--- DisableObstructedWayPoints +-- @realm shared +-- @tparam Submarine otherSub +function DisableObstructedWayPoints(otherSub) end + +--- EnableObstructedWaypoints +-- @realm shared +-- @tparam Submarine otherSub +function EnableObstructedWaypoints(otherSub) end + +--- RefreshOutdoorNodes +-- @realm shared +function RefreshOutdoorNodes() end + +--- ServerWrite +-- @realm shared +-- @tparam IWriteMessage msg +-- @tparam Client c +-- @tparam Object[] extraData +function ServerWrite(msg, c, extraData) end + +--- ToString +-- @realm shared +-- @treturn string +function ToString() end + +--- CalculateBasePrice +-- @realm shared +-- @treturn number +function CalculateBasePrice() end + +--- AttemptBallastFloraInfection +-- @realm shared +-- @tparam string identifier +-- @tparam number deltaTime +-- @tparam number probability +function AttemptBallastFloraInfection(identifier, deltaTime, probability) end + +--- MakeWreck +-- @realm shared +function MakeWreck() end + +--- CreateWreckAI +-- @realm shared +-- @treturn bool +function CreateWreckAI() end + +--- DisableWreckAI +-- @realm shared +function DisableWreckAI() end + +--- GetDockedBorders +-- @realm shared +-- @tparam table checkd +-- @treturn Rectangle +function GetDockedBorders(checkd) end + +--- GetConnectedSubs +-- @realm shared +-- @treturn table +function GetConnectedSubs() end + +--- FindSpawnPos +-- @realm shared +-- @tparam Vector2 spawnPos +-- @tparam Nullable`1 submarineSize +-- @tparam number subDockingPortOffset +-- @tparam number verticalMoveDir +-- @treturn Vector2 +function FindSpawnPos(spawnPos, submarineSize, subDockingPortOffset, verticalMoveDir) end + +--- UpdateTransform +-- @realm shared +-- @tparam bool interpolate +function UpdateTransform(interpolate) end + +--- VectorToWorldGrid +-- @realm shared +-- @tparam Vector2 position +-- @treturn Vector2 +function Submarine.VectorToWorldGrid(position) end + +--- CalculateDimensions +-- @realm shared +-- @tparam bool onlyHulls +-- @treturn Rectangle +function CalculateDimensions(onlyHulls) end + +--- AbsRect +-- @realm shared +-- @tparam Vector2 pos +-- @tparam Vector2 size +-- @treturn Rectangle +function Submarine.AbsRect(pos, size) end + +--- RectContains +-- @realm shared +-- @tparam Rectangle rect +-- @tparam Vector2 pos +-- @tparam bool inclusive +-- @treturn bool +function Submarine.RectContains(rect, pos, inclusive) end + +--- RectsOverlap +-- @realm shared +-- @tparam Rectangle rect1 +-- @tparam Rectangle rect2 +-- @tparam bool inclusive +-- @treturn bool +function Submarine.RectsOverlap(rect1, rect2, inclusive) end + +--- PickBody +-- @realm shared +-- @tparam Vector2 rayStart +-- @tparam Vector2 rayEnd +-- @tparam IEnumerable`1 ignoredBodies +-- @tparam Nullable`1 collisionCategory +-- @tparam bool ignoreSensors +-- @tparam Predicate`1 customPredicate +-- @tparam bool allowInsideFixture +-- @treturn Body +function Submarine.PickBody(rayStart, rayEnd, ignoredBodies, collisionCategory, ignoreSensors, customPredicate, allowInsideFixture) end + +--- LastPickedBodyDist +-- @realm shared +-- @tparam Body body +-- @treturn number +function Submarine.LastPickedBodyDist(body) end + +--- PickBodies +-- @realm shared +-- @tparam Vector2 rayStart +-- @tparam Vector2 rayEnd +-- @tparam IEnumerable`1 ignoredBodies +-- @tparam Nullable`1 collisionCategory +-- @tparam bool ignoreSensors +-- @tparam Predicate`1 customPredicate +-- @tparam bool allowInsideFixture +-- @treturn IEnumerable`1 +function Submarine.PickBodies(rayStart, rayEnd, ignoredBodies, collisionCategory, ignoreSensors, customPredicate, allowInsideFixture) end + +--- CheckVisibility +-- @realm shared +-- @tparam Vector2 rayStart +-- @tparam Vector2 rayEnd +-- @tparam bool ignoreLevel +-- @tparam bool ignoreSubs +-- @tparam bool ignoreSensors +-- @tparam bool ignoreDisabledWalls +-- @tparam bool ignoreBranches +-- @treturn Body +function Submarine.CheckVisibility(rayStart, rayEnd, ignoreLevel, ignoreSubs, ignoreSensors, ignoreDisabledWalls, ignoreBranches) end + +--- FlipX +-- @realm shared +-- @tparam table parents +function FlipX(parents) end + +--- Update +-- @realm shared +-- @tparam number deltaTime +function Update(deltaTime) end + +--- ApplyForce +-- @realm shared +-- @tparam Vector2 force +function ApplyForce(force) end + +--- EnableMaintainPosition +-- @realm shared +function EnableMaintainPosition() end + +--- NeutralizeBallast +-- @realm shared +function NeutralizeBallast() end + +--- WarmStartPower +-- @realm shared +function WarmStartPower() end + +--- SetPrevTransform +-- @realm shared +-- @tparam Vector2 position +function SetPrevTransform(position) end + +--- SetPosition +-- @realm shared +-- @tparam Vector2 position +-- @tparam table checkd +-- @tparam bool forceUndockFromStaticSubmarines +function SetPosition(position, checkd, forceUndockFromStaticSubmarines) end + +--- CalculateDockOffset +-- @realm shared +-- @tparam Submarine sub +-- @tparam Submarine dockedSub +-- @treturn Nullable`1 +function Submarine.CalculateDockOffset(sub, dockedSub) end + +--- Translate +-- @realm shared +-- @tparam Vector2 amount +function Translate(amount) end + +--- FindClosest +-- @realm shared +-- @tparam Vector2 worldPosition +-- @tparam bool ignoreOutposts +-- @tparam bool ignoreOutsideLevel +-- @tparam bool ignoreRespawnShuttle +-- @tparam Nullable`1 teamType +-- @treturn Submarine +function Submarine.FindClosest(worldPosition, ignoreOutposts, ignoreOutsideLevel, ignoreRespawnShuttle, teamType) end + +--- IsConnectedTo +-- @realm shared +-- @tparam Submarine otherSub +-- @treturn bool +function IsConnectedTo(otherSub) end + +--- GetHulls +-- @realm shared +-- @tparam bool alsoFromConnectedSubs +-- @treturn table +function GetHulls(alsoFromConnectedSubs) end + +--- GetGaps +-- @realm shared +-- @tparam bool alsoFromConnectedSubs +-- @treturn table +function GetGaps(alsoFromConnectedSubs) end + +--- GetItems +-- @realm shared +-- @tparam bool alsoFromConnectedSubs +-- @treturn table +function GetItems(alsoFromConnectedSubs) end + +--- GetWaypoints +-- @realm shared +-- @tparam bool alsoFromConnectedSubs +-- @treturn table +function GetWaypoints(alsoFromConnectedSubs) end + +--- GetWalls +-- @realm shared +-- @tparam bool alsoFromConnectedSubs +-- @treturn table +function GetWalls(alsoFromConnectedSubs) end + +--- GetEntities +-- @realm shared +-- @tparam bool includingConnectedSubs +-- @tparam table list +-- @treturn table +function GetEntities(includingConnectedSubs, list) end + +--- GetCargoContainers +-- @realm shared +-- @treturn table +function GetCargoContainers() end + +--- GetEntities +-- @realm shared +-- @tparam bool includingConnectedSubs +-- @tparam IEnumerable`1 list +-- @treturn IEnumerable`1 +function GetEntities(includingConnectedSubs, list) end + +--- IsEntityFoundOnThisSub +-- @realm shared +-- @tparam MapEntity entity +-- @tparam bool includingConnectedSubs +-- @tparam bool allowDifferentTeam +-- @tparam bool allowDifferentType +-- @treturn bool +function IsEntityFoundOnThisSub(entity, includingConnectedSubs, allowDifferentTeam, allowDifferentType) end + +--- FindContaining +-- @realm shared +-- @tparam Vector2 position +-- @treturn Submarine +function Submarine.FindContaining(position) end + +--- FreeID +-- @realm shared +function FreeID() 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 + +--- +-- Info, Field of type SubmarineInfo +-- @realm shared +-- @SubmarineInfo Info + +--- +-- HiddenSubPosition, Field of type Vector2 +-- @realm shared +-- @Vector2 HiddenSubPosition + +--- +-- IdOffset, Field of type number +-- @realm shared +-- @number IdOffset + +--- +-- Submarine.MainSub, Field of type Submarine +-- @realm shared +-- @Submarine Submarine.MainSub + +--- +-- Submarine.VisibleEntities, Field of type IEnumerable`1 +-- @realm shared +-- @IEnumerable`1 Submarine.VisibleEntities + +--- +-- DockedTo, Field of type IEnumerable`1 +-- @realm shared +-- @IEnumerable`1 DockedTo + +--- +-- Submarine.LastPickedPosition, Field of type Vector2 +-- @realm shared +-- @Vector2 Submarine.LastPickedPosition + +--- +-- Submarine.LastPickedFraction, Field of type number +-- @realm shared +-- @number Submarine.LastPickedFraction + +--- +-- Submarine.LastPickedFixture, Field of type Fixture +-- @realm shared +-- @Fixture Submarine.LastPickedFixture + +--- +-- Submarine.LastPickedNormal, Field of type Vector2 +-- @realm shared +-- @Vector2 Submarine.LastPickedNormal + +--- +-- Loading, Field of type bool +-- @realm shared +-- @bool Loading + +--- +-- GodMode, Field of type bool +-- @realm shared +-- @bool GodMode + +--- +-- Submarine.Loaded, Field of type table +-- @realm shared +-- @table Submarine.Loaded + +--- +-- SubBody, Field of type SubmarineBody +-- @realm shared +-- @SubmarineBody SubBody + +--- +-- PhysicsBody, Field of type PhysicsBody +-- @realm shared +-- @PhysicsBody PhysicsBody + +--- +-- Borders, Field of type Rectangle +-- @realm shared +-- @Rectangle Borders + +--- +-- Position, Field of type Vector2 +-- @realm shared +-- @Vector2 Position + +--- +-- WorldPosition, Field of type Vector2 +-- @realm shared +-- @Vector2 WorldPosition + +--- +-- RealWorldCrushDepth, Field of type number +-- @realm shared +-- @number RealWorldCrushDepth + +--- +-- RealWorldDepth, Field of type number +-- @realm shared +-- @number RealWorldDepth + +--- +-- AtEndExit, Field of type bool +-- @realm shared +-- @bool AtEndExit + +--- +-- AtStartExit, Field of type bool +-- @realm shared +-- @bool AtStartExit + +--- +-- DrawPosition, Field of type Vector2 +-- @realm shared +-- @Vector2 DrawPosition + +--- +-- SimPosition, Field of type Vector2 +-- @realm shared +-- @Vector2 SimPosition + +--- +-- Velocity, Field of type Vector2 +-- @realm shared +-- @Vector2 Velocity + +--- +-- HullVertices, Field of type table +-- @realm shared +-- @table HullVertices + +--- +-- AtDamageDepth, Field of type bool +-- @realm shared +-- @bool AtDamageDepth + +--- +-- Removed, Field of type bool +-- @realm shared +-- @bool Removed + +--- +-- ImmuneToBallastFlora, Field of type bool +-- @realm shared +-- @bool ImmuneToBallastFlora + +--- +-- WreckAI, Field of type WreckAI +-- @realm shared +-- @WreckAI WreckAI + +--- +-- FlippedX, Field of type bool +-- @realm shared +-- @bool FlippedX + +--- +-- Submarine.Unloading, Field of type bool +-- @realm shared +-- @bool Submarine.Unloading + +--- +-- IdFreed, Field of type bool +-- @realm shared +-- @bool IdFreed + +--- +-- Submarine, Field of type Submarine +-- @realm shared +-- @Submarine Submarine + +--- +-- AiTarget, Field of type AITarget +-- @realm shared +-- @AITarget AiTarget + +--- +-- SpawnTime, Field of type number +-- @realm shared +-- @number SpawnTime + +--- +-- TeamID, Field of type CharacterTeamType +-- @realm shared +-- @CharacterTeamType TeamID + +--- +-- ConnectedDockingPorts, Field of type table +-- @realm shared +-- @table ConnectedDockingPorts + +--- +-- ShowSonarMarker, Field of type bool +-- @realm shared +-- @bool ShowSonarMarker + +--- +-- Submarine.HiddenSubStartPosition, Field of type Vector2 +-- @realm shared +-- @Vector2 Submarine.HiddenSubStartPosition + +--- +-- Submarine.LockX, Field of type bool +-- @realm shared +-- @bool Submarine.LockX + +--- +-- Submarine.LockY, Field of type bool +-- @realm shared +-- @bool Submarine.LockY + +--- +-- Submarine.GridSize, Field of type Vector2 +-- @realm shared +-- @Vector2 Submarine.GridSize + +--- +-- Submarine.MainSubs, Field of type Submarine[] +-- @realm shared +-- @Submarine[] Submarine.MainSubs + +--- +-- ID, Field of type number +-- @realm shared +-- @number ID +