Refactor LuaDocs generator

This commit is contained in:
peelz
2022-08-03 21:34:42 -04:00
parent 545c38c26c
commit 4a6e13a0dc
38 changed files with 482 additions and 12520 deletions

View File

@@ -21,6 +21,13 @@ jobs:
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
3.1.x
6.0.x
- uses: leafo/gh-actions-lua@v8
with:
luaVersion: "5.2"
@@ -31,6 +38,10 @@ jobs:
working-directory: ${{ env.DOCS_LUA_ROOT }}
run: ./scripts/install.sh
- name: Run docs generator script
working-directory: ${{ env.DOCS_LUA_ROOT }}
run: ./scripts/generate_docs.sh
- name: Run build script
working-directory: ${{ env.DOCS_LUA_ROOT }}
run: ./scripts/build.sh

View File

@@ -1,326 +1,3 @@
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;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
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";
}
if (type.StartsWith("Action"))
return "function";
if (type.StartsWith("Func"))
return "function";
if (type.StartsWith("IEnumerable"))
return "Enumerable";
return type;
}
public static string EscapeName(string n)
{
if (n == "end")
return "endparam";
return n;
}
private static (bool Success, string Output, string Error) TryRunGitCommand(string args)
{
static string GetGitBinary()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process)
?.Split(';')
.Select(x => Path.Join(x, "git.exe"))
.FirstOrDefault(File.Exists);
}
else
{
return Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process)
?.Split(':')
.Select(x => Path.Join(x, "git"))
.FirstOrDefault(File.Exists);
}
}
var gitBinary = GetGitBinary();
if (gitBinary == null)
{
throw new InvalidOperationException("Failed to find git binary in PATH");
}
using var process = Process.Start(new ProcessStartInfo(gitBinary, args)
{
WindowStyle = ProcessWindowStyle.Hidden,
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardInput = true,
RedirectStandardError = true,
RedirectStandardOutput = true,
});
process.Start();
var stdOut = process.StandardOutput.ReadToEndAsync();
var stdErr = process.StandardError.ReadToEndAsync();
Task.WhenAll(stdOut, stdErr).GetAwaiter().GetResult();
process.WaitForExit();
return (process.ExitCode == 0, stdOut.Result.TrimEnd('\r', '\n'), stdErr.Result);
}
private static readonly Lazy<string> GitDir = new Lazy<string>(() =>
{
var (success, gitDir, error) = TryRunGitCommand("rev-parse --show-toplevel");
if (!success)
{
throw new InvalidDataException($"Failed to determine the root of the git repo: {error}");
}
return gitDir;
});
public static void GenerateDocs()
{
var basePath = $"{GitDir.Value}/luacs-docs/lua";
Directory.Delete($"{basePath}/lua/generated", true);
GenerateDocs(typeof(Character), "Character.lua");
GenerateDocs(typeof(CharacterInfo), "CharacterInfo.lua");
GenerateDocs(typeof(CharacterHealth), "CharacterHealth.lua");
GenerateDocs(typeof(AnimController), "AnimController.lua");
GenerateDocs(typeof(Client), "Client.lua");
GenerateDocs(typeof(Entity), "Entity.lua");
GenerateDocs(typeof(EntitySpawner), "Entity.Spawner.lua", "Entity.Spawner");
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");
GenerateDocs(typeof(NetLobbyScreen), "NetLobbyScreen.lua", "Game.NetLobbyScreen");
GenerateDocs(typeof(GameScreen), "GameScreen.lua", "Game.GameScreen");
GenerateDocs(typeof(FarseerPhysics.Dynamics.World), "World.lua", "Game.World");
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");
GenerateDocs(typeof(WayPoint), "WayPoint.lua", "WayPoint");
GenerateDocs(typeof(ServerSettings), "ServerSettings.lua", "Game.ServerSettings");
GenerateDocs(typeof(GameSettings), "GameSettings.lua", "Game.Settings");
}
private static void GenerateDocs(Type type, string file, string categoryName = null)
{
var basePath = $"{GitDir.Value}/luacs-docs/lua";
GenerateDocs(type, $"{basePath}/baseluadocs/{file}", $"{basePath}/lua/generated/{file}", categoryName);
}
private static void GenerateDocs(Type type, string baselua, string fileresult, string categoryName = null)
{
var sb = new StringBuilder();
if (categoryName == null)
categoryName = type.Name;
var baseluatext = "";
if (!File.Exists(baselua))
{
const string EMPTY_TABLE = "{}";
baseluatext = @$"-- luacheck: ignore 111
--[[--
{type.FullName}
]]
-- @code {categoryName}
-- @pragma nostrip
local {type.Name} = {EMPTY_TABLE}";
File.WriteAllText(baselua, baseluatext);
}
else
baseluatext = File.ReadAllText(baselua);
HashSet<string> removed = new HashSet<string>();
foreach(var line in baseluatext.Split('\n'))
{
if(line.Contains("-- @remove "))
{
var replaced = line.Replace("-- @remove ", "").Replace("\r", "");
removed.Add(replaced);
}
}
sb.Append(baseluatext + "\n\n");
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;
var lsb = new StringBuilder();
lsb.Append($"--- {method.Name}\n");
lsb.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 + EscapeName(parameter.Name);
else
paramNames = paramNames + EscapeName(parameter.Name) + ", ";
lsb.Append($"-- @tparam {ConvertTypeName(parameter.ParameterType.Name)} {EscapeName(parameter.Name)}\n");
}
if (method.ReturnType != typeof(void))
{
lsb.Append($"-- @treturn {ConvertTypeName(method.ReturnType.Name)}\n");
}
string functionDecoration;
if (method.IsStatic)
functionDecoration = $"function {type.Name}.{method.Name}({paramNames}) end";
else
functionDecoration = $"function {method.Name}({paramNames}) end";
if (removed.Contains(functionDecoration))
{
continue;
}
lsb.Append(functionDecoration);
lsb.Append("\n\n");
sb.Append(lsb);
}
if (member.MemberType == MemberTypes.Field)
{
var lsb = new StringBuilder();
var field = (FieldInfo)member;
lsb.Append($"---\n");
lsb.Append($"-- ");
var name = EscapeName(field.Name);
var returnName = ConvertTypeName(field.FieldType.Name);
if (field.IsStatic)
name = type.Name + "." + field.Name;
if (removed.Contains(name))
continue;
lsb.Append(name);
lsb.Append($", Field of type {returnName}\n");
lsb.Append($"-- @realm shared\n");
lsb.Append($"-- @field {name}\n");
lsb.Append("\n");
sb.Append(lsb);
}
if (member.MemberType == MemberTypes.Property)
{
var lsb = new StringBuilder();
var property = (PropertyInfo)member;
lsb.Append($"---\n");
lsb.Append($"-- ");
var name = EscapeName(property.Name);
var returnName = ConvertTypeName(property.PropertyType.Name);
if (property.GetGetMethod()?.IsStatic == true || property.GetSetMethod()?.IsStatic == true)
name = type.Name + "." + property.Name;
if (removed.Contains(name))
continue;
lsb.Append(name);
lsb.Append($", Field of type {returnName}\n");
lsb.Append($"-- @realm shared\n");
lsb.Append($"-- @field {name}\n");
lsb.Append("\n");
sb.Append(lsb);
}
}
new FileInfo(fileresult).Directory.Create();
File.WriteAllText(fileresult, sb.ToString());
}
}
}
[assembly: InternalsVisibleTo("LuaDocsGenerator")]

16
luacs-docs/.editorconfig Normal file
View File

@@ -0,0 +1,16 @@
[*]
end_of_line = lf
[*.cs]
indent_style = space
indent_size = 2
csharp_prefer_braces = when_multiline:warning
csharp_indent_case_contents_when_block = false
# One True Brace style
csharp_new_line_before_open_brace = none
csharp_new_line_before_else = false
csharp_new_line_before_catch = false
csharp_new_line_before_finally = false
csharp_new_line_before_members_in_object_initializers = false
csharp_new_line_before_members_in_anonymous_types = false
csharp_new_line_between_query_expression_clauses = false

2
luacs-docs/.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
# prevent git from converting our line endings to CRLF
* text=auto eol=lf

View File

@@ -1,2 +1,3 @@
build
lua_modules
lua/generated

View File

@@ -1,262 +0,0 @@
-- 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
--- GetVitalityDecrease
-- @realm shared
-- @tparam CharacterHealth characterHealth
-- @tparam number strength
-- @treturn number
function GetVitalityDecrease(characterHealth, strength) 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 Identifier afflictionId
-- @treturn number
function GetResistance(afflictionId) 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 Identifier
-- @realm shared
-- @Identifier 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

View File

@@ -1,299 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma.AfflictionPrefab
]]
-- @code AfflictionPrefab
-- @pragma nostrip
local AfflictionPrefab = {}
--- Dispose
-- @realm shared
function Dispose() end
--- LoadAllEffects
-- @realm shared
function AfflictionPrefab.LoadAllEffects() end
--- ClearAllEffects
-- @realm shared
function AfflictionPrefab.ClearAllEffects() end
--- LoadEffects
-- @realm shared
function LoadEffects() end
--- ClearEffects
-- @realm shared
function ClearEffects() 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.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.List, Field of type Enumerable
-- @realm shared
-- @Enumerable AfflictionPrefab.List
---
-- 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
---
-- UintIdentifier, Field of type number
-- @realm shared
-- @number UintIdentifier
---
-- ContentPackage, Field of type ContentPackage
-- @realm shared
-- @ContentPackage ContentPackage
---
-- FilePath, Field of type ContentPath
-- @realm shared
-- @ContentPath FilePath
---
-- AfflictionType, Field of type Identifier
-- @realm shared
-- @Identifier AfflictionType
---
-- LimbSpecific, Field of type bool
-- @realm shared
-- @bool LimbSpecific
---
-- IndicatorLimb, Field of type LimbType
-- @realm shared
-- @LimbType IndicatorLimb
---
-- Name, Field of type LocalizedString
-- @realm shared
-- @LocalizedString Name
---
-- Description, Field of type LocalizedString
-- @realm shared
-- @LocalizedString Description
---
-- TranslationIdentifier, Field of type Identifier
-- @realm shared
-- @Identifier TranslationIdentifier
---
-- IsBuff, Field of type bool
-- @realm shared
-- @bool IsBuff
---
-- HealableInMedicalClinic, Field of type bool
-- @realm shared
-- @bool HealableInMedicalClinic
---
-- HealCostMultiplier, Field of type number
-- @realm shared
-- @number HealCostMultiplier
---
-- BaseHealCost, Field of type number
-- @realm shared
-- @number BaseHealCost
---
-- CauseOfDeathDescription, Field of type LocalizedString
-- @realm shared
-- @LocalizedString CauseOfDeathDescription
---
-- SelfCauseOfDeathDescription, Field of type LocalizedString
-- @realm shared
-- @LocalizedString 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 Identifier
-- @realm shared
-- @Identifier 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.Prefabs, Field of type PrefabCollection`1
-- @realm shared
-- @PrefabCollection`1 AfflictionPrefab.Prefabs
---
-- Identifier, Field of type Identifier
-- @realm shared
-- @Identifier Identifier
---
-- ContentFile, Field of type ContentFile
-- @realm shared
-- @ContentFile ContentFile

View File

@@ -1,591 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma.AnimController
]]
-- @code AnimController
-- @pragma nostrip
local AnimController = {}
--- UpdateAnim
-- @realm shared
-- @tparam number deltaTime
function UpdateAnim(deltaTime) end
--- DragCharacter
-- @realm shared
-- @tparam Character target
-- @tparam number deltaTime
function DragCharacter(target, deltaTime) end
--- GetSpeed
-- @realm shared
-- @tparam AnimationType type
-- @treturn number
function GetSpeed(type) end
--- GetCurrentSpeed
-- @realm shared
-- @tparam bool useMaxSpeed
-- @treturn number
function GetCurrentSpeed(useMaxSpeed) end
--- GetAnimationParamsFromType
-- @realm shared
-- @tparam AnimationType type
-- @treturn AnimationParams
function GetAnimationParamsFromType(type) end
--- GetHeightFromFloor
-- @realm shared
-- @treturn number
function GetHeightFromFloor() end
--- UpdateUseItem
-- @realm shared
-- @tparam bool allowMovement
-- @tparam Vector2 handWorldPos
function UpdateUseItem(allowMovement, handWorldPos) end
--- Grab
-- @realm shared
-- @tparam Vector2 rightHandPos
-- @tparam Vector2 leftHandPos
function Grab(rightHandPos, leftHandPos) end
--- HoldItem
-- @realm shared
-- @tparam number deltaTime
-- @tparam Item item
-- @tparam Vector2[] handlePos
-- @tparam Vector2 holdPos
-- @tparam Vector2 aimPos
-- @tparam bool aim
-- @tparam number holdAngle
-- @tparam number itemAngleRelativeToHoldAngle
-- @tparam bool aimMelee
function HoldItem(deltaTime, item, handlePos, holdPos, aimPos, aim, holdAngle, itemAngleRelativeToHoldAngle, aimMelee) end
--- HandIK
-- @realm shared
-- @tparam Limb hand
-- @tparam Vector2 pos
-- @tparam number armTorque
-- @tparam number handTorque
-- @tparam number maxAngularVelocity
function HandIK(hand, pos, armTorque, handTorque, maxAngularVelocity) end
--- ApplyPose
-- @realm shared
-- @tparam Vector2 leftHandPos
-- @tparam Vector2 rightHandPos
-- @tparam Vector2 leftFootPos
-- @tparam Vector2 rightFootPos
-- @tparam number footMoveForce
function ApplyPose(leftHandPos, rightHandPos, leftFootPos, rightFootPos, footMoveForce) end
--- ApplyTestPose
-- @realm shared
function ApplyTestPose() end
--- Recreate
-- @realm shared
-- @tparam RagdollParams ragdollParams
function Recreate(ragdollParams) end
--- GetLimb
-- @realm shared
-- @tparam LimbType limbType
-- @tparam bool excludeSevered
-- @treturn Limb
function GetLimb(limbType, excludeSevered) end
--- GetMouthPosition
-- @realm shared
-- @treturn Nullable`1
function GetMouthPosition() end
--- GetColliderBottom
-- @realm shared
-- @treturn Vector2
function GetColliderBottom() end
--- FindLowestLimb
-- @realm shared
-- @treturn Limb
function FindLowestLimb() end
--- ReleaseStuckLimbs
-- @realm shared
function ReleaseStuckLimbs() end
--- HideAndDisable
-- @realm shared
-- @tparam LimbType limbType
-- @tparam number duration
-- @tparam bool ignoreCollisions
function HideAndDisable(limbType, duration, ignoreCollisions) end
--- RestoreTemporarilyDisabled
-- @realm shared
function RestoreTemporarilyDisabled() end
--- Remove
-- @realm shared
function Remove() end
--- SubtractMass
-- @realm shared
-- @tparam Limb limb
function SubtractMass(limb) end
--- SaveRagdoll
-- @realm shared
-- @tparam string fileNameWithoutExtension
function SaveRagdoll(fileNameWithoutExtension) end
--- ResetRagdoll
-- @realm shared
-- @tparam bool forceReload
function ResetRagdoll(forceReload) end
--- ResetJoints
-- @realm shared
function ResetJoints() end
--- ResetLimbs
-- @realm shared
function ResetLimbs() end
--- AddJoint
-- @realm shared
-- @tparam JointParams jointParams
function AddJoint(jointParams) end
--- AddLimb
-- @realm shared
-- @tparam Limb limb
function AddLimb(limb) end
--- RemoveLimb
-- @realm shared
-- @tparam Limb limb
function RemoveLimb(limb) end
--- OnLimbCollision
-- @realm shared
-- @tparam Fixture f1
-- @tparam Fixture f2
-- @tparam Contact contact
-- @treturn bool
function OnLimbCollision(f1, f2, contact) end
--- SeverLimbJoint
-- @realm shared
-- @tparam LimbJoint limbJoint
-- @treturn bool
function SeverLimbJoint(limbJoint) end
--- Flip
-- @realm shared
function Flip() end
--- GetCenterOfMass
-- @realm shared
-- @treturn Vector2
function GetCenterOfMass() end
--- MoveLimb
-- @realm shared
-- @tparam Limb limb
-- @tparam Vector2 pos
-- @tparam number amount
-- @tparam bool pullFromCenter
function MoveLimb(limb, pos, amount, pullFromCenter) end
--- ResetPullJoints
-- @realm shared
function ResetPullJoints() end
--- FindHull
-- @realm shared
-- @tparam Nullable`1 worldPosition
-- @tparam bool setSubmarine
function FindHull(worldPosition, setSubmarine) end
--- Teleport
-- @realm shared
-- @tparam Vector2 moveAmount
-- @tparam Vector2 velocityChange
-- @tparam bool detachProjectiles
function Teleport(moveAmount, velocityChange, detachProjectiles) end
--- Update
-- @realm shared
-- @tparam number deltaTime
-- @tparam Camera cam
function Update(deltaTime, cam) end
--- ForceRefreshFloorY
-- @realm shared
function ForceRefreshFloorY() end
--- GetSurfaceY
-- @realm shared
-- @treturn number
function GetSurfaceY() end
--- SetPosition
-- @realm shared
-- @tparam Vector2 simPosition
-- @tparam bool lerp
-- @tparam bool ignorePlatforms
-- @tparam bool forceMainLimbToCollider
-- @tparam bool detachProjectiles
function SetPosition(simPosition, lerp, ignorePlatforms, forceMainLimbToCollider, detachProjectiles) end
--- Hang
-- @realm shared
function Hang() 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
---
-- RightHandIKPos, Field of type Vector2
-- @realm shared
-- @Vector2 RightHandIKPos
---
-- LeftHandIKPos, Field of type Vector2
-- @realm shared
-- @Vector2 LeftHandIKPos
---
-- IsAiming, Field of type bool
-- @realm shared
-- @bool IsAiming
---
-- IsAimingMelee, Field of type bool
-- @realm shared
-- @bool IsAimingMelee
---
-- ArmLength, Field of type number
-- @realm shared
-- @number ArmLength
---
-- WalkParams, Field of type GroundedMovementParams
-- @realm shared
-- @GroundedMovementParams WalkParams
---
-- RunParams, Field of type GroundedMovementParams
-- @realm shared
-- @GroundedMovementParams RunParams
---
-- SwimSlowParams, Field of type SwimParams
-- @realm shared
-- @SwimParams SwimSlowParams
---
-- SwimFastParams, Field of type SwimParams
-- @realm shared
-- @SwimParams SwimFastParams
---
-- CurrentAnimationParams, Field of type AnimationParams
-- @realm shared
-- @AnimationParams CurrentAnimationParams
---
-- ForceSelectAnimationType, Field of type AnimationType
-- @realm shared
-- @AnimationType ForceSelectAnimationType
---
-- CurrentGroundedParams, Field of type GroundedMovementParams
-- @realm shared
-- @GroundedMovementParams CurrentGroundedParams
---
-- CurrentSwimParams, Field of type SwimParams
-- @realm shared
-- @SwimParams CurrentSwimParams
---
-- CanWalk, Field of type bool
-- @realm shared
-- @bool CanWalk
---
-- IsMovingBackwards, Field of type bool
-- @realm shared
-- @bool IsMovingBackwards
---
-- IsMovingFast, Field of type bool
-- @realm shared
-- @bool IsMovingFast
---
-- AllAnimParams, Field of type table
-- @realm shared
-- @table AllAnimParams
---
-- AimSourceWorldPos, Field of type Vector2
-- @realm shared
-- @Vector2 AimSourceWorldPos
---
-- AimSourcePos, Field of type Vector2
-- @realm shared
-- @Vector2 AimSourcePos
---
-- AimSourceSimPos, Field of type Vector2
-- @realm shared
-- @Vector2 AimSourceSimPos
---
-- HeadPosition, Field of type Nullable`1
-- @realm shared
-- @Nullable`1 HeadPosition
---
-- TorsoPosition, Field of type Nullable`1
-- @realm shared
-- @Nullable`1 TorsoPosition
---
-- HeadAngle, Field of type Nullable`1
-- @realm shared
-- @Nullable`1 HeadAngle
---
-- TorsoAngle, Field of type Nullable`1
-- @realm shared
-- @Nullable`1 TorsoAngle
---
-- StepSize, Field of type Nullable`1
-- @realm shared
-- @Nullable`1 StepSize
---
-- AnimationTestPose, Field of type bool
-- @realm shared
-- @bool AnimationTestPose
---
-- WalkPos, Field of type number
-- @realm shared
-- @number WalkPos
---
-- IsAboveFloor, Field of type bool
-- @realm shared
-- @bool IsAboveFloor
---
-- RagdollParams, Field of type RagdollParams
-- @realm shared
-- @RagdollParams RagdollParams
---
-- Limbs, Field of type Limb[]
-- @realm shared
-- @Limb[] Limbs
---
-- HasMultipleLimbsOfSameType, Field of type bool
-- @realm shared
-- @bool HasMultipleLimbsOfSameType
---
-- Frozen, Field of type bool
-- @realm shared
-- @bool Frozen
---
-- Character, Field of type Character
-- @realm shared
-- @Character Character
---
-- OnGround, Field of type bool
-- @realm shared
-- @bool OnGround
---
-- ColliderHeightFromFloor, Field of type number
-- @realm shared
-- @number ColliderHeightFromFloor
---
-- IsStuck, Field of type bool
-- @realm shared
-- @bool IsStuck
---
-- Collider, Field of type PhysicsBody
-- @realm shared
-- @PhysicsBody Collider
---
-- ColliderIndex, Field of type number
-- @realm shared
-- @number ColliderIndex
---
-- FloorY, Field of type number
-- @realm shared
-- @number FloorY
---
-- Mass, Field of type number
-- @realm shared
-- @number Mass
---
-- MainLimb, Field of type Limb
-- @realm shared
-- @Limb MainLimb
---
-- WorldPosition, Field of type Vector2
-- @realm shared
-- @Vector2 WorldPosition
---
-- SimplePhysicsEnabled, Field of type bool
-- @realm shared
-- @bool SimplePhysicsEnabled
---
-- TargetMovement, Field of type Vector2
-- @realm shared
-- @Vector2 TargetMovement
---
-- ImpactTolerance, Field of type number
-- @realm shared
-- @number ImpactTolerance
---
-- Draggable, Field of type bool
-- @realm shared
-- @bool Draggable
---
-- CanEnterSubmarine, Field of type bool
-- @realm shared
-- @bool CanEnterSubmarine
---
-- Dir, Field of type number
-- @realm shared
-- @number Dir
---
-- Direction, Field of type Direction
-- @realm shared
-- @Direction Direction
---
-- InWater, Field of type bool
-- @realm shared
-- @bool InWater
---
-- HeadInWater, Field of type bool
-- @realm shared
-- @bool HeadInWater
---
-- CurrentHull, Field of type Hull
-- @realm shared
-- @Hull CurrentHull
---
-- IgnorePlatforms, Field of type bool
-- @realm shared
-- @bool IgnorePlatforms
---
-- IsFlipped, Field of type bool
-- @realm shared
-- @bool IsFlipped
---
-- BodyInRest, Field of type bool
-- @realm shared
-- @bool BodyInRest
---
-- Invalid, Field of type bool
-- @realm shared
-- @bool Invalid
---
-- IsHanging, Field of type bool
-- @realm shared
-- @bool IsHanging
---
-- Anim, Field of type Animation
-- @realm shared
-- @Animation Anim
---
-- LimbJoints, Field of type LimbJoint[]
-- @realm shared
-- @LimbJoint[] LimbJoints
---
-- movement, Field of type Vector2
-- @realm shared
-- @Vector2 movement
---
-- Stairs, Field of type Structure
-- @realm shared
-- @Structure Stairs
---
-- TargetDir, Field of type Direction
-- @realm shared
-- @Direction TargetDir
---
-- forceStanding, Field of type bool
-- @realm shared
-- @bool forceStanding
---
-- forceNotStanding, Field of type bool
-- @realm shared
-- @bool forceNotStanding

File diff suppressed because it is too large Load Diff

View File

@@ -1,367 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma.CharacterHealth
]]
-- @code CharacterHealth
-- @pragma nostrip
local CharacterHealth = {}
--- GetAllAfflictions
-- @realm shared
-- @treturn IReadOnlyCollection`1
function GetAllAfflictions() end
--- GetAllAfflictions
-- @realm shared
-- @tparam function limbHealthFilter
-- @treturn Enumerable
function GetAllAfflictions(limbHealthFilter) end
--- GetAffliction
-- @realm shared
-- @tparam string identifier
-- @tparam bool allowLimbAfflictions
-- @treturn Affliction
function GetAffliction(identifier, allowLimbAfflictions) end
--- GetAffliction
-- @realm shared
-- @tparam Identifier identifier
-- @tparam bool allowLimbAfflictions
-- @treturn Affliction
function GetAffliction(identifier, allowLimbAfflictions) end
--- GetAfflictionOfType
-- @realm shared
-- @tparam Identifier afflictionType
-- @tparam bool allowLimbAfflictions
-- @treturn Affliction
function GetAfflictionOfType(afflictionType, allowLimbAfflictions) end
--- GetAffliction
-- @realm shared
-- @tparam string identifier
-- @tparam bool allowLimbAfflictions
-- @treturn T
function GetAffliction(identifier, allowLimbAfflictions) end
--- GetAffliction
-- @realm shared
-- @tparam string identifier
-- @tparam Limb limb
-- @treturn Affliction
function GetAffliction(identifier, limb) end
--- GetAfflictionLimb
-- @realm shared
-- @tparam Affliction affliction
-- @treturn Limb
function GetAfflictionLimb(affliction) end
--- GetAfflictionStrength
-- @realm shared
-- @tparam string afflictionType
-- @tparam Limb limb
-- @tparam bool requireLimbSpecific
-- @treturn number
function GetAfflictionStrength(afflictionType, limb, requireLimbSpecific) end
--- GetAfflictionStrength
-- @realm shared
-- @tparam string afflictionType
-- @tparam bool allowLimbAfflictions
-- @treturn number
function GetAfflictionStrength(afflictionType, allowLimbAfflictions) end
--- ApplyAffliction
-- @realm shared
-- @tparam Limb targetLimb
-- @tparam Affliction affliction
-- @tparam bool allowStacking
function ApplyAffliction(targetLimb, affliction, allowStacking) end
--- GetResistance
-- @realm shared
-- @tparam AfflictionPrefab afflictionPrefab
-- @treturn number
function GetResistance(afflictionPrefab) 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
--- ReduceAllAfflictionsOnAllLimbs
-- @realm shared
-- @tparam number amount
-- @tparam Nullable`1 treatmentAction
function ReduceAllAfflictionsOnAllLimbs(amount, treatmentAction) end
--- ReduceAfflictionOnAllLimbs
-- @realm shared
-- @tparam Identifier affliction
-- @tparam number amount
-- @tparam Nullable`1 treatmentAction
function ReduceAfflictionOnAllLimbs(affliction, amount, treatmentAction) end
--- ReduceAllAfflictionsOnLimb
-- @realm shared
-- @tparam Limb targetLimb
-- @tparam number amount
-- @tparam Nullable`1 treatmentAction
function ReduceAllAfflictionsOnLimb(targetLimb, amount, treatmentAction) end
--- ReduceAfflictionOnLimb
-- @realm shared
-- @tparam Limb targetLimb
-- @tparam Identifier affliction
-- @tparam number amount
-- @tparam Nullable`1 treatmentAction
function ReduceAfflictionOnLimb(targetLimb, affliction, amount, treatmentAction) end
--- ApplyDamage
-- @realm shared
-- @tparam Limb hitLimb
-- @tparam AttackResult attackResult
-- @tparam bool allowStacking
function ApplyDamage(hitLimb, attackResult, allowStacking) end
--- SetAllDamage
-- @realm shared
-- @tparam number damageAmount
-- @tparam number bleedingDamageAmount
-- @tparam number burnDamageAmount
function SetAllDamage(damageAmount, bleedingDamageAmount, burnDamageAmount) end
--- GetLimbDamage
-- @realm shared
-- @tparam Limb limb
-- @tparam string afflictionType
-- @treturn number
function GetLimbDamage(limb, afflictionType) end
--- RemoveAllAfflictions
-- @realm shared
function RemoveAllAfflictions() end
--- RemoveNegativeAfflictions
-- @realm shared
function RemoveNegativeAfflictions() end
--- Update
-- @realm shared
-- @tparam number deltaTime
function Update(deltaTime) end
--- SetVitality
-- @realm shared
-- @tparam number newVitality
function SetVitality(newVitality) end
--- CalculateVitality
-- @realm shared
function CalculateVitality() end
--- ApplyAfflictionStatusEffects
-- @realm shared
-- @tparam function type
function ApplyAfflictionStatusEffects(type) end
--- GetCauseOfDeath
-- @realm shared
-- @treturn ValueTuple`2
function GetCauseOfDeath() end
--- GetSuitableTreatments
-- @realm shared
-- @tparam table treatmentSuitability
-- @tparam bool normalize
-- @tparam Limb limb
-- @tparam bool ignoreHiddenAfflictions
-- @tparam number predictFutureDuration
function GetSuitableTreatments(treatmentSuitability, normalize, limb, ignoreHiddenAfflictions, predictFutureDuration) end
--- GetActiveAfflictionTags
-- @realm shared
-- @treturn Enumerable
function GetActiveAfflictionTags() end
--- GetActiveAfflictionTags
-- @realm shared
-- @tparam Enumerable afflictions
-- @treturn Enumerable
function GetActiveAfflictionTags(afflictions) end
--- GetPredictedStrength
-- @realm shared
-- @tparam Affliction affliction
-- @tparam number predictFutureDuration
-- @tparam Limb limb
-- @treturn number
function GetPredictedStrength(affliction, predictFutureDuration, limb) end
--- ServerWrite
-- @realm shared
-- @tparam IWriteMessage msg
function ServerWrite(msg) end
--- Remove
-- @realm shared
function Remove() end
--- SortAfflictionsBySeverity
-- @realm shared
-- @tparam Enumerable afflictions
-- @tparam bool excludeBuffs
-- @treturn Enumerable
function CharacterHealth.SortAfflictionsBySeverity(afflictions, excludeBuffs) end
--- Save
-- @realm shared
-- @tparam XElement healthElement
function Save(healthElement) end
--- Load
-- @realm shared
-- @tparam XElement element
function Load(element) 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
---
-- DoesBleed, Field of type bool
-- @realm shared
-- @bool DoesBleed
---
-- UseHealthWindow, Field of type bool
-- @realm shared
-- @bool UseHealthWindow
---
-- CrushDepth, Field of type number
-- @realm shared
-- @number CrushDepth
---
-- BloodlossAffliction, Field of type Affliction
-- @realm shared
-- @Affliction BloodlossAffliction
---
-- IsUnconscious, Field of type bool
-- @realm shared
-- @bool IsUnconscious
---
-- PressureKillDelay, Field of type number
-- @realm shared
-- @number PressureKillDelay
---
-- Vitality, Field of type number
-- @realm shared
-- @number Vitality
---
-- HealthPercentage, Field of type number
-- @realm shared
-- @number HealthPercentage
---
-- MaxVitality, Field of type number
-- @realm shared
-- @number MaxVitality
---
-- MinVitality, Field of type number
-- @realm shared
-- @number MinVitality
---
-- FaceTint, Field of type Color
-- @realm shared
-- @Color FaceTint
---
-- BodyTint, Field of type Color
-- @realm shared
-- @Color BodyTint
---
-- OxygenAmount, Field of type number
-- @realm shared
-- @number OxygenAmount
---
-- BloodlossAmount, Field of type number
-- @realm shared
-- @number BloodlossAmount
---
-- Stun, Field of type number
-- @realm shared
-- @number Stun
---
-- StunTimer, Field of type number
-- @realm shared
-- @number StunTimer
---
-- PressureAffliction, Field of type Affliction
-- @realm shared
-- @Affliction PressureAffliction
---
-- Unkillable, Field of type bool
-- @realm shared
-- @bool Unkillable
---
-- DefaultFaceTint, Field of type Color
-- @realm shared
-- @Color DefaultFaceTint
---
-- Character, Field of type Character
-- @realm shared
-- @Character Character
---
-- CharacterHealth.InsufficientOxygenThreshold, Field of type number
-- @realm shared
-- @number CharacterHealth.InsufficientOxygenThreshold
---
-- CharacterHealth.LowOxygenThreshold, Field of type number
-- @realm shared
-- @number CharacterHealth.LowOxygenThreshold

View File

@@ -1,564 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma CharacterInfo class with some additional functions and fields
Barotrauma source code: [CharacterInfo.cs](https://github.com/evilfactory/Barotrauma-lua-attempt/blob/master/Barotrauma/BarotraumaShared/SharedSource/Characters/CharacterInfo.cs)
]]
-- @code CharacterInfo
-- @pragma nostrip
local CharacterInfo = {}
--- 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 Order[] 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
--- ApplyHealthData
-- @realm shared
-- @tparam Character character
-- @tparam XElement healthData
function CharacterInfo.ApplyHealthData(character, healthData) end
--- ReloadHeadAttachments
-- @realm shared
function ReloadHeadAttachments() end
--- ClearCurrentOrders
-- @realm shared
function ClearCurrentOrders() end
--- Remove
-- @realm shared
function Remove() end
--- ClearSavedStatValues
-- @realm shared
function ClearSavedStatValues() end
--- ClearSavedStatValues
-- @realm shared
-- @tparam StatTypes statType
function ClearSavedStatValues(statType) end
--- RemoveSavedStatValuesOnDeath
-- @realm shared
function RemoveSavedStatValuesOnDeath() end
--- ResetSavedStatValue
-- @realm shared
-- @tparam string statIdentifier
function ResetSavedStatValue(statIdentifier) end
--- GetSavedStatValue
-- @realm shared
-- @tparam StatTypes statType
-- @treturn number
function GetSavedStatValue(statType) end
--- GetSavedStatValue
-- @realm shared
-- @tparam StatTypes statType
-- @tparam Identifier statIdentifier
-- @treturn number
function GetSavedStatValue(statType, statIdentifier) end
--- ChangeSavedStatValue
-- @realm shared
-- @tparam StatTypes statType
-- @tparam number value
-- @tparam string statIdentifier
-- @tparam bool removeOnDeath
-- @tparam number maxValue
-- @tparam bool setValue
function ChangeSavedStatValue(statType, value, statIdentifier, removeOnDeath, maxValue, setValue) end
--- ServerWrite
-- @realm shared
-- @tparam IWriteMessage msg
function ServerWrite(msg) end
--- GetUnlockedTalentsInTree
-- @realm shared
-- @treturn Enumerable
function GetUnlockedTalentsInTree() end
--- GetEndocrineTalents
-- @realm shared
-- @treturn Enumerable
function GetEndocrineTalents() end
--- CheckDisguiseStatus
-- @realm shared
-- @tparam bool handleBuff
-- @tparam IdCard idCard
function CheckDisguiseStatus(handleBuff, idCard) end
--- GetManualOrderPriority
-- @realm shared
-- @tparam Order order
-- @treturn number
function GetManualOrderPriority(order) end
--- GetValidAttachmentElements
-- @realm shared
-- @tparam Enumerable elements
-- @tparam HeadPreset headPreset
-- @tparam Nullable`1 wearableType
-- @treturn Enumerable
function GetValidAttachmentElements(elements, headPreset, wearableType) end
--- CountValidAttachmentsOfType
-- @realm shared
-- @tparam WearableType wearableType
-- @treturn number
function CountValidAttachmentsOfType(wearableType) end
--- GetRandomName
-- @realm shared
-- @tparam RandSync randSync
-- @treturn string
function GetRandomName(randSync) end
--- SelectRandomColor
-- @realm shared
-- @tparam ImmutableArray`1& array
-- @tparam RandSync randSync
-- @treturn Color
function CharacterInfo.SelectRandomColor(array, randSync) end
--- GetIdentifier
-- @realm shared
-- @treturn number
function GetIdentifier() end
--- GetIdentifierUsingOriginalName
-- @realm shared
-- @treturn number
function GetIdentifierUsingOriginalName() end
--- FilterElements
-- @realm shared
-- @tparam Enumerable elements
-- @tparam ImmutableHashSet`1 tags
-- @tparam Nullable`1 targetType
-- @treturn Enumerable
function FilterElements(elements, tags, targetType) end
--- RecreateHead
-- @realm shared
-- @tparam ImmutableHashSet`1 tags
-- @tparam number hairIndex
-- @tparam number beardIndex
-- @tparam number moustacheIndex
-- @tparam number faceAttachmentIndex
function RecreateHead(tags, hairIndex, beardIndex, moustacheIndex, faceAttachmentIndex) end
--- ReplaceVars
-- @realm shared
-- @tparam string str
-- @treturn string
function ReplaceVars(str) end
--- RecreateHead
-- @realm shared
-- @tparam HeadInfo headInfo
function RecreateHead(headInfo) end
--- RefreshHead
-- @realm shared
function RefreshHead() end
--- LoadHeadAttachments
-- @realm shared
function LoadHeadAttachments() end
--- AddEmpty
-- @realm shared
-- @tparam Enumerable elements
-- @tparam WearableType type
-- @tparam number commonness
-- @treturn table
function CharacterInfo.AddEmpty(elements, type, commonness) end
--- GetRandomElement
-- @realm shared
-- @tparam Enumerable elements
-- @treturn ContentXElement
function GetRandomElement(elements) end
--- IsValidIndex
-- @realm shared
-- @tparam number index
-- @tparam table list
-- @treturn bool
function CharacterInfo.IsValidIndex(index, list) end
--- IncreaseSkillLevel
-- @realm shared
-- @tparam Identifier skillIdentifier
-- @tparam number increase
-- @tparam bool gainedFromAbility
function IncreaseSkillLevel(skillIdentifier, increase, gainedFromAbility) end
--- SetSkillLevel
-- @realm shared
-- @tparam Identifier skillIdentifier
-- @tparam number level
function SetSkillLevel(skillIdentifier, level) end
--- GiveExperience
-- @realm shared
-- @tparam number amount
-- @tparam bool isMissionExperience
function GiveExperience(amount, isMissionExperience) end
--- SetExperience
-- @realm shared
-- @tparam number newExperience
function SetExperience(newExperience) end
--- GetTotalTalentPoints
-- @realm shared
-- @treturn number
function GetTotalTalentPoints() end
--- GetAvailableTalentPoints
-- @realm shared
-- @treturn number
function GetAvailableTalentPoints() end
--- GetProgressTowardsNextLevel
-- @realm shared
-- @treturn number
function GetProgressTowardsNextLevel() end
--- GetExperienceRequiredForCurrentLevel
-- @realm shared
-- @treturn number
function GetExperienceRequiredForCurrentLevel() end
--- GetExperienceRequiredToLevelUp
-- @realm shared
-- @treturn number
function GetExperienceRequiredToLevelUp() end
--- GetCurrentLevel
-- @realm shared
-- @treturn number
function GetCurrentLevel() 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
---
-- IsMale, Field of type bool
-- @realm shared
-- @bool IsMale
---
-- IsFemale, Field of type bool
-- @realm shared
-- @bool IsFemale
---
-- Prefab, Field of type CharacterInfoPrefab
-- @realm shared
-- @CharacterInfoPrefab Prefab
---
-- 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 Identifier
-- @realm shared
-- @Identifier SpeciesName
---
-- ExperiencePoints, Field of type number
-- @realm shared
-- @number ExperiencePoints
---
-- UnlockedTalents, Field of type HashSet`1
-- @realm shared
-- @HashSet`1 UnlockedTalents
---
-- AdditionalTalentPoints, Field of type number
-- @realm shared
-- @number AdditionalTalentPoints
---
-- 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 ContentXElement
-- @realm shared
-- @ContentXElement CharacterConfigElement
---
-- PersonalityTrait, Field of type NPCPersonalityTrait
-- @realm shared
-- @NPCPersonalityTrait PersonalityTrait
---
-- 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
---
-- Ragdoll, Field of type RagdollParams
-- @realm shared
-- @RagdollParams Ragdoll
---
-- IsAttachmentsLoaded, Field of type bool
-- @realm shared
-- @bool IsAttachmentsLoaded
---
-- Hairs, Field of type IReadOnlyList`1
-- @realm shared
-- @IReadOnlyList`1 Hairs
---
-- Beards, Field of type IReadOnlyList`1
-- @realm shared
-- @IReadOnlyList`1 Beards
---
-- Moustaches, Field of type IReadOnlyList`1
-- @realm shared
-- @IReadOnlyList`1 Moustaches
---
-- FaceAttachments, Field of type IReadOnlyList`1
-- @realm shared
-- @IReadOnlyList`1 FaceAttachments
---
-- Wearables, Field of type Enumerable
-- @realm shared
-- @Enumerable 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
---
-- HasSpecifierTags, Field of type bool
-- @realm shared
-- @bool HasSpecifierTags
---
-- HairColors, Field of type ImmutableArray`1
-- @realm shared
-- @ImmutableArray`1 HairColors
---
-- FacialHairColors, Field of type ImmutableArray`1
-- @realm shared
-- @ImmutableArray`1 FacialHairColors
---
-- SkinColors, Field of type ImmutableArray`1
-- @realm shared
-- @ImmutableArray`1 SkinColors
---
-- MissionsCompletedSinceDeath, Field of type number
-- @realm shared
-- @number MissionsCompletedSinceDeath
---
-- SavedStatValues, Field of type table
-- @realm shared
-- @table SavedStatValues
---
-- CharacterInfo.MaxAdditionalTalentPoints, Field of type number
-- @realm shared
-- @number CharacterInfo.MaxAdditionalTalentPoints
---
-- CharacterInfo.MaxCurrentOrders, Field of type number
-- @realm shared
-- @number CharacterInfo.MaxCurrentOrders

View File

@@ -1,338 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma.CharacterInventory
]]
-- @code CharacterInventory
-- @pragma nostrip
local CharacterInventory = {}
--- FindLimbSlot
-- @realm shared
-- @tparam InvSlotType limbSlot
-- @treturn number
function FindLimbSlot(limbSlot) end
--- GetItemInLimbSlot
-- @realm shared
-- @tparam InvSlotType limbSlot
-- @treturn Item
function GetItemInLimbSlot(limbSlot) end
--- IsInLimbSlot
-- @realm shared
-- @tparam Item item
-- @tparam InvSlotType limbSlot
-- @treturn bool
function IsInLimbSlot(item, limbSlot) end
--- CanBePutInSlot
-- @realm shared
-- @tparam Item item
-- @tparam number i
-- @tparam bool ignoreCondition
-- @treturn bool
function CanBePutInSlot(item, i, ignoreCondition) end
--- CanBePutInSlot
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam number i
-- @tparam Nullable`1 condition
-- @tparam Nullable`1 quality
-- @treturn bool
function CanBePutInSlot(itemPrefab, i, condition, quality) end
--- CanBeAutoMovedToCorrectSlots
-- @realm shared
-- @tparam Item item
-- @treturn bool
function CanBeAutoMovedToCorrectSlots(item) end
--- RemoveItem
-- @realm shared
-- @tparam Item item
function RemoveItem(item) end
--- RemoveItem
-- @realm shared
-- @tparam Item item
-- @tparam bool tryEquipFromSameStack
function RemoveItem(item, tryEquipFromSameStack) end
--- TryPutItemWithAutoEquipCheck
-- @realm shared
-- @tparam Item item
-- @tparam Character user
-- @tparam Enumerable allowedSlots
-- @tparam bool createNetworkEvent
-- @treturn bool
function TryPutItemWithAutoEquipCheck(item, user, allowedSlots, createNetworkEvent) end
--- TryPutItem
-- @realm shared
-- @tparam Item item
-- @tparam Character user
-- @tparam Enumerable allowedSlots
-- @tparam bool createNetworkEvent
-- @tparam bool ignoreCondition
-- @treturn bool
function TryPutItem(item, user, allowedSlots, createNetworkEvent, ignoreCondition) end
--- CheckIfAnySlotAvailable
-- @realm shared
-- @tparam Item item
-- @tparam bool inWrongSlot
-- @treturn number
function CheckIfAnySlotAvailable(item, inWrongSlot) end
--- TryPutItem
-- @realm shared
-- @tparam Item item
-- @tparam number index
-- @tparam bool allowSwapping
-- @tparam bool allowCombine
-- @tparam Character user
-- @tparam bool createNetworkEvent
-- @tparam bool ignoreCondition
-- @treturn bool
function TryPutItem(item, index, allowSwapping, allowCombine, user, createNetworkEvent, ignoreCondition) end
--- ServerEventRead
-- @realm shared
-- @tparam IReadMessage msg
-- @tparam Client c
function ServerEventRead(msg, c) end
--- ServerEventWrite
-- @realm shared
-- @tparam IWriteMessage msg
-- @tparam Client c
-- @tparam IData extraData
function ServerEventWrite(msg, c, extraData) end
--- Contains
-- @realm shared
-- @tparam Item item
-- @treturn bool
function Contains(item) end
--- FirstOrDefault
-- @realm shared
-- @treturn Item
function FirstOrDefault() end
--- LastOrDefault
-- @realm shared
-- @treturn Item
function LastOrDefault() end
--- GetItemAt
-- @realm shared
-- @tparam number index
-- @treturn Item
function GetItemAt(index) end
--- GetItemsAt
-- @realm shared
-- @tparam number index
-- @treturn Enumerable
function GetItemsAt(index) end
--- FindIndex
-- @realm shared
-- @tparam Item item
-- @treturn number
function FindIndex(item) end
--- FindIndices
-- @realm shared
-- @tparam Item item
-- @treturn table
function FindIndices(item) end
--- ItemOwnsSelf
-- @realm shared
-- @tparam Item item
-- @treturn bool
function ItemOwnsSelf(item) end
--- FindAllowedSlot
-- @realm shared
-- @tparam Item item
-- @tparam bool ignoreCondition
-- @treturn number
function FindAllowedSlot(item, ignoreCondition) end
--- CanBePut
-- @realm shared
-- @tparam Item item
-- @treturn bool
function CanBePut(item) end
--- CanBePut
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam Nullable`1 condition
-- @tparam Nullable`1 quality
-- @treturn bool
function CanBePut(itemPrefab, condition, quality) end
--- HowManyCanBePut
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam Nullable`1 condition
-- @treturn number
function HowManyCanBePut(itemPrefab, condition) end
--- HowManyCanBePut
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam number i
-- @tparam Nullable`1 condition
-- @treturn number
function HowManyCanBePut(itemPrefab, i, condition) end
--- IsEmpty
-- @realm shared
-- @treturn bool
function IsEmpty() end
--- IsFull
-- @realm shared
-- @tparam bool takeStacksIntoAccount
-- @treturn bool
function IsFull(takeStacksIntoAccount) end
--- CreateNetworkEvent
-- @realm shared
function CreateNetworkEvent() end
--- FindItem
-- @realm shared
-- @tparam function predicate
-- @tparam bool recursive
-- @treturn Item
function FindItem(predicate, recursive) end
--- FindAllItems
-- @realm shared
-- @tparam function predicate
-- @tparam bool recursive
-- @tparam table list
-- @treturn table
function FindAllItems(predicate, recursive, list) end
--- FindItemByTag
-- @realm shared
-- @tparam Identifier tag
-- @tparam bool recursive
-- @treturn Item
function FindItemByTag(tag, recursive) end
--- FindItemByIdentifier
-- @realm shared
-- @tparam Identifier identifier
-- @tparam bool recursive
-- @treturn Item
function FindItemByIdentifier(identifier, recursive) end
--- ForceToSlot
-- @realm shared
-- @tparam Item item
-- @tparam number index
function ForceToSlot(item, index) end
--- ForceRemoveFromSlot
-- @realm shared
-- @tparam Item item
-- @tparam number index
function ForceRemoveFromSlot(item, index) end
--- SharedRead
-- @realm shared
-- @tparam IReadMessage msg
-- @tparam List`1[]& newItemIds
function SharedRead(msg, newItemIds) end
--- SharedWrite
-- @realm shared
-- @tparam IWriteMessage msg
-- @tparam IData extraData
function SharedWrite(msg, extraData) end
--- DeleteAllItems
-- @realm shared
function DeleteAllItems() 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
---
-- SlotTypes, Field of type InvSlotType[]
-- @realm shared
-- @InvSlotType[] SlotTypes
---
-- AccessibleWhenAlive, Field of type bool
-- @realm shared
-- @bool AccessibleWhenAlive
---
-- AccessibleByOwner, Field of type bool
-- @realm shared
-- @bool AccessibleByOwner
---
-- AllItems, Field of type Enumerable
-- @realm shared
-- @Enumerable AllItems
---
-- AllItemsMod, Field of type Enumerable
-- @realm shared
-- @Enumerable AllItemsMod
---
-- Capacity, Field of type number
-- @realm shared
-- @number Capacity
---
-- CharacterInventory.anySlot, Field of type table
-- @realm shared
-- @table CharacterInventory.anySlot
---
-- Owner, Field of type Entity
-- @realm shared
-- @Entity Owner
---
-- Locked, Field of type bool
-- @realm shared
-- @bool Locked
---
-- AllowSwappingContainedItems, Field of type bool
-- @realm shared
-- @bool AllowSwappingContainedItems

View File

@@ -1,487 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma Client class with some additional functions and fields
Barotrauma source code: [Client.cs](https://github.com/evilfactory/Barotrauma-lua-attempt/blob/master/Barotrauma/BarotraumaShared/SharedSource/Networking/Client.cs)
]]
-- @code Client
-- @pragma nostrip
local Client = {}
-- @remove function SetClientCharacter(character) end
-- @remove function Kick(reason) end
-- @remove function Ban(reason, range, seconds) end
-- @remove function Client.Unban(player, endpoint) end
-- @remove function CheckPermission(permissions) end
--- Sets the client character.
-- @realm server
function SetClientCharacter(character) end
--- Kick a client.
-- @realm server
function Kick(reason) end
--- Ban a client.
-- @realm server
function Ban(reason, range, seconds) end
--- Checks permissions, Client.Permissions.
-- @realm server
function CheckPermission(permissions) end
--- Unban a client.
-- @realm server
function Client.Unban(player, endpoint) end
--- Ban
-- @realm shared
-- @tparam string player
-- @tparam string reason
-- @tparam bool range
-- @tparam number seconds
function Client.Ban(player, reason, range, seconds) end
--- 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 Enumerable 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
---
-- Client.ClientList, Field of type table
-- @realm shared
-- @table Client.ClientList
---
-- Character, Field of type Character
-- @realm shared
-- @Character Character
---
-- 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
---
-- HasPermissions, Field of type bool
-- @realm shared
-- @bool HasPermissions
---
-- VoipQueue, Field of type VoipQueue
-- @realm shared
-- @VoipQueue VoipQueue
---
-- InGame, Field of type bool
-- @realm shared
-- @bool InGame
---
-- 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
---
-- LastSentServerSettingsUpdate, Field of type number
-- @realm shared
-- @number LastSentServerSettingsUpdate
---
-- LastRecvServerSettingsUpdate, Field of type number
-- @realm shared
-- @number LastRecvServerSettingsUpdate
---
-- 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 JobVariant
-- @realm shared
-- @JobVariant 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 LanguageIdentifier
-- @realm shared
-- @LanguageIdentifier Language
---
-- Ping, Field of type number
-- @realm shared
-- @number Ping
---
-- PreferredJob, Field of type Identifier
-- @realm shared
-- @Identifier 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
---
-- 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
---
-- PermittedConsoleCommands, Field of type HashSet`1
-- @realm shared
-- @HashSet`1 PermittedConsoleCommands
---
-- Client.MaxNameLength, Field of type number
-- @realm shared
-- @number Client.MaxNameLength

View File

@@ -1,213 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma EntitySpawner class with some additional functions and fields
Barotrauma source code: [EntitySpawner.cs](https://github.com/evilfactory/Barotrauma-lua-attempt/blob/master/Barotrauma/BarotraumaShared/SharedSource/Networking/EntitySpawner.cs)
]]
-- @code Entity.Spawner
-- @pragma nostrip
--- CreateNetworkEvent
-- @realm shared
-- @tparam SpawnOrRemove spawnOrRemove
function CreateNetworkEvent(spawnOrRemove) end
--- ServerEventWrite
-- @realm shared
-- @tparam IWriteMessage message
-- @tparam Client client
-- @tparam IData extraData
function ServerEventWrite(message, client, extraData) end
--- ToString
-- @realm shared
-- @treturn string
function ToString() end
--- AddItemToSpawnQueue
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam Vector2 worldPosition
-- @tparam Nullable`1 condition
-- @tparam Nullable`1 quality
-- @tparam function onSpawned
function AddItemToSpawnQueue(itemPrefab, worldPosition, condition, quality, onSpawned) end
--- AddItemToSpawnQueue
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam Vector2 position
-- @tparam Submarine sub
-- @tparam Nullable`1 condition
-- @tparam Nullable`1 quality
-- @tparam function onSpawned
function AddItemToSpawnQueue(itemPrefab, position, sub, condition, quality, onSpawned) end
--- AddItemToSpawnQueue
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam Inventory inventory
-- @tparam Nullable`1 condition
-- @tparam Nullable`1 quality
-- @tparam function onSpawned
-- @tparam bool spawnIfInventoryFull
-- @tparam bool ignoreLimbSlots
-- @tparam InvSlotType slot
function AddItemToSpawnQueue(itemPrefab, inventory, condition, quality, onSpawned, spawnIfInventoryFull, ignoreLimbSlots, slot) end
--- AddCharacterToSpawnQueue
-- @realm shared
-- @tparam Identifier speciesName
-- @tparam Vector2 worldPosition
-- @tparam function onSpawn
function AddCharacterToSpawnQueue(speciesName, worldPosition, onSpawn) end
--- AddCharacterToSpawnQueue
-- @realm shared
-- @tparam Identifier speciesName
-- @tparam Vector2 position
-- @tparam Submarine sub
-- @tparam function onSpawn
function AddCharacterToSpawnQueue(speciesName, position, sub, onSpawn) end
--- AddCharacterToSpawnQueue
-- @realm shared
-- @tparam Identifier speciesName
-- @tparam Vector2 worldPosition
-- @tparam CharacterInfo characterInfo
-- @tparam function onSpawn
function AddCharacterToSpawnQueue(speciesName, worldPosition, characterInfo, onSpawn) end
--- AddEntityToRemoveQueue
-- @realm shared
-- @tparam Entity entity
function AddEntityToRemoveQueue(entity) end
--- AddItemToRemoveQueue
-- @realm shared
-- @tparam Item item
function AddItemToRemoveQueue(item) end
--- IsInSpawnQueue
-- @realm shared
-- @tparam Predicate`1 predicate
-- @treturn bool
function IsInSpawnQueue(predicate) end
--- CountSpawnQueue
-- @realm shared
-- @tparam Predicate`1 predicate
-- @treturn number
function CountSpawnQueue(predicate) end
--- IsInRemoveQueue
-- @realm shared
-- @tparam Entity entity
-- @treturn bool
function IsInRemoveQueue(entity) end
--- Update
-- @realm shared
-- @tparam bool createNetworkEvents
function Update(createNetworkEvents) end
--- Reset
-- @realm shared
function Reset() end
--- FreeID
-- @realm shared
function FreeID() end
--- Remove
-- @realm shared
function Remove() 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
---
-- 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
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
---
-- ID, Field of type number
-- @realm shared
-- @number ID
---
-- CreationStackTrace, Field of type string
-- @realm shared
-- @string CreationStackTrace
---
-- CreationIndex, Field of type number
-- @realm shared
-- @number CreationIndex

View File

@@ -1,176 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma Entity class with some additional functions and fields
Barotrauma source code: [Entity.cs](https://github.com/evilfactory/Barotrauma-lua-attempt/blob/master/Barotrauma/BarotraumaShared/SharedSource/Map/Entity.cs)
]]
-- @code Entity
-- @pragma nostrip
--- Remove
-- @realm shared
function Remove() end
--- ToString
-- @realm shared
-- @treturn string
function ToString() end
--- GetEntities
-- @realm shared
-- @treturn IReadOnlyCollection`1
function Entity.GetEntities() end
--- FindFreeIdBlock
-- @realm shared
-- @tparam number minBlockSize
-- @treturn number
function Entity.FindFreeIdBlock(minBlockSize) end
--- FindEntityByID
-- @realm shared
-- @tparam number ID
-- @treturn Entity
function Entity.FindEntityByID(ID) end
--- RemoveAll
-- @realm shared
function Entity.RemoveAll() end
--- FreeID
-- @realm shared
function FreeID() end
--- DumpIds
-- @realm shared
-- @tparam number count
-- @tparam string filename
function Entity.DumpIds(count, filename) 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
---
-- Entity.EntityCount, Field of type number
-- @realm shared
-- @number Entity.EntityCount
---
-- 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
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
---
-- ID, Field of type number
-- @realm shared
-- @number ID
---
-- CreationStackTrace, Field of type string
-- @realm shared
-- @string CreationStackTrace
---
-- CreationIndex, Field of type number
-- @realm shared
-- @number CreationIndex
---
-- Entity.Spawner, Field of type EntitySpawner
-- @realm shared
-- @EntitySpawner Entity.Spawner
---
-- Entity.NullEntityID, Field of type number
-- @realm shared
-- @number Entity.NullEntityID
---
-- Entity.EntitySpawnerID, Field of type number
-- @realm shared
-- @number Entity.EntitySpawnerID
---
-- Entity.RespawnManagerID, Field of type number
-- @realm shared
-- @number Entity.RespawnManagerID
---
-- Entity.DummyID, Field of type number
-- @realm shared
-- @number Entity.DummyID
---
-- Entity.ReservedIDStart, Field of type number
-- @realm shared
-- @number Entity.ReservedIDStart
---
-- Entity.MaxEntityCount, Field of type number
-- @realm shared
-- @number Entity.MaxEntityCount

View File

@@ -1,58 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma.GameScreen
]]
-- @code Game.GameScreen
-- @pragma nostrip
local GameScreen = {}
--- Select
-- @realm shared
function Select() end
--- Deselect
-- @realm shared
function Deselect() end
--- Update
-- @realm shared
-- @tparam number deltaTime
function Update(deltaTime) 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
---
-- Cam, Field of type Camera
-- @realm shared
-- @Camera Cam
---
-- GameTime, Field of type number
-- @realm shared
-- @number GameTime
---
-- IsEditor, Field of type bool
-- @realm shared
-- @bool IsEditor

View File

@@ -1,256 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma.GameSession
]]
-- @code Game.GameSession
-- @pragma nostrip
local GameSession = {}
--- LoadPreviousSave
-- @realm shared
function LoadPreviousSave() end
--- SwitchSubmarine
-- @realm shared
-- @tparam SubmarineInfo newSubmarine
-- @tparam number cost
-- @tparam Client client
-- @treturn SubmarineInfo
function SwitchSubmarine(newSubmarine, cost, client) end
--- PurchaseSubmarine
-- @realm shared
-- @tparam SubmarineInfo newSubmarine
-- @tparam Client client
function PurchaseSubmarine(newSubmarine, client) end
--- IsSubmarineOwned
-- @realm shared
-- @tparam SubmarineInfo query
-- @treturn bool
function IsSubmarineOwned(query) end
--- IsCurrentLocationRadiated
-- @realm shared
-- @treturn bool
function IsCurrentLocationRadiated() end
--- StartRound
-- @realm shared
-- @tparam string levelSeed
-- @tparam Nullable`1 difficulty
-- @tparam LevelGenerationParams levelGenerationParams
function StartRound(levelSeed, difficulty, levelGenerationParams) end
--- StartRound
-- @realm shared
-- @tparam LevelData levelData
-- @tparam bool mirrorLevel
-- @tparam SubmarineInfo startOutpost
-- @tparam SubmarineInfo endOutpost
function StartRound(levelData, mirrorLevel, startOutpost, endOutpost) end
--- PlaceSubAtStart
-- @realm shared
-- @tparam Level level
function PlaceSubAtStart(level) end
--- Update
-- @realm shared
-- @tparam number deltaTime
function Update(deltaTime) end
--- GetMission
-- @realm shared
-- @tparam number index
-- @treturn Mission
function GetMission(index) end
--- GetMissionIndex
-- @realm shared
-- @tparam Mission mission
-- @treturn number
function GetMissionIndex(mission) end
--- EnforceMissionOrder
-- @realm shared
-- @tparam table missionIdentifiers
function EnforceMissionOrder(missionIdentifiers) end
--- GetSessionCrewCharacters
-- @realm shared
-- @tparam CharacterType type
-- @treturn ImmutableHashSet`1
function GameSession.GetSessionCrewCharacters(type) end
--- EndRound
-- @realm shared
-- @tparam string endMessage
-- @tparam table traitorResults
-- @tparam TransitionType transitionType
function EndRound(endMessage, traitorResults, transitionType) end
--- LogEndRoundStats
-- @realm shared
-- @tparam string eventId
function LogEndRoundStats(eventId) end
--- KillCharacter
-- @realm shared
-- @tparam Character character
function KillCharacter(character) end
--- ReviveCharacter
-- @realm shared
-- @tparam Character character
function ReviveCharacter(character) end
--- IsCompatibleWithEnabledContentPackages
-- @realm shared
-- @tparam IList`1 contentPackageNames
-- @tparam LocalizedString& errorMsg
-- @treturn bool
function GameSession.IsCompatibleWithEnabledContentPackages(contentPackageNames, errorMsg) end
--- Save
-- @realm shared
-- @tparam string filePath
function Save(filePath) 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
---
-- Missions, Field of type Enumerable
-- @realm shared
-- @Enumerable Missions
---
-- Casualties, Field of type Enumerable
-- @realm shared
-- @Enumerable Casualties
---
-- IsRunning, Field of type bool
-- @realm shared
-- @bool IsRunning
---
-- RoundEnding, Field of type bool
-- @realm shared
-- @bool RoundEnding
---
-- Level, Field of type Level
-- @realm shared
-- @Level Level
---
-- LevelData, Field of type LevelData
-- @realm shared
-- @LevelData LevelData
---
-- MirrorLevel, Field of type bool
-- @realm shared
-- @bool MirrorLevel
---
-- Map, Field of type Map
-- @realm shared
-- @Map Map
---
-- Campaign, Field of type CampaignMode
-- @realm shared
-- @CampaignMode Campaign
---
-- StartLocation, Field of type Location
-- @realm shared
-- @Location StartLocation
---
-- EndLocation, Field of type Location
-- @realm shared
-- @Location EndLocation
---
-- SubmarineInfo, Field of type SubmarineInfo
-- @realm shared
-- @SubmarineInfo SubmarineInfo
---
-- Submarine, Field of type Submarine
-- @realm shared
-- @Submarine Submarine
---
-- SavePath, Field of type string
-- @realm shared
-- @string SavePath
---
-- EventManager, Field of type EventManager
-- @realm shared
-- @EventManager EventManager
---
-- GameMode, Field of type GameMode
-- @realm shared
-- @GameMode GameMode
---
-- CrewManager, Field of type CrewManager
-- @realm shared
-- @CrewManager CrewManager
---
-- RoundStartTime, Field of type number
-- @realm shared
-- @number RoundStartTime
---
-- TimeSpentCleaning, Field of type number
-- @realm shared
-- @number TimeSpentCleaning
---
-- TimeSpentPainting, Field of type number
-- @realm shared
-- @number TimeSpentPainting
---
-- WinningTeam, Field of type Nullable`1
-- @realm shared
-- @Nullable`1 WinningTeam
---
-- OwnedSubmarines, Field of type table
-- @realm shared
-- @table OwnedSubmarines
---
-- GameSession.MinimumLoadingTime, Field of type number
-- @realm shared
-- @number GameSession.MinimumLoadingTime

View File

@@ -1,53 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma.GameSettings
]]
-- @code Game.Settings
-- @pragma nostrip
local GameSettings = {}
--- Init
-- @realm shared
function GameSettings.Init() end
--- SetCurrentConfig
-- @realm shared
-- @tparam Config& newConfig
function GameSettings.SetCurrentConfig(newConfig) end
--- SaveCurrentConfig
-- @realm shared
function GameSettings.SaveCurrentConfig() 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
---
-- GameSettings.CurrentConfig, Field of type Config&
-- @realm shared
-- @Config& GameSettings.CurrentConfig
---
-- GameSettings.PlayerConfigPath, Field of type string
-- @realm shared
-- @string GameSettings.PlayerConfigPath

View File

@@ -1,817 +0,0 @@
-- 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
--- CleanSection
-- @realm shared
-- @tparam BackgroundSection section
-- @tparam number cleanVal
-- @tparam bool updateRequired
function CleanSection(section, cleanVal, updateRequired) end
--- Load
-- @realm shared
-- @tparam ContentXElement 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
--- ServerEventWrite
-- @realm shared
-- @tparam IWriteMessage msg
-- @tparam Client c
-- @tparam IData extraData
function ServerEventWrite(msg, c, extraData) end
--- ServerEventRead
-- @realm shared
-- @tparam IReadMessage msg
-- @tparam Client c
function ServerEventRead(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
--- DoesSectionMatch
-- @realm shared
-- @tparam number index
-- @tparam number row
-- @treturn bool
function DoesSectionMatch(index, row) end
--- AddLinked
-- @realm shared
-- @tparam MapEntity entity
function AddLinked(entity) end
--- ResolveLinks
-- @realm shared
-- @tparam IdRemap childRemap
function ResolveLinks(childRemap) end
--- HasUpgrade
-- @realm shared
-- @tparam Identifier identifier
-- @treturn bool
function HasUpgrade(identifier) end
--- GetUpgrade
-- @realm shared
-- @tparam Identifier 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
---
-- SerializableProperties, Field of type table
-- @realm shared
-- @table SerializableProperties
---
-- Name, Field of type string
-- @realm shared
-- @string Name
---
-- DisplayName, Field of type LocalizedString
-- @realm shared
-- @LocalizedString 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
---
-- 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 Enumerable
-- @realm shared
-- @Enumerable 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
---
-- Layer, Field of type string
-- @realm shared
-- @string Layer
---
-- 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
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
---
-- 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.EntityGrids, Field of type table
-- @realm shared
-- @table Hull.EntityGrids
---
-- 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
---
-- DisallowedUpgradeSet, Field of type HashSet`1
-- @realm shared
-- @HashSet`1 DisallowedUpgradeSet
---
-- 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
---
-- CreationStackTrace, Field of type string
-- @realm shared
-- @string CreationStackTrace
---
-- CreationIndex, Field of type number
-- @realm shared
-- @number CreationIndex

View File

@@ -1,276 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma.Inventory
]]
-- @code Inventory
-- @pragma nostrip
local Inventory = {}
--- ServerEventRead
-- @realm shared
-- @tparam IReadMessage msg
-- @tparam Client c
function ServerEventRead(msg, c) end
--- ServerEventWrite
-- @realm shared
-- @tparam IWriteMessage msg
-- @tparam Client c
-- @tparam IData extraData
function ServerEventWrite(msg, c, extraData) end
--- Contains
-- @realm shared
-- @tparam Item item
-- @treturn bool
function Contains(item) end
--- FirstOrDefault
-- @realm shared
-- @treturn Item
function FirstOrDefault() end
--- LastOrDefault
-- @realm shared
-- @treturn Item
function LastOrDefault() end
--- GetItemAt
-- @realm shared
-- @tparam number index
-- @treturn Item
function GetItemAt(index) end
--- GetItemsAt
-- @realm shared
-- @tparam number index
-- @treturn Enumerable
function GetItemsAt(index) end
--- FindIndex
-- @realm shared
-- @tparam Item item
-- @treturn number
function FindIndex(item) end
--- FindIndices
-- @realm shared
-- @tparam Item item
-- @treturn table
function FindIndices(item) end
--- ItemOwnsSelf
-- @realm shared
-- @tparam Item item
-- @treturn bool
function ItemOwnsSelf(item) end
--- FindAllowedSlot
-- @realm shared
-- @tparam Item item
-- @tparam bool ignoreCondition
-- @treturn number
function FindAllowedSlot(item, ignoreCondition) end
--- CanBePut
-- @realm shared
-- @tparam Item item
-- @treturn bool
function CanBePut(item) end
--- CanBePutInSlot
-- @realm shared
-- @tparam Item item
-- @tparam number i
-- @tparam bool ignoreCondition
-- @treturn bool
function CanBePutInSlot(item, i, ignoreCondition) end
--- CanBePut
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam Nullable`1 condition
-- @tparam Nullable`1 quality
-- @treturn bool
function CanBePut(itemPrefab, condition, quality) end
--- CanBePutInSlot
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam number i
-- @tparam Nullable`1 condition
-- @tparam Nullable`1 quality
-- @treturn bool
function CanBePutInSlot(itemPrefab, i, condition, quality) end
--- HowManyCanBePut
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam Nullable`1 condition
-- @treturn number
function HowManyCanBePut(itemPrefab, condition) end
--- HowManyCanBePut
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam number i
-- @tparam Nullable`1 condition
-- @treturn number
function HowManyCanBePut(itemPrefab, i, condition) end
--- TryPutItem
-- @realm shared
-- @tparam Item item
-- @tparam Character user
-- @tparam Enumerable allowedSlots
-- @tparam bool createNetworkEvent
-- @tparam bool ignoreCondition
-- @treturn bool
function TryPutItem(item, user, allowedSlots, createNetworkEvent, ignoreCondition) end
--- TryPutItem
-- @realm shared
-- @tparam Item item
-- @tparam number i
-- @tparam bool allowSwapping
-- @tparam bool allowCombine
-- @tparam Character user
-- @tparam bool createNetworkEvent
-- @tparam bool ignoreCondition
-- @treturn bool
function TryPutItem(item, i, allowSwapping, allowCombine, user, createNetworkEvent, ignoreCondition) end
--- IsEmpty
-- @realm shared
-- @treturn bool
function IsEmpty() end
--- IsFull
-- @realm shared
-- @tparam bool takeStacksIntoAccount
-- @treturn bool
function IsFull(takeStacksIntoAccount) end
--- CreateNetworkEvent
-- @realm shared
function CreateNetworkEvent() end
--- FindItem
-- @realm shared
-- @tparam function predicate
-- @tparam bool recursive
-- @treturn Item
function FindItem(predicate, recursive) end
--- FindAllItems
-- @realm shared
-- @tparam function predicate
-- @tparam bool recursive
-- @tparam table list
-- @treturn table
function FindAllItems(predicate, recursive, list) end
--- FindItemByTag
-- @realm shared
-- @tparam Identifier tag
-- @tparam bool recursive
-- @treturn Item
function FindItemByTag(tag, recursive) end
--- FindItemByIdentifier
-- @realm shared
-- @tparam Identifier identifier
-- @tparam bool recursive
-- @treturn Item
function FindItemByIdentifier(identifier, recursive) end
--- RemoveItem
-- @realm shared
-- @tparam Item item
function RemoveItem(item) end
--- ForceToSlot
-- @realm shared
-- @tparam Item item
-- @tparam number index
function ForceToSlot(item, index) end
--- ForceRemoveFromSlot
-- @realm shared
-- @tparam Item item
-- @tparam number index
function ForceRemoveFromSlot(item, index) end
--- SharedRead
-- @realm shared
-- @tparam IReadMessage msg
-- @tparam List`1[]& newItemIds
function SharedRead(msg, newItemIds) end
--- SharedWrite
-- @realm shared
-- @tparam IWriteMessage msg
-- @tparam IData extraData
function SharedWrite(msg, extraData) end
--- DeleteAllItems
-- @realm shared
function DeleteAllItems() 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
---
-- AllItems, Field of type Enumerable
-- @realm shared
-- @Enumerable AllItems
---
-- AllItemsMod, Field of type Enumerable
-- @realm shared
-- @Enumerable AllItemsMod
---
-- Capacity, Field of type number
-- @realm shared
-- @number Capacity
---
-- Owner, Field of type Entity
-- @realm shared
-- @Entity Owner
---
-- Locked, Field of type bool
-- @realm shared
-- @bool Locked
---
-- AllowSwappingContainedItems, Field of type bool
-- @realm shared
-- @bool AllowSwappingContainedItems
---
-- Inventory.MaxStackSize, Field of type number
-- @realm shared
-- @number Inventory.MaxStackSize

File diff suppressed because it is too large Load Diff

View File

@@ -1,276 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma.ItemInventory
]]
-- @code ItemInventory
-- @pragma nostrip
local ItemInventory = {}
--- FindAllowedSlot
-- @realm shared
-- @tparam Item item
-- @tparam bool ignoreCondition
-- @treturn number
function FindAllowedSlot(item, ignoreCondition) end
--- CanBePutInSlot
-- @realm shared
-- @tparam Item item
-- @tparam number i
-- @tparam bool ignoreCondition
-- @treturn bool
function CanBePutInSlot(item, i, ignoreCondition) end
--- CanBePutInSlot
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam number i
-- @tparam Nullable`1 condition
-- @tparam Nullable`1 quality
-- @treturn bool
function CanBePutInSlot(itemPrefab, i, condition, quality) end
--- HowManyCanBePut
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam number i
-- @tparam Nullable`1 condition
-- @treturn number
function HowManyCanBePut(itemPrefab, i, condition) end
--- IsFull
-- @realm shared
-- @tparam bool takeStacksIntoAccount
-- @treturn bool
function IsFull(takeStacksIntoAccount) end
--- TryPutItem
-- @realm shared
-- @tparam Item item
-- @tparam Character user
-- @tparam Enumerable allowedSlots
-- @tparam bool createNetworkEvent
-- @tparam bool ignoreCondition
-- @treturn bool
function TryPutItem(item, user, allowedSlots, createNetworkEvent, ignoreCondition) end
--- TryPutItem
-- @realm shared
-- @tparam Item item
-- @tparam number i
-- @tparam bool allowSwapping
-- @tparam bool allowCombine
-- @tparam Character user
-- @tparam bool createNetworkEvent
-- @tparam bool ignoreCondition
-- @treturn bool
function TryPutItem(item, i, allowSwapping, allowCombine, user, createNetworkEvent, ignoreCondition) end
--- CreateNetworkEvent
-- @realm shared
function CreateNetworkEvent() end
--- RemoveItem
-- @realm shared
-- @tparam Item item
function RemoveItem(item) end
--- ServerEventRead
-- @realm shared
-- @tparam IReadMessage msg
-- @tparam Client c
function ServerEventRead(msg, c) end
--- ServerEventWrite
-- @realm shared
-- @tparam IWriteMessage msg
-- @tparam Client c
-- @tparam IData extraData
function ServerEventWrite(msg, c, extraData) end
--- Contains
-- @realm shared
-- @tparam Item item
-- @treturn bool
function Contains(item) end
--- FirstOrDefault
-- @realm shared
-- @treturn Item
function FirstOrDefault() end
--- LastOrDefault
-- @realm shared
-- @treturn Item
function LastOrDefault() end
--- GetItemAt
-- @realm shared
-- @tparam number index
-- @treturn Item
function GetItemAt(index) end
--- GetItemsAt
-- @realm shared
-- @tparam number index
-- @treturn Enumerable
function GetItemsAt(index) end
--- FindIndex
-- @realm shared
-- @tparam Item item
-- @treturn number
function FindIndex(item) end
--- FindIndices
-- @realm shared
-- @tparam Item item
-- @treturn table
function FindIndices(item) end
--- ItemOwnsSelf
-- @realm shared
-- @tparam Item item
-- @treturn bool
function ItemOwnsSelf(item) end
--- CanBePut
-- @realm shared
-- @tparam Item item
-- @treturn bool
function CanBePut(item) end
--- CanBePut
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam Nullable`1 condition
-- @tparam Nullable`1 quality
-- @treturn bool
function CanBePut(itemPrefab, condition, quality) end
--- HowManyCanBePut
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam Nullable`1 condition
-- @treturn number
function HowManyCanBePut(itemPrefab, condition) end
--- IsEmpty
-- @realm shared
-- @treturn bool
function IsEmpty() end
--- FindItem
-- @realm shared
-- @tparam function predicate
-- @tparam bool recursive
-- @treturn Item
function FindItem(predicate, recursive) end
--- FindAllItems
-- @realm shared
-- @tparam function predicate
-- @tparam bool recursive
-- @tparam table list
-- @treturn table
function FindAllItems(predicate, recursive, list) end
--- FindItemByTag
-- @realm shared
-- @tparam Identifier tag
-- @tparam bool recursive
-- @treturn Item
function FindItemByTag(tag, recursive) end
--- FindItemByIdentifier
-- @realm shared
-- @tparam Identifier identifier
-- @tparam bool recursive
-- @treturn Item
function FindItemByIdentifier(identifier, recursive) end
--- ForceToSlot
-- @realm shared
-- @tparam Item item
-- @tparam number index
function ForceToSlot(item, index) end
--- ForceRemoveFromSlot
-- @realm shared
-- @tparam Item item
-- @tparam number index
function ForceRemoveFromSlot(item, index) end
--- SharedRead
-- @realm shared
-- @tparam IReadMessage msg
-- @tparam List`1[]& newItemIds
function SharedRead(msg, newItemIds) end
--- SharedWrite
-- @realm shared
-- @tparam IWriteMessage msg
-- @tparam IData extraData
function SharedWrite(msg, extraData) end
--- DeleteAllItems
-- @realm shared
function DeleteAllItems() 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
---
-- Container, Field of type ItemContainer
-- @realm shared
-- @ItemContainer Container
---
-- AllItems, Field of type Enumerable
-- @realm shared
-- @Enumerable AllItems
---
-- AllItemsMod, Field of type Enumerable
-- @realm shared
-- @Enumerable AllItemsMod
---
-- Capacity, Field of type number
-- @realm shared
-- @number Capacity
---
-- Owner, Field of type Entity
-- @realm shared
-- @Entity Owner
---
-- Locked, Field of type bool
-- @realm shared
-- @bool Locked
---
-- AllowSwappingContainedItems, Field of type bool
-- @realm shared
-- @bool AllowSwappingContainedItems

View File

@@ -1,628 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma ItemPrefab class with some additional functions and fields
Barotrauma source code: [ItemPrefab.cs](https://github.com/evilfactory/Barotrauma-lua-attempt/blob/master/Barotrauma/BarotraumaShared/SharedSource/Items/ItemPrefab.cs)
]]
-- @code ItemPrefab
-- @pragma nostrip
local ItemPrefab = {}
--- Add ItemPrefab to spawn queue and spawns it at the specified position
-- @tparam ItemPrefab itemPrefab
-- @tparam Vector2 position
-- @tparam function spawned
-- @realm server
function ItemPrefab.AddToSpawnQueue(itemPrefab, position, spawned) end
--- Add ItemPrefab to spawn queue and spawns it inside the specified inventory
-- @tparam ItemPrefab itemPrefab
-- @tparam Inventory inventory
-- @tparam function spawned
-- @realm server
function ItemPrefab.AddToSpawnQueue(itemPrefab, inventory, spawned) end
--- Get a item prefab via name or id
-- @tparam string itemNameOrId
-- @treturn ItemPrefab
-- @realm shared
function ItemPrefab.GetItemPrefab(itemNameOrId) end
---
-- Identifier, the identifier of the prefab.
-- @realm shared
-- @string Identifier
--- GenerateLegacyIdentifier
-- @realm shared
-- @tparam string name
-- @treturn Identifier
function ItemPrefab.GenerateLegacyIdentifier(name) end
--- GetTreatmentSuitability
-- @realm shared
-- @tparam Identifier treatmentIdentifier
-- @treturn number
function GetTreatmentSuitability(treatmentIdentifier) end
--- GetPriceInfo
-- @realm shared
-- @tparam StoreInfo store
-- @treturn PriceInfo
function GetPriceInfo(store) end
--- CanBeBoughtFrom
-- @realm shared
-- @tparam StoreInfo store
-- @tparam PriceInfo& priceInfo
-- @treturn bool
function CanBeBoughtFrom(store, priceInfo) end
--- CanBeBoughtFrom
-- @realm shared
-- @tparam Location location
-- @treturn bool
function CanBeBoughtFrom(location) end
--- GetMinPrice
-- @realm shared
-- @treturn Nullable`1
function GetMinPrice() end
--- GetBuyPricesUnder
-- @realm shared
-- @tparam number maxCost
-- @treturn ImmutableDictionary`2
function GetBuyPricesUnder(maxCost) end
--- GetSellPricesOver
-- @realm shared
-- @tparam number minCost
-- @tparam bool sellingImportant
-- @treturn ImmutableDictionary`2
function GetSellPricesOver(minCost, sellingImportant) end
--- Find
-- @realm shared
-- @tparam string name
-- @tparam Identifier identifier
-- @treturn ItemPrefab
function ItemPrefab.Find(name, identifier) end
--- IsContainerPreferred
-- @realm shared
-- @tparam Item item
-- @tparam ItemContainer targetContainer
-- @tparam Boolean& isPreferencesDefined
-- @tparam Boolean& isSecondary
-- @tparam bool requireConditionRequirement
-- @treturn bool
function IsContainerPreferred(item, targetContainer, isPreferencesDefined, isSecondary, requireConditionRequirement) end
--- IsContainerPreferred
-- @realm shared
-- @tparam Item item
-- @tparam Identifier[] identifiersOrTags
-- @tparam Boolean& isPreferencesDefined
-- @tparam Boolean& isSecondary
-- @treturn bool
function IsContainerPreferred(item, identifiersOrTags, isPreferencesDefined, isSecondary) end
--- IsContainerPreferred
-- @realm shared
-- @tparam Enumerable preferences
-- @tparam ItemContainer c
-- @treturn bool
function ItemPrefab.IsContainerPreferred(preferences, c) end
--- IsContainerPreferred
-- @realm shared
-- @tparam Enumerable preferences
-- @tparam Enumerable ids
-- @treturn bool
function ItemPrefab.IsContainerPreferred(preferences, ids) end
--- Dispose
-- @realm shared
function Dispose() end
--- InheritFrom
-- @realm shared
-- @tparam ItemPrefab parent
function InheritFrom(parent) end
--- ToString
-- @realm shared
-- @treturn string
function ToString() end
--- GetItemPrefab
-- @realm shared
-- @tparam string itemNameOrId
-- @treturn ItemPrefab
function ItemPrefab.GetItemPrefab(itemNameOrId) end
--- GetItemNameTextId
-- @realm shared
-- @treturn string
function GetItemNameTextId() end
--- GetHullNameTextId
-- @realm shared
-- @treturn string
function GetHullNameTextId() end
--- GetAllowedUpgrades
-- @realm shared
-- @treturn Enumerable
function GetAllowedUpgrades() end
--- HasSubCategory
-- @realm shared
-- @tparam string subcategory
-- @treturn bool
function HasSubCategory(subcategory) end
--- DebugCreateInstance
-- @realm shared
function DebugCreateInstance() end
--- NameMatches
-- @realm shared
-- @tparam string name
-- @tparam StringComparison comparisonType
-- @treturn bool
function NameMatches(name, comparisonType) end
--- NameMatches
-- @realm shared
-- @tparam Enumerable allowedNames
-- @tparam StringComparison comparisonType
-- @treturn bool
function NameMatches(allowedNames, comparisonType) end
--- IsLinkAllowed
-- @realm shared
-- @tparam MapEntityPrefab target
-- @treturn bool
function IsLinkAllowed(target) 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
---
-- Size, Field of type Vector2
-- @realm shared
-- @Vector2 Size
---
-- DefaultPrice, Field of type PriceInfo
-- @realm shared
-- @PriceInfo DefaultPrice
---
-- CanBeBought, Field of type bool
-- @realm shared
-- @bool CanBeBought
---
-- CanBeSold, Field of type bool
-- @realm shared
-- @bool CanBeSold
---
-- Triggers, Field of type ImmutableArray`1
-- @realm shared
-- @ImmutableArray`1 Triggers
---
-- IsOverride, Field of type bool
-- @realm shared
-- @bool IsOverride
---
-- ConfigElement, Field of type ContentXElement
-- @realm shared
-- @ContentXElement ConfigElement
---
-- DeconstructItems, Field of type ImmutableArray`1
-- @realm shared
-- @ImmutableArray`1 DeconstructItems
---
-- FabricationRecipes, Field of type ImmutableDictionary`2
-- @realm shared
-- @ImmutableDictionary`2 FabricationRecipes
---
-- DeconstructTime, Field of type number
-- @realm shared
-- @number DeconstructTime
---
-- AllowDeconstruct, Field of type bool
-- @realm shared
-- @bool AllowDeconstruct
---
-- PreferredContainers, Field of type ImmutableArray`1
-- @realm shared
-- @ImmutableArray`1 PreferredContainers
---
-- SwappableItem, Field of type SwappableItem
-- @realm shared
-- @SwappableItem SwappableItem
---
-- LevelCommonness, Field of type ImmutableDictionary`2
-- @realm shared
-- @ImmutableDictionary`2 LevelCommonness
---
-- LevelQuantity, Field of type ImmutableDictionary`2
-- @realm shared
-- @ImmutableDictionary`2 LevelQuantity
---
-- CanSpriteFlipX, Field of type bool
-- @realm shared
-- @bool CanSpriteFlipX
---
-- CanSpriteFlipY, Field of type bool
-- @realm shared
-- @bool CanSpriteFlipY
---
-- AllowAsExtraCargo, Field of type Nullable`1
-- @realm shared
-- @Nullable`1 AllowAsExtraCargo
---
-- RandomDeconstructionOutput, Field of type bool
-- @realm shared
-- @bool RandomDeconstructionOutput
---
-- RandomDeconstructionOutputAmount, Field of type number
-- @realm shared
-- @number RandomDeconstructionOutputAmount
---
-- Sprite, Field of type Sprite
-- @realm shared
-- @Sprite Sprite
---
-- OriginalName, Field of type string
-- @realm shared
-- @string OriginalName
---
-- Name, Field of type LocalizedString
-- @realm shared
-- @LocalizedString Name
---
-- Tags, Field of type ImmutableHashSet`1
-- @realm shared
-- @ImmutableHashSet`1 Tags
---
-- AllowedLinks, Field of type ImmutableHashSet`1
-- @realm shared
-- @ImmutableHashSet`1 AllowedLinks
---
-- Category, Field of type MapEntityCategory
-- @realm shared
-- @MapEntityCategory Category
---
-- Aliases, Field of type ImmutableHashSet`1
-- @realm shared
-- @ImmutableHashSet`1 Aliases
---
-- InteractDistance, Field of type number
-- @realm shared
-- @number InteractDistance
---
-- InteractPriority, Field of type number
-- @realm shared
-- @number InteractPriority
---
-- InteractThroughWalls, Field of type bool
-- @realm shared
-- @bool InteractThroughWalls
---
-- HideConditionBar, Field of type bool
-- @realm shared
-- @bool HideConditionBar
---
-- HideConditionInTooltip, Field of type bool
-- @realm shared
-- @bool HideConditionInTooltip
---
-- RequireBodyInsideTrigger, Field of type bool
-- @realm shared
-- @bool RequireBodyInsideTrigger
---
-- RequireCursorInsideTrigger, Field of type bool
-- @realm shared
-- @bool RequireCursorInsideTrigger
---
-- RequireCampaignInteract, Field of type bool
-- @realm shared
-- @bool RequireCampaignInteract
---
-- FocusOnSelected, Field of type bool
-- @realm shared
-- @bool FocusOnSelected
---
-- OffsetOnSelected, Field of type number
-- @realm shared
-- @number OffsetOnSelected
---
-- Health, Field of type number
-- @realm shared
-- @number Health
---
-- AllowSellingWhenBroken, Field of type bool
-- @realm shared
-- @bool AllowSellingWhenBroken
---
-- Indestructible, Field of type bool
-- @realm shared
-- @bool Indestructible
---
-- DamagedByExplosions, Field of type bool
-- @realm shared
-- @bool DamagedByExplosions
---
-- ExplosionDamageMultiplier, Field of type number
-- @realm shared
-- @number ExplosionDamageMultiplier
---
-- DamagedByProjectiles, Field of type bool
-- @realm shared
-- @bool DamagedByProjectiles
---
-- DamagedByMeleeWeapons, Field of type bool
-- @realm shared
-- @bool DamagedByMeleeWeapons
---
-- DamagedByRepairTools, Field of type bool
-- @realm shared
-- @bool DamagedByRepairTools
---
-- DamagedByMonsters, Field of type bool
-- @realm shared
-- @bool DamagedByMonsters
---
-- FireProof, Field of type bool
-- @realm shared
-- @bool FireProof
---
-- WaterProof, Field of type bool
-- @realm shared
-- @bool WaterProof
---
-- ImpactTolerance, Field of type number
-- @realm shared
-- @number ImpactTolerance
---
-- OnDamagedThreshold, Field of type number
-- @realm shared
-- @number OnDamagedThreshold
---
-- SonarSize, Field of type number
-- @realm shared
-- @number SonarSize
---
-- UseInHealthInterface, Field of type bool
-- @realm shared
-- @bool UseInHealthInterface
---
-- DisableItemUsageWhenSelected, Field of type bool
-- @realm shared
-- @bool DisableItemUsageWhenSelected
---
-- CargoContainerIdentifier, Field of type string
-- @realm shared
-- @string CargoContainerIdentifier
---
-- UseContainedSpriteColor, Field of type bool
-- @realm shared
-- @bool UseContainedSpriteColor
---
-- UseContainedInventoryIconColor, Field of type bool
-- @realm shared
-- @bool UseContainedInventoryIconColor
---
-- AddedRepairSpeedMultiplier, Field of type number
-- @realm shared
-- @number AddedRepairSpeedMultiplier
---
-- AddedPickingSpeedMultiplier, Field of type number
-- @realm shared
-- @number AddedPickingSpeedMultiplier
---
-- CannotRepairFail, Field of type bool
-- @realm shared
-- @bool CannotRepairFail
---
-- EquipConfirmationText, Field of type string
-- @realm shared
-- @string EquipConfirmationText
---
-- AllowRotatingInEditor, Field of type bool
-- @realm shared
-- @bool AllowRotatingInEditor
---
-- ShowContentsInTooltip, Field of type bool
-- @realm shared
-- @bool ShowContentsInTooltip
---
-- CanFlipX, Field of type bool
-- @realm shared
-- @bool CanFlipX
---
-- CanFlipY, Field of type bool
-- @realm shared
-- @bool CanFlipY
---
-- IsDangerous, Field of type bool
-- @realm shared
-- @bool IsDangerous
---
-- MaxStackSize, Field of type number
-- @realm shared
-- @number MaxStackSize
---
-- AllowDroppingOnSwap, Field of type bool
-- @realm shared
-- @bool AllowDroppingOnSwap
---
-- AllowDroppingOnSwapWith, Field of type ImmutableHashSet`1
-- @realm shared
-- @ImmutableHashSet`1 AllowDroppingOnSwapWith
---
-- VariantOf, Field of type Identifier
-- @realm shared
-- @Identifier VariantOf
---
-- ResizeHorizontal, Field of type bool
-- @realm shared
-- @bool ResizeHorizontal
---
-- ResizeVertical, Field of type bool
-- @realm shared
-- @bool ResizeVertical
---
-- Description, Field of type LocalizedString
-- @realm shared
-- @LocalizedString Description
---
-- AllowedUpgrades, Field of type string
-- @realm shared
-- @string AllowedUpgrades
---
-- HideInMenus, Field of type bool
-- @realm shared
-- @bool HideInMenus
---
-- Subcategory, Field of type string
-- @realm shared
-- @string Subcategory
---
-- Linkable, Field of type bool
-- @realm shared
-- @bool Linkable
---
-- SpriteColor, Field of type Color
-- @realm shared
-- @Color SpriteColor
---
-- Scale, Field of type number
-- @realm shared
-- @number Scale
---
-- UintIdentifier, Field of type number
-- @realm shared
-- @number UintIdentifier
---
-- ContentPackage, Field of type ContentPackage
-- @realm shared
-- @ContentPackage ContentPackage
---
-- FilePath, Field of type ContentPath
-- @realm shared
-- @ContentPath FilePath
---
-- ItemPrefab.Prefabs, Field of type PrefabCollection`1
-- @realm shared
-- @PrefabCollection`1 ItemPrefab.Prefabs
---
-- Identifier, Field of type Identifier
-- @realm shared
-- @Identifier Identifier
---
-- ContentFile, Field of type ContentFile
-- @realm shared
-- @ContentFile ContentFile

View File

@@ -1,106 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma Job class with some additional functions and fields
Barotrauma source code: [Job.cs](https://github.com/evilfactory/Barotrauma-lua-attempt/blob/master/Barotrauma/BarotraumaShared/SharedSource/Characters/Jobs/Job.cs)
]]
-- @code Job
-- @pragma nostrip
local Job = {}
--- Random
-- @realm shared
-- @tparam RandSync randSync
-- @treturn Job
function Job.Random(randSync) end
--- GetSkills
-- @realm shared
-- @treturn Enumerable
function GetSkills() end
--- GetSkillLevel
-- @realm shared
-- @tparam Identifier skillIdentifier
-- @treturn number
function GetSkillLevel(skillIdentifier) end
--- GetSkill
-- @realm shared
-- @tparam Identifier skillIdentifier
-- @treturn Skill
function GetSkill(skillIdentifier) end
--- OverrideSkills
-- @realm shared
-- @tparam table newSkills
function OverrideSkills(newSkills) end
--- IncreaseSkillLevel
-- @realm shared
-- @tparam Identifier skillIdentifier
-- @tparam number increase
-- @tparam bool increasePastMax
function IncreaseSkillLevel(skillIdentifier, increase, increasePastMax) end
--- GiveJobItems
-- @realm shared
-- @tparam Character character
-- @tparam WayPoint spawnPoint
function GiveJobItems(character, spawnPoint) end
--- Save
-- @realm shared
-- @tparam XElement parentElement
-- @treturn XElement
function Save(parentElement) 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
---
-- Name, Field of type LocalizedString
-- @realm shared
-- @LocalizedString Name
---
-- Description, Field of type LocalizedString
-- @realm shared
-- @LocalizedString Description
---
-- Prefab, Field of type JobPrefab
-- @realm shared
-- @JobPrefab Prefab
---
-- PrimarySkill, Field of type Skill
-- @realm shared
-- @Skill PrimarySkill
---
-- Variant, Field of type number
-- @realm shared
-- @number Variant

View File

@@ -1,214 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma JobPrefab class with some additional functions and fields
Barotrauma source code: [JobPrefab.cs](https://github.com/evilfactory/Barotrauma-lua-attempt/blob/master/Barotrauma/BarotraumaShared/SharedSource/Characters/Jobs/JobPrefab.cs)
]]
-- @code JobPrefab
-- @pragma nostrip
local JobPrefab = {}
--- Dispose
-- @realm shared
function Dispose() end
--- Get
-- @realm shared
-- @tparam string identifier
-- @treturn JobPrefab
function JobPrefab.Get(identifier) end
--- Random
-- @realm shared
-- @tparam RandSync sync
-- @treturn JobPrefab
function JobPrefab.Random(sync) 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
---
-- JobPrefab.ItemRepairPriorities, Field of type IReadOnlyDictionary`2
-- @realm shared
-- @IReadOnlyDictionary`2 JobPrefab.ItemRepairPriorities
---
-- UIColor, Field of type Color
-- @realm shared
-- @Color UIColor
---
-- IdleBehavior, Field of type BehaviorType
-- @realm shared
-- @BehaviorType IdleBehavior
---
-- OnlyJobSpecificDialog, Field of type bool
-- @realm shared
-- @bool OnlyJobSpecificDialog
---
-- InitialCount, Field of type number
-- @realm shared
-- @number InitialCount
---
-- AllowAlways, Field of type bool
-- @realm shared
-- @bool AllowAlways
---
-- MaxNumber, Field of type number
-- @realm shared
-- @number MaxNumber
---
-- MinNumber, Field of type number
-- @realm shared
-- @number MinNumber
---
-- MinKarma, Field of type number
-- @realm shared
-- @number MinKarma
---
-- PriceMultiplier, Field of type number
-- @realm shared
-- @number PriceMultiplier
---
-- Commonness, Field of type number
-- @realm shared
-- @number Commonness
---
-- VitalityModifier, Field of type number
-- @realm shared
-- @number VitalityModifier
---
-- HiddenJob, Field of type bool
-- @realm shared
-- @bool HiddenJob
---
-- PrimarySkill, Field of type SkillPrefab
-- @realm shared
-- @SkillPrefab PrimarySkill
---
-- Element, Field of type ContentXElement
-- @realm shared
-- @ContentXElement Element
---
-- ClothingElement, Field of type ContentXElement
-- @realm shared
-- @ContentXElement ClothingElement
---
-- Variants, Field of type number
-- @realm shared
-- @number Variants
---
-- UintIdentifier, Field of type number
-- @realm shared
-- @number UintIdentifier
---
-- ContentPackage, Field of type ContentPackage
-- @realm shared
-- @ContentPackage ContentPackage
---
-- FilePath, Field of type ContentPath
-- @realm shared
-- @ContentPath FilePath
---
-- ItemSets, Field of type table
-- @realm shared
-- @table ItemSets
---
-- PreviewItems, Field of type ImmutableDictionary`2
-- @realm shared
-- @ImmutableDictionary`2 PreviewItems
---
-- Skills, Field of type table
-- @realm shared
-- @table Skills
---
-- AutonomousObjectives, Field of type table
-- @realm shared
-- @table AutonomousObjectives
---
-- AppropriateOrders, Field of type table
-- @realm shared
-- @table AppropriateOrders
---
-- Name, Field of type LocalizedString
-- @realm shared
-- @LocalizedString Name
---
-- Description, Field of type LocalizedString
-- @realm shared
-- @LocalizedString Description
---
-- Icon, Field of type Sprite
-- @realm shared
-- @Sprite Icon
---
-- IconSmall, Field of type Sprite
-- @realm shared
-- @Sprite IconSmall
---
-- JobPrefab.Prefabs, Field of type PrefabCollection`1
-- @realm shared
-- @PrefabCollection`1 JobPrefab.Prefabs
---
-- JobPrefab.NoJobElement, Field of type ContentXElement
-- @realm shared
-- @ContentXElement JobPrefab.NoJobElement
---
-- Identifier, Field of type Identifier
-- @realm shared
-- @Identifier Identifier
---
-- ContentFile, Field of type ContentFile
-- @realm shared
-- @ContentFile ContentFile

View File

@@ -1,559 +0,0 @@
-- 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
--- 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
--- ServerEventWrite
-- @realm shared
-- @tparam IWriteMessage msg
-- @tparam Client c
-- @tparam IData extraData
function ServerEventWrite(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
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
---
-- 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
---
-- CreationStackTrace, Field of type string
-- @realm shared
-- @string CreationStackTrace
---
-- CreationIndex, Field of type number
-- @realm shared
-- @number CreationIndex

View File

@@ -1,167 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma.NetLobbyScreen
]]
-- @code Game.NetLobbyScreen
-- @pragma nostrip
local NetLobbyScreen = {}
--- ChangeServerName
-- @realm shared
-- @tparam string n
function ChangeServerName(n) end
--- ChangeServerMessage
-- @realm shared
-- @tparam string m
function ChangeServerMessage(m) end
--- GetSubList
-- @realm shared
-- @treturn IReadOnlyList`1
function GetSubList() end
--- AddSub
-- @realm shared
-- @tparam SubmarineInfo sub
function AddSub(sub) end
--- ToggleCampaignMode
-- @realm shared
-- @tparam bool enabled
function ToggleCampaignMode(enabled) end
--- Select
-- @realm shared
function Select() end
--- RandomizeSettings
-- @realm shared
function RandomizeSettings() end
--- SetLevelDifficulty
-- @realm shared
-- @tparam number difficulty
function SetLevelDifficulty(difficulty) end
--- ToggleTraitorsEnabled
-- @realm shared
-- @tparam number dir
function ToggleTraitorsEnabled(dir) end
--- SetBotCount
-- @realm shared
-- @tparam number botCount
function SetBotCount(botCount) end
--- SetBotSpawnMode
-- @realm shared
-- @tparam BotSpawnMode botSpawnMode
function SetBotSpawnMode(botSpawnMode) end
--- SetTraitorsEnabled
-- @realm shared
-- @tparam YesNoMaybe enabled
function SetTraitorsEnabled(enabled) end
--- Deselect
-- @realm shared
function Deselect() end
--- Update
-- @realm shared
-- @tparam number deltaTime
function Update(deltaTime) 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
---
-- SelectedSub, Field of type SubmarineInfo
-- @realm shared
-- @SubmarineInfo SelectedSub
---
-- SelectedShuttle, Field of type SubmarineInfo
-- @realm shared
-- @SubmarineInfo SelectedShuttle
---
-- GameModes, Field of type GameModePreset[]
-- @realm shared
-- @GameModePreset[] GameModes
---
-- SelectedModeIndex, Field of type number
-- @realm shared
-- @number SelectedModeIndex
---
-- SelectedModeIdentifier, Field of type Identifier
-- @realm shared
-- @Identifier SelectedModeIdentifier
---
-- SelectedMode, Field of type GameModePreset
-- @realm shared
-- @GameModePreset SelectedMode
---
-- MissionType, Field of type MissionType
-- @realm shared
-- @MissionType MissionType
---
-- MissionTypeName, Field of type string
-- @realm shared
-- @string MissionTypeName
---
-- JobPreferences, Field of type table
-- @realm shared
-- @table JobPreferences
---
-- LevelSeed, Field of type string
-- @realm shared
-- @string LevelSeed
---
-- LastUpdateID, Field of type number
-- @realm shared
-- @number LastUpdateID
---
-- Cam, Field of type Camera
-- @realm shared
-- @Camera Cam
---
-- IsEditor, Field of type bool
-- @realm shared
-- @bool IsEditor
---
-- RadiationEnabled, Field of type bool
-- @realm shared
-- @bool RadiationEnabled

View File

@@ -1,588 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma.Networking.ServerSettings
]]
-- @code Game.ServerSettings
-- @pragma nostrip
local ServerSettings = {}
--- ReadMonsterEnabled
-- @realm shared
-- @tparam IReadMessage inc
function ReadMonsterEnabled(inc) end
--- WriteMonsterEnabled
-- @realm shared
-- @tparam IWriteMessage msg
-- @tparam table monsterEnabled
function WriteMonsterEnabled(msg, monsterEnabled) end
--- ReadExtraCargo
-- @realm shared
-- @tparam IReadMessage msg
-- @treturn bool
function ReadExtraCargo(msg) end
--- WriteExtraCargo
-- @realm shared
-- @tparam IWriteMessage msg
function WriteExtraCargo(msg) end
--- ReadHiddenSubs
-- @realm shared
-- @tparam IReadMessage msg
function ReadHiddenSubs(msg) end
--- WriteHiddenSubs
-- @realm shared
-- @tparam IWriteMessage msg
function WriteHiddenSubs(msg) end
--- SetPassword
-- @realm shared
-- @tparam string password
function SetPassword(password) end
--- SaltPassword
-- @realm shared
-- @tparam Byte[] password
-- @tparam number salt
-- @treturn Byte[]
function ServerSettings.SaltPassword(password, salt) end
--- IsPasswordCorrect
-- @realm shared
-- @tparam Byte[] input
-- @tparam number salt
-- @treturn bool
function IsPasswordCorrect(input, salt) end
--- UpdateFlag
-- @realm shared
-- @tparam NetFlags flag
function UpdateFlag(flag) end
--- GetRequiredFlags
-- @realm shared
-- @tparam Client c
-- @treturn NetFlags
function GetRequiredFlags(c) end
--- ServerAdminWrite
-- @realm shared
-- @tparam IWriteMessage outMsg
-- @tparam Client c
function ServerAdminWrite(outMsg, c) end
--- ServerWrite
-- @realm shared
-- @tparam IWriteMessage outMsg
-- @tparam Client c
function ServerWrite(outMsg, c) end
--- ServerRead
-- @realm shared
-- @tparam IReadMessage incMsg
-- @tparam Client c
function ServerRead(incMsg, c) end
--- SaveSettings
-- @realm shared
function SaveSettings() end
--- SelectNonHiddenSubmarine
-- @realm shared
-- @tparam string current
-- @treturn string
function SelectNonHiddenSubmarine(current) end
--- LoadClientPermissions
-- @realm shared
function LoadClientPermissions() end
--- SaveClientPermissions
-- @realm shared
function SaveClientPermissions() 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
---
-- LastPropertyUpdateId, Field of type number
-- @realm shared
-- @number LastPropertyUpdateId
---
-- Name, Field of type string
-- @realm shared
-- @string Name
---
-- SerializableProperties, Field of type table
-- @realm shared
-- @table SerializableProperties
---
-- ServerName, Field of type string
-- @realm shared
-- @string ServerName
---
-- ServerMessageText, Field of type string
-- @realm shared
-- @string ServerMessageText
---
-- MonsterEnabled, Field of type table
-- @realm shared
-- @table MonsterEnabled
---
-- ExtraCargo, Field of type table
-- @realm shared
-- @table ExtraCargo
---
-- HiddenSubs, Field of type HashSet`1
-- @realm shared
-- @HashSet`1 HiddenSubs
---
-- ClientPermissions, Field of type table
-- @realm shared
-- @table ClientPermissions
---
-- Whitelist, Field of type WhiteList
-- @realm shared
-- @WhiteList Whitelist
---
-- TickRate, Field of type number
-- @realm shared
-- @number TickRate
---
-- RandomizeSeed, Field of type bool
-- @realm shared
-- @bool RandomizeSeed
---
-- UseRespawnShuttle, Field of type bool
-- @realm shared
-- @bool UseRespawnShuttle
---
-- RespawnInterval, Field of type number
-- @realm shared
-- @number RespawnInterval
---
-- MaxTransportTime, Field of type number
-- @realm shared
-- @number MaxTransportTime
---
-- MinRespawnRatio, Field of type number
-- @realm shared
-- @number MinRespawnRatio
---
-- AutoRestartInterval, Field of type number
-- @realm shared
-- @number AutoRestartInterval
---
-- StartWhenClientsReady, Field of type bool
-- @realm shared
-- @bool StartWhenClientsReady
---
-- StartWhenClientsReadyRatio, Field of type number
-- @realm shared
-- @number StartWhenClientsReadyRatio
---
-- AllowSpectating, Field of type bool
-- @realm shared
-- @bool AllowSpectating
---
-- SaveServerLogs, Field of type bool
-- @realm shared
-- @bool SaveServerLogs
---
-- AllowModDownloads, Field of type bool
-- @realm shared
-- @bool AllowModDownloads
---
-- AllowRagdollButton, Field of type bool
-- @realm shared
-- @bool AllowRagdollButton
---
-- AllowFileTransfers, Field of type bool
-- @realm shared
-- @bool AllowFileTransfers
---
-- VoiceChatEnabled, Field of type bool
-- @realm shared
-- @bool VoiceChatEnabled
---
-- PlayStyle, Field of type PlayStyle
-- @realm shared
-- @PlayStyle PlayStyle
---
-- LosMode, Field of type LosMode
-- @realm shared
-- @LosMode LosMode
---
-- LinesPerLogFile, Field of type number
-- @realm shared
-- @number LinesPerLogFile
---
-- AutoRestart, Field of type bool
-- @realm shared
-- @bool AutoRestart
---
-- HasPassword, Field of type bool
-- @realm shared
-- @bool HasPassword
---
-- AllowVoteKick, Field of type bool
-- @realm shared
-- @bool AllowVoteKick
---
-- AllowEndVoting, Field of type bool
-- @realm shared
-- @bool AllowEndVoting
---
-- AllowRespawn, Field of type bool
-- @realm shared
-- @bool AllowRespawn
---
-- BotCount, Field of type number
-- @realm shared
-- @number BotCount
---
-- MaxBotCount, Field of type number
-- @realm shared
-- @number MaxBotCount
---
-- BotSpawnMode, Field of type BotSpawnMode
-- @realm shared
-- @BotSpawnMode BotSpawnMode
---
-- DisableBotConversations, Field of type bool
-- @realm shared
-- @bool DisableBotConversations
---
-- SelectedLevelDifficulty, Field of type number
-- @realm shared
-- @number SelectedLevelDifficulty
---
-- AllowDisguises, Field of type bool
-- @realm shared
-- @bool AllowDisguises
---
-- AllowRewiring, Field of type bool
-- @realm shared
-- @bool AllowRewiring
---
-- LockAllDefaultWires, Field of type bool
-- @realm shared
-- @bool LockAllDefaultWires
---
-- AllowLinkingWifiToChat, Field of type bool
-- @realm shared
-- @bool AllowLinkingWifiToChat
---
-- AllowFriendlyFire, Field of type bool
-- @realm shared
-- @bool AllowFriendlyFire
---
-- DestructibleOutposts, Field of type bool
-- @realm shared
-- @bool DestructibleOutposts
---
-- KillableNPCs, Field of type bool
-- @realm shared
-- @bool KillableNPCs
---
-- BanAfterWrongPassword, Field of type bool
-- @realm shared
-- @bool BanAfterWrongPassword
---
-- MaxPasswordRetriesBeforeBan, Field of type number
-- @realm shared
-- @number MaxPasswordRetriesBeforeBan
---
-- SelectedSubmarine, Field of type string
-- @realm shared
-- @string SelectedSubmarine
---
-- SelectedShuttle, Field of type string
-- @realm shared
-- @string SelectedShuttle
---
-- TraitorsEnabled, Field of type YesNoMaybe
-- @realm shared
-- @YesNoMaybe TraitorsEnabled
---
-- TraitorsMinPlayerCount, Field of type number
-- @realm shared
-- @number TraitorsMinPlayerCount
---
-- TraitorsMinStartDelay, Field of type number
-- @realm shared
-- @number TraitorsMinStartDelay
---
-- TraitorsMaxStartDelay, Field of type number
-- @realm shared
-- @number TraitorsMaxStartDelay
---
-- TraitorsMinRestartDelay, Field of type number
-- @realm shared
-- @number TraitorsMinRestartDelay
---
-- TraitorsMaxRestartDelay, Field of type number
-- @realm shared
-- @number TraitorsMaxRestartDelay
---
-- SubSelectionMode, Field of type SelectionMode
-- @realm shared
-- @SelectionMode SubSelectionMode
---
-- ModeSelectionMode, Field of type SelectionMode
-- @realm shared
-- @SelectionMode ModeSelectionMode
---
-- BanList, Field of type BanList
-- @realm shared
-- @BanList BanList
---
-- EndVoteRequiredRatio, Field of type number
-- @realm shared
-- @number EndVoteRequiredRatio
---
-- VoteRequiredRatio, Field of type number
-- @realm shared
-- @number VoteRequiredRatio
---
-- VoteTimeout, Field of type number
-- @realm shared
-- @number VoteTimeout
---
-- KickVoteRequiredRatio, Field of type number
-- @realm shared
-- @number KickVoteRequiredRatio
---
-- KillDisconnectedTime, Field of type number
-- @realm shared
-- @number KillDisconnectedTime
---
-- KickAFKTime, Field of type number
-- @realm shared
-- @number KickAFKTime
---
-- KarmaEnabled, Field of type bool
-- @realm shared
-- @bool KarmaEnabled
---
-- KarmaPreset, Field of type string
-- @realm shared
-- @string KarmaPreset
---
-- GameModeIdentifier, Field of type Identifier
-- @realm shared
-- @Identifier GameModeIdentifier
---
-- MissionType, Field of type string
-- @realm shared
-- @string MissionType
---
-- MaxPlayers, Field of type number
-- @realm shared
-- @number MaxPlayers
---
-- AllowedRandomMissionTypes, Field of type table
-- @realm shared
-- @table AllowedRandomMissionTypes
---
-- AutoBanTime, Field of type number
-- @realm shared
-- @number AutoBanTime
---
-- MaxAutoBanTime, Field of type number
-- @realm shared
-- @number MaxAutoBanTime
---
-- RadiationEnabled, Field of type bool
-- @realm shared
-- @bool RadiationEnabled
---
-- MaxMissionCount, Field of type number
-- @realm shared
-- @number MaxMissionCount
---
-- AllowSubVoting, Field of type bool
-- @realm shared
-- @bool AllowSubVoting
---
-- AllowModeVoting, Field of type bool
-- @realm shared
-- @bool AllowModeVoting
---
-- AllowedClientNameChars, Field of type table
-- @realm shared
-- @table AllowedClientNameChars
---
-- LastUpdateIdForFlag, Field of type table
-- @realm shared
-- @table LastUpdateIdForFlag
---
-- ServerDetailsChanged, Field of type bool
-- @realm shared
-- @bool ServerDetailsChanged
---
-- Port, Field of type number
-- @realm shared
-- @number Port
---
-- QueryPort, Field of type number
-- @realm shared
-- @number QueryPort
---
-- ListenIPAddress, Field of type IPAddress
-- @realm shared
-- @IPAddress ListenIPAddress
---
-- EnableUPnP, Field of type bool
-- @realm shared
-- @bool EnableUPnP
---
-- ServerLog, Field of type ServerLog
-- @realm shared
-- @ServerLog ServerLog
---
-- AutoRestartTimer, Field of type number
-- @realm shared
-- @number AutoRestartTimer
---
-- IsPublic, Field of type bool
-- @realm shared
-- @bool IsPublic
---
-- ServerSettings.ClientPermissionsFile, Field of type string
-- @realm shared
-- @string ServerSettings.ClientPermissionsFile
---
-- ServerSettings.SubmarineSeparatorChar, Field of type Char
-- @realm shared
-- @Char ServerSettings.SubmarineSeparatorChar
---
-- ServerSettings.PermissionPresetFile, Field of type string
-- @realm shared
-- @string ServerSettings.PermissionPresetFile
---
-- ServerSettings.SettingsFile, Field of type string
-- @realm shared
-- @string ServerSettings.SettingsFile
---
-- ServerSettings.MaxExtraCargoItemsOfType, Field of type number
-- @realm shared
-- @number ServerSettings.MaxExtraCargoItemsOfType
---
-- ServerSettings.MaxExtraCargoItemTypes, Field of type number
-- @realm shared
-- @number ServerSettings.MaxExtraCargoItemTypes

View File

@@ -1,623 +0,0 @@
-- 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 = {}
--- FindContaining
-- @realm shared
-- @tparam Vector2 position
-- @treturn Submarine
function Submarine.FindContaining(position) end
--- 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 Enumerable entities
function Submarine.RepositionEntities(moveAmount, entities) end
--- SaveToXElement
-- @realm shared
-- @tparam XElement element
function SaveToXElement(element) end
--- TrySaveAs
-- @realm shared
-- @tparam string filePath
-- @tparam MemoryStream previewImage
-- @treturn bool
function TrySaveAs(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
--- ServerWritePosition
-- @realm shared
-- @tparam IWriteMessage msg
-- @tparam Client c
function ServerWritePosition(msg, c) end
--- ServerEventWrite
-- @realm shared
-- @tparam IWriteMessage msg
-- @tparam Client c
-- @tparam IData extraData
function ServerEventWrite(msg, c, extraData) end
--- ToString
-- @realm shared
-- @treturn string
function ToString() end
--- CalculateBasePrice
-- @realm shared
-- @treturn number
function CalculateBasePrice() end
--- AttemptBallastFloraInfection
-- @realm shared
-- @tparam Identifier 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 Enumerable 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 Enumerable ignoredBodies
-- @tparam Nullable`1 collisionCategory
-- @tparam bool ignoreSensors
-- @tparam Predicate`1 customPredicate
-- @tparam bool allowInsideFixture
-- @treturn Enumerable
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
--- 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 Enumerable list
-- @treturn Enumerable
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
--- 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 Enumerable
-- @realm shared
-- @Enumerable Submarine.VisibleEntities
---
-- DockedTo, Field of type Enumerable
-- @realm shared
-- @Enumerable 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
---
-- VisibleBorders, Field of type Rectangle
-- @realm shared
-- @Rectangle VisibleBorders
---
-- 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
---
-- SubmarineSpecificIDTag, Field of type number
-- @realm shared
-- @number SubmarineSpecificIDTag
---
-- AtDamageDepth, Field of type bool
-- @realm shared
-- @bool AtDamageDepth
---
-- 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
---
-- Removed, Field of type bool
-- @realm shared
-- @bool Removed
---
-- 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
---
-- InDetectable, Field of type bool
-- @realm shared
-- @bool InDetectable
---
-- SpawnTime, Field of type number
-- @realm shared
-- @number SpawnTime
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
---
-- 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
---
-- CreationStackTrace, Field of type string
-- @realm shared
-- @string CreationStackTrace
---
-- CreationIndex, Field of type number
-- @realm shared
-- @number CreationIndex

View File

@@ -1,307 +0,0 @@
-- 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
function SaveAs(filePath, previewImage) end
--- AddToSavedSubs
-- @realm shared
-- @tparam SubmarineInfo subInfo
function SubmarineInfo.AddToSavedSubs(subInfo) end
--- RemoveSavedSub
-- @realm shared
-- @tparam string filePath
function SubmarineInfo.RemoveSavedSub(filePath) 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 LocalizedString
-- @realm shared
-- @LocalizedString DisplayName
---
-- Description, Field of type LocalizedString
-- @realm shared
-- @LocalizedString 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

View File

@@ -1,507 +0,0 @@
-- luacheck: ignore 111
--[[--
Barotrauma.WayPoint
]]
-- @code WayPoint
-- @pragma nostrip
local WayPoint = {}
--- Clone
-- @realm shared
-- @treturn MapEntity
function Clone() end
--- GenerateSubWaypoints
-- @realm shared
-- @tparam Submarine submarine
-- @treturn bool
function WayPoint.GenerateSubWaypoints(submarine) end
--- ConnectTo
-- @realm shared
-- @tparam WayPoint wayPoint2
function ConnectTo(wayPoint2) end
--- GetRandom
-- @realm shared
-- @tparam SpawnType spawnType
-- @tparam JobPrefab assignedJob
-- @tparam Submarine sub
-- @tparam bool useSyncedRand
-- @tparam string spawnPointTag
-- @tparam bool ignoreSubmarine
-- @treturn WayPoint
function WayPoint.GetRandom(spawnType, assignedJob, sub, useSyncedRand, spawnPointTag, ignoreSubmarine) end
--- SelectCrewSpawnPoints
-- @realm shared
-- @tparam table crew
-- @tparam Submarine submarine
-- @treturn WayPoint[]
function WayPoint.SelectCrewSpawnPoints(crew, submarine) end
--- FindHull
-- @realm shared
function FindHull() end
--- OnMapLoaded
-- @realm shared
function OnMapLoaded() end
--- InitializeLinks
-- @realm shared
function InitializeLinks() end
--- Load
-- @realm shared
-- @tparam ContentXElement element
-- @tparam Submarine submarine
-- @tparam IdRemap idRemap
-- @treturn WayPoint
function WayPoint.Load(element, submarine, idRemap) end
--- Save
-- @realm shared
-- @tparam XElement parentElement
-- @treturn XElement
function Save(parentElement) end
--- ShallowRemove
-- @realm shared
function ShallowRemove() end
--- Remove
-- @realm shared
function Remove() end
--- AddLinked
-- @realm shared
-- @tparam MapEntity entity
function AddLinked(entity) end
--- ResolveLinks
-- @realm shared
-- @tparam IdRemap childRemap
function ResolveLinks(childRemap) end
--- Move
-- @realm shared
-- @tparam Vector2 amount
function Move(amount) end
--- IsMouseOn
-- @realm shared
-- @tparam Vector2 position
-- @treturn bool
function IsMouseOn(position) end
--- HasUpgrade
-- @realm shared
-- @tparam Identifier identifier
-- @treturn bool
function HasUpgrade(identifier) end
--- GetUpgrade
-- @realm shared
-- @tparam Identifier 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
--- Update
-- @realm shared
-- @tparam number deltaTime
-- @tparam Camera cam
function Update(deltaTime, cam) 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
---
-- ConnectedGap, Field of type Gap
-- @realm shared
-- @Gap ConnectedGap
---
-- ConnectedDoor, Field of type Door
-- @realm shared
-- @Door ConnectedDoor
---
-- CurrentHull, Field of type Hull
-- @realm shared
-- @Hull CurrentHull
---
-- SpawnType, Field of type SpawnType
-- @realm shared
-- @SpawnType SpawnType
---
-- OnLinksChanged, Field of type function
-- @realm shared
-- @function OnLinksChanged
---
-- Name, Field of type string
-- @realm shared
-- @string Name
---
-- IdCardDesc, Field of type string
-- @realm shared
-- @string IdCardDesc
---
-- IdCardTags, Field of type String[]
-- @realm shared
-- @String[] IdCardTags
---
-- Tags, Field of type Enumerable
-- @realm shared
-- @Enumerable Tags
---
-- AssignedJob, Field of type JobPrefab
-- @realm shared
-- @JobPrefab AssignedJob
---
-- 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
---
-- 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
---
-- Linkable, Field of type bool
-- @realm shared
-- @bool Linkable
---
-- AllowedLinks, Field of type Enumerable
-- @realm shared
-- @Enumerable 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
---
-- Layer, Field of type string
-- @realm shared
-- @string Layer
---
-- 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
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
---
-- Ladders, Field of type Ladder
-- @realm shared
-- @Ladder Ladders
---
-- Stairs, Field of type Structure
-- @realm shared
-- @Structure Stairs
---
-- isObstructed, Field of type bool
-- @realm shared
-- @bool isObstructed
---
-- Tunnel, Field of type Tunnel
-- @realm shared
-- @Tunnel Tunnel
---
-- Ruin, Field of type Ruin
-- @realm shared
-- @Ruin Ruin
---
-- WayPoint.WayPointList, Field of type table
-- @realm shared
-- @table WayPoint.WayPointList
---
-- WayPoint.ShowWayPoints, Field of type bool
-- @realm shared
-- @bool WayPoint.ShowWayPoints
---
-- WayPoint.ShowSpawnPoints, Field of type bool
-- @realm shared
-- @bool WayPoint.ShowSpawnPoints
---
-- WayPoint.LadderWaypointInterval, Field of type number
-- @realm shared
-- @number WayPoint.LadderWaypointInterval
---
-- Prefab, Field of type MapEntityPrefab
-- @realm shared
-- @MapEntityPrefab Prefab
---
-- unresolvedLinkedToID, Field of type table
-- @realm shared
-- @table unresolvedLinkedToID
---
-- DisallowedUpgradeSet, Field of type HashSet`1
-- @realm shared
-- @HashSet`1 DisallowedUpgradeSet
---
-- 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
---
-- CreationStackTrace, Field of type string
-- @realm shared
-- @string CreationStackTrace
---
-- CreationIndex, Field of type number
-- @realm shared
-- @number CreationIndex

View File

@@ -1,478 +0,0 @@
-- luacheck: ignore 111
--[[--
FarseerPhysics.Dynamics.World
]]
-- @code Game.World
-- @pragma nostrip
local World = {}
--- Add
-- @realm shared
-- @tparam Body body
function Add(body) end
--- Remove
-- @realm shared
-- @tparam Body body
function Remove(body) end
--- Add
-- @realm shared
-- @tparam Joint joint
function Add(joint) end
--- Remove
-- @realm shared
-- @tparam Joint joint
function Remove(joint) end
--- AddAsync
-- @realm shared
-- @tparam Body body
function AddAsync(body) end
--- RemoveAsync
-- @realm shared
-- @tparam Body body
function RemoveAsync(body) end
--- AddAsync
-- @realm shared
-- @tparam Joint joint
function AddAsync(joint) end
--- RemoveAsync
-- @realm shared
-- @tparam Joint joint
function RemoveAsync(joint) end
--- ProcessChanges
-- @realm shared
function ProcessChanges() end
--- Step
-- @realm shared
-- @tparam TimeSpan dt
function Step(dt) end
--- Step
-- @realm shared
-- @tparam TimeSpan dt
-- @tparam SolverIterations& iterations
function Step(dt, iterations) end
--- Step
-- @realm shared
-- @tparam number dt
function Step(dt) end
--- Step
-- @realm shared
-- @tparam number dt
-- @tparam SolverIterations& iterations
function Step(dt, iterations) end
--- ClearForces
-- @realm shared
function ClearForces() end
--- QueryAABB
-- @realm shared
-- @tparam function callback
-- @tparam AABB& aabb
function QueryAABB(callback, aabb) end
--- QueryAABB
-- @realm shared
-- @tparam AABB& aabb
-- @treturn table
function QueryAABB(aabb) end
--- RayCast
-- @realm shared
-- @tparam function callback
-- @tparam Vector2 point1
-- @tparam Vector2 point2
-- @tparam Category collisionCategory
function RayCast(callback, point1, point2, collisionCategory) end
--- RayCast
-- @realm shared
-- @tparam Vector2 point1
-- @tparam Vector2 point2
-- @treturn table
function RayCast(point1, point2) end
--- Add
-- @realm shared
-- @tparam Controller controller
function Add(controller) end
--- Remove
-- @realm shared
-- @tparam Controller controller
function Remove(controller) end
--- TestPoint
-- @realm shared
-- @tparam Vector2 point
-- @treturn Fixture
function TestPoint(point) end
--- TestPointAll
-- @realm shared
-- @tparam Vector2 point
-- @treturn table
function TestPointAll(point) end
--- ShiftOrigin
-- @realm shared
-- @tparam Vector2 newOrigin
function ShiftOrigin(newOrigin) end
--- Clear
-- @realm shared
function Clear() end
--- CreateBody
-- @realm shared
-- @tparam Vector2 position
-- @tparam number rotation
-- @tparam BodyType bodyType
-- @treturn Body
function CreateBody(position, rotation, bodyType) end
--- CreateEdge
-- @realm shared
-- @tparam Vector2 start
-- @tparam Vector2 endparam
-- @treturn Body
function CreateEdge(start, endparam) end
--- CreateChainShape
-- @realm shared
-- @tparam Vertices vertices
-- @tparam Vector2 position
-- @treturn Body
function CreateChainShape(vertices, position) end
--- CreateLoopShape
-- @realm shared
-- @tparam Vertices vertices
-- @tparam Vector2 position
-- @treturn Body
function CreateLoopShape(vertices, position) end
--- CreateRectangle
-- @realm shared
-- @tparam number width
-- @tparam number height
-- @tparam number density
-- @tparam Vector2 position
-- @tparam number rotation
-- @tparam BodyType bodyType
-- @treturn Body
function CreateRectangle(width, height, density, position, rotation, bodyType) end
--- CreateCircle
-- @realm shared
-- @tparam number radius
-- @tparam number density
-- @tparam Vector2 position
-- @tparam BodyType bodyType
-- @treturn Body
function CreateCircle(radius, density, position, bodyType) end
--- CreateEllipse
-- @realm shared
-- @tparam number xRadius
-- @tparam number yRadius
-- @tparam number edges
-- @tparam number density
-- @tparam Vector2 position
-- @tparam number rotation
-- @tparam BodyType bodyType
-- @treturn Body
function CreateEllipse(xRadius, yRadius, edges, density, position, rotation, bodyType) end
--- CreatePolygon
-- @realm shared
-- @tparam Vertices vertices
-- @tparam number density
-- @tparam Vector2 position
-- @tparam number rotation
-- @tparam BodyType bodyType
-- @treturn Body
function CreatePolygon(vertices, density, position, rotation, bodyType) end
--- CreateCompoundPolygon
-- @realm shared
-- @tparam table list
-- @tparam number density
-- @tparam Vector2 position
-- @tparam number rotation
-- @tparam BodyType bodyType
-- @treturn Body
function CreateCompoundPolygon(list, density, position, rotation, bodyType) end
--- CreateGear
-- @realm shared
-- @tparam number radius
-- @tparam number numberOfTeeth
-- @tparam number tipPercentage
-- @tparam number toothHeight
-- @tparam number density
-- @tparam Vector2 position
-- @tparam number rotation
-- @tparam BodyType bodyType
-- @treturn Body
function CreateGear(radius, numberOfTeeth, tipPercentage, toothHeight, density, position, rotation, bodyType) end
--- CreateCapsule
-- @realm shared
-- @tparam number height
-- @tparam number topRadius
-- @tparam number topEdges
-- @tparam number bottomRadius
-- @tparam number bottomEdges
-- @tparam number density
-- @tparam Vector2 position
-- @tparam number rotation
-- @tparam BodyType bodyType
-- @treturn Body
function CreateCapsule(height, topRadius, topEdges, bottomRadius, bottomEdges, density, position, rotation, bodyType) end
--- CreateCapsuleHorizontal
-- @realm shared
-- @tparam number width
-- @tparam number endRadius
-- @tparam number density
-- @tparam Vector2 position
-- @tparam number rotation
-- @tparam BodyType bodyType
-- @treturn Body
function CreateCapsuleHorizontal(width, endRadius, density, position, rotation, bodyType) end
--- CreateCapsule
-- @realm shared
-- @tparam number height
-- @tparam number endRadius
-- @tparam number density
-- @tparam Vector2 position
-- @tparam number rotation
-- @tparam BodyType bodyType
-- @treturn Body
function CreateCapsule(height, endRadius, density, position, rotation, bodyType) end
--- CreateRoundedRectangle
-- @realm shared
-- @tparam number width
-- @tparam number height
-- @tparam number xRadius
-- @tparam number yRadius
-- @tparam number segments
-- @tparam number density
-- @tparam Vector2 position
-- @tparam number rotation
-- @tparam BodyType bodyType
-- @treturn Body
function CreateRoundedRectangle(width, height, xRadius, yRadius, segments, density, position, rotation, bodyType) end
--- CreateLineArc
-- @realm shared
-- @tparam number radians
-- @tparam number sides
-- @tparam number radius
-- @tparam bool closed
-- @tparam Vector2 position
-- @tparam number rotation
-- @tparam BodyType bodyType
-- @treturn Body
function CreateLineArc(radians, sides, radius, closed, position, rotation, bodyType) end
--- CreateSolidArc
-- @realm shared
-- @tparam number density
-- @tparam number radians
-- @tparam number sides
-- @tparam number radius
-- @tparam Vector2 position
-- @tparam number rotation
-- @tparam BodyType bodyType
-- @treturn Body
function CreateSolidArc(density, radians, sides, radius, position, rotation, bodyType) end
--- CreateChain
-- @realm shared
-- @tparam Vector2 start
-- @tparam Vector2 endparam
-- @tparam number linkWidth
-- @tparam number linkHeight
-- @tparam number numberOfLinks
-- @tparam number linkDensity
-- @tparam bool attachRopeJoint
-- @treturn Path
function CreateChain(start, endparam, linkWidth, linkHeight, numberOfLinks, linkDensity, attachRopeJoint) 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
---
-- Fluid, Field of type FluidSystem2
-- @realm shared
-- @FluidSystem2 Fluid
---
-- UpdateTime, Field of type TimeSpan
-- @realm shared
-- @TimeSpan UpdateTime
---
-- ContinuousPhysicsTime, Field of type TimeSpan
-- @realm shared
-- @TimeSpan ContinuousPhysicsTime
---
-- ControllersUpdateTime, Field of type TimeSpan
-- @realm shared
-- @TimeSpan ControllersUpdateTime
---
-- AddRemoveTime, Field of type TimeSpan
-- @realm shared
-- @TimeSpan AddRemoveTime
---
-- NewContactsTime, Field of type TimeSpan
-- @realm shared
-- @TimeSpan NewContactsTime
---
-- ContactsUpdateTime, Field of type TimeSpan
-- @realm shared
-- @TimeSpan ContactsUpdateTime
---
-- SolveUpdateTime, Field of type TimeSpan
-- @realm shared
-- @TimeSpan SolveUpdateTime
---
-- ProxyCount, Field of type number
-- @realm shared
-- @number ProxyCount
---
-- ContactCount, Field of type number
-- @realm shared
-- @number ContactCount
---
-- IsLocked, Field of type bool
-- @realm shared
-- @bool IsLocked
---
-- ContactList, Field of type ContactListHead
-- @realm shared
-- @ContactListHead ContactList
---
-- Enabled, Field of type bool
-- @realm shared
-- @bool Enabled
---
-- Island, Field of type Island
-- @realm shared
-- @Island Island
---
-- Tag, Field of type Object
-- @realm shared
-- @Object Tag
---
-- BodyAdded, Field of type BodyDelegate
-- @realm shared
-- @BodyDelegate BodyAdded
---
-- BodyRemoved, Field of type BodyDelegate
-- @realm shared
-- @BodyDelegate BodyRemoved
---
-- FixtureAdded, Field of type FixtureDelegate
-- @realm shared
-- @FixtureDelegate FixtureAdded
---
-- FixtureRemoved, Field of type FixtureDelegate
-- @realm shared
-- @FixtureDelegate FixtureRemoved
---
-- JointAdded, Field of type JointDelegate
-- @realm shared
-- @JointDelegate JointAdded
---
-- JointRemoved, Field of type JointDelegate
-- @realm shared
-- @JointDelegate JointRemoved
---
-- ControllerAdded, Field of type ControllerDelegate
-- @realm shared
-- @ControllerDelegate ControllerAdded
---
-- ControllerRemoved, Field of type ControllerDelegate
-- @realm shared
-- @ControllerDelegate ControllerRemoved
---
-- ControllerList, Field of type table
-- @realm shared
-- @table ControllerList
---
-- Gravity, Field of type Vector2
-- @realm shared
-- @Vector2 Gravity
---
-- ContactManager, Field of type ContactManager
-- @realm shared
-- @ContactManager ContactManager
---
-- BodyList, Field of type table
-- @realm shared
-- @table BodyList
---
-- JointList, Field of type table
-- @realm shared
-- @table JointList

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../../../Barotrauma/BarotraumaClient/LinuxClient.csproj" PrivateAssets="false" />
<ProjectReference Include="../../../../Libraries/Farseer Physics Engine 3.5/Farseer.NetStandard.csproj" PrivateAssets="false" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,34 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LuaDocsGenerator", "LuaDocsGenerator.csproj", "{F1961973-E69E-41A7-BE13-4F931890BC70}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinuxClient", "..\..\..\..\Barotrauma\BarotraumaClient\LinuxClient.csproj", "{426071C4-6668-4CF9-A44C-5FBEB72C469B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Farseer.NetStandard", "..\..\..\..\Libraries\Farseer Physics Engine 3.5\Farseer.NetStandard.csproj", "{F8F85D52-11B5-4177-914C-9AC75345D089}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F1961973-E69E-41A7-BE13-4F931890BC70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F1961973-E69E-41A7-BE13-4F931890BC70}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F1961973-E69E-41A7-BE13-4F931890BC70}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F1961973-E69E-41A7-BE13-4F931890BC70}.Release|Any CPU.Build.0 = Release|Any CPU
{426071C4-6668-4CF9-A44C-5FBEB72C469B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{426071C4-6668-4CF9-A44C-5FBEB72C469B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{426071C4-6668-4CF9-A44C-5FBEB72C469B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{426071C4-6668-4CF9-A44C-5FBEB72C469B}.Release|Any CPU.Build.0 = Release|Any CPU
{F8F85D52-11B5-4177-914C-9AC75345D089}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F8F85D52-11B5-4177-914C-9AC75345D089}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F8F85D52-11B5-4177-914C-9AC75345D089}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F8F85D52-11B5-4177-914C-9AC75345D089}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,373 @@
using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using Barotrauma;
using Barotrauma.Networking;
string NormalizeGenericTypeName(string s) {
var idx = s.LastIndexOf('`');
if (idx != -1) {
return s[..idx];
}
return s;
}
string TypeToString(Type type, bool useLuaTypes = true) {
// Return "T" for unresolved type params
if (type.IsGenericParameter) {
return type.Name;
}
var genericType = type.IsGenericType
? type.GetGenericTypeDefinition()
: null;
if (type == typeof(bool)) {
return "bool";
}
if (type == typeof(string)) {
return "string";
}
if (useLuaTypes) {
if (type == typeof(sbyte)
|| type == typeof(byte)
|| type == typeof(short)
|| type == typeof(ushort)
|| type == typeof(int)
|| type == typeof(uint)
|| type == typeof(long)
|| type == typeof(ulong)
|| type == typeof(float)
|| type == typeof(double)) {
return "number";
}
if (genericType == typeof(List<>)
|| genericType == typeof(Dictionary<,>)) {
return "table";
}
if (genericType == typeof(Action<,>)
|| genericType == typeof(Func<,>)) {
return "function";
}
}
var nsToRemove = new[] {
"Barotrauma",
"System",
"System.Collections",
"System.Collections.Generic",
};
string Namespaced(string typeName) {
if (type.Namespace == null) {
return typeName;
}
// Full namespace match
if (nsToRemove.Contains(type.Namespace)) {
return typeName;
}
// Partial namespace match
foreach (var ns in nsToRemove) {
if (ns == type.Namespace) {
return typeName;
}
if (type.Namespace.StartsWith(ns + ".")) {
var shortNs = type.Namespace.Remove(0, ns.Length + 1);
return $"{shortNs}.{typeName}";
}
}
return $"{type.Namespace}.{typeName}";
}
string Impl(string? ns) {
if (type.IsGenericType) {
var genericTypeDef = type.GetGenericTypeDefinition();
var genericTypeName = NormalizeGenericTypeName(genericTypeDef.Name);
var genericArgs = type.GetGenericArguments();
// Use the `T?` notation instead of Nullable<T>
if (genericTypeDef == typeof(Nullable<>)) {
// ldoc supports the "?string" notation, which expands to "?|nil|string"
if (useLuaTypes) {
return Namespaced("?" + TypeToString(genericArgs[0], useLuaTypes: false));
} else {
return Namespaced(TypeToString(genericArgs[0], useLuaTypes: false) + "?");
}
}
var sb = new StringBuilder();
sb.Append(genericTypeName);
sb.Append("<");
foreach (var genericArgType in genericArgs) {
sb.Append(TypeToString(genericArgType, useLuaTypes: false));
sb.Append(",");
}
// Remove the last separator
sb.Length--;
sb.Append(">");
return Namespaced(sb.ToString());
}
return Namespaced(type.Name);
}
return Impl(type.Namespace);
}
static (bool Success, string Output, string Error) TryRunGitCommand(string args) {
static string? GetGitBinary() {
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
return Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process)
?.Split(';')
.Select(x => Path.Join(x, "git.exe"))
.FirstOrDefault(File.Exists);
} else {
return Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process)
?.Split(':')
.Select(x => Path.Join(x, "git"))
.FirstOrDefault(File.Exists);
}
}
var gitBinary = GetGitBinary();
if (gitBinary == null) {
throw new InvalidOperationException("Failed to find git binary in PATH");
}
using var process = Process.Start(new ProcessStartInfo(gitBinary, args) {
WindowStyle = ProcessWindowStyle.Hidden,
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardInput = true,
RedirectStandardError = true,
RedirectStandardOutput = true,
});
if (process == null)
throw new InvalidOperationException($"Failed to run git command: {args}");
process.Start();
var stdOut = process.StandardOutput.ReadToEndAsync();
var stdErr = process.StandardError.ReadToEndAsync();
Task.WhenAll(stdOut, stdErr).GetAwaiter().GetResult();
process.WaitForExit();
return (process.ExitCode == 0, stdOut.Result.TrimEnd('\r', '\n'), stdErr.Result);
}
var gitDir = (new Func<String>(() => {
var (success, gitDir, error) = TryRunGitCommand("rev-parse --show-toplevel");
if (!success) {
throw new InvalidDataException($"Failed to determine the root of the git repo: {error}");
}
return gitDir;
}))();
void GenerateDocsImpl(Type type, string baseFile, string outFile, string? categoryName = null) {
categoryName ??= type.Name;
var sb = new StringBuilder();
Console.WriteLine($"Generating docs for {type}");
string baseLuaText;
try {
baseLuaText = File.ReadAllText(baseFile);
} catch (FileNotFoundException) {
baseLuaText = @$"-- luacheck: ignore 111
--[[--
{type.FullName}
]]
-- @code {categoryName}
-- @pragma nostrip
local {type.Name} = {{}}".ReplaceLineEndings("\n");
File.WriteAllText(baseFile, baseLuaText);
}
var removeTagPattern = new Regex("^-- @remove (.*)$", RegexOptions.Multiline);
var removed = new HashSet<string>();
var matches = removeTagPattern.Matches(baseLuaText);
foreach (var match in matches.Cast<Match>()) {
removed.Add(match.Value);
}
sb.Append(baseLuaText);
sb.AppendLine();
sb.AppendLine();
var members = type.GetMembers(BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance);
foreach (var member in members) {
static string EscapeName(string n) {
return n switch {
"end" => "endparam",
_ => n
};
}
switch (member.MemberType) {
case MemberTypes.Method: {
var method = (MethodInfo)member;
// Exclude property getters/setters
if (method.IsSpecialName) {
continue;
}
var paramNames = new StringBuilder();
foreach (var parameter in method.GetParameters()) {
paramNames.Append(EscapeName(parameter.Name!));
paramNames.Append(", ");
}
if (paramNames.Length > 0) {
// Remove the last separator
paramNames.Length -= 2;
}
string functionDecoration;
if (method.IsStatic) {
functionDecoration = $"function {type.Name}.{method.Name}({paramNames}) end";
} else {
functionDecoration = $"function {method.Name}({paramNames}) end";
}
if (removed.Contains(functionDecoration)) {
continue;
}
Console.WriteLine($" - METHOD: {method}");
sb.AppendLine($"--- {method.Name}");
sb.AppendLine("-- @realm shared");
foreach (var parameter in method.GetParameters()) {
sb.AppendLine($"-- @tparam {TypeToString(parameter.ParameterType)} {EscapeName(parameter.Name!)}");
}
if (method.ReturnType != typeof(void)) {
sb.AppendLine($"-- @treturn {TypeToString(method.ReturnType)}");
}
sb.AppendLine(functionDecoration);
sb.AppendLine();
break;
}
case MemberTypes.Field: {
var field = (FieldInfo)member;
var name = EscapeName(field.Name);
var returnName = TypeToString(field.FieldType);
if (field.IsStatic) {
name = type.Name + "." + field.Name;
}
if (removed.Contains(name)) {
continue;
}
Console.WriteLine($" - FIELD: {name}");
sb.AppendLine("---");
sb.Append("-- ");
sb.Append(name);
sb.AppendLine($", field of type {returnName}");
sb.AppendLine("-- @realm shared");
sb.AppendLine($"-- @field {name}");
sb.AppendLine();
break;
}
case MemberTypes.Property: {
var property = (PropertyInfo)member;
var name = EscapeName(property.Name);
var returnName = TypeToString(property.PropertyType);
if (property.GetGetMethod()?.IsStatic == true || property.GetSetMethod()?.IsStatic == true) {
name = type.Name + "." + property.Name;
}
if (removed.Contains(name)) {
continue;
}
Console.WriteLine($" - PROPERTY: {name}");
sb.AppendLine("---");
sb.Append("-- ");
sb.Append(name);
sb.AppendLine($", field of type {returnName}");
sb.AppendLine("-- @realm shared");
sb.AppendLine($"-- @field {name}");
sb.AppendLine();
break;
}
}
}
new FileInfo(outFile).Directory.Create();
File.WriteAllText(outFile, sb.ToString());
}
var basePath = $"{gitDir}/luacs-docs/lua";
var generatedDir = $"{basePath}/lua/generated";
var baseLuaDir = $"{basePath}/baseluadocs";
void GenerateDocs(Type type, string file, string? categoryName = null) {
GenerateDocsImpl(type, $"{baseLuaDir}/{file}", $"{generatedDir}/{file}", categoryName);
}
try {
Directory.Delete(generatedDir, true);
} catch (DirectoryNotFoundException) { }
Directory.CreateDirectory(generatedDir);
Directory.CreateDirectory(baseLuaDir);
GenerateDocs(typeof(Character), "Character.lua");
GenerateDocs(typeof(CharacterInfo), "CharacterInfo.lua");
GenerateDocs(typeof(CharacterHealth), "CharacterHealth.lua");
GenerateDocs(typeof(AnimController), "AnimController.lua");
GenerateDocs(typeof(Client), "Client.lua");
GenerateDocs(typeof(Entity), "Entity.lua");
GenerateDocs(typeof(EntitySpawner), "Entity.Spawner.lua", "Entity.Spawner");
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");
GenerateDocs(typeof(NetLobbyScreen), "NetLobbyScreen.lua", "Game.NetLobbyScreen");
GenerateDocs(typeof(GameScreen), "GameScreen.lua", "Game.GameScreen");
GenerateDocs(typeof(FarseerPhysics.Dynamics.World), "World.lua", "Game.World");
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");
GenerateDocs(typeof(WayPoint), "WayPoint.lua", "WayPoint");
GenerateDocs(typeof(ServerSettings), "ServerSettings.lua", "Game.ServerSettings");
GenerateDocs(typeof(GameSettings), "GameSettings.lua", "Game.Settings");

View File

@@ -0,0 +1,15 @@
Import-Module $PSScriptRoot/../../scripts/location.ps1
try {
Change-Location $PSScriptRoot/LuaDocsGenerator
if ((Get-Command "dotnet" -ErrorAction SilentlyContinue) -eq $null) {
echo "dotnet not found"
exit 1
}
dotnet build -clp:"ErrorsOnly;Summary"
dotnet run --no-build
} finally {
Restore-Location
}

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
cd "$DIR/LuaDocsGenerator"
if ! command -v "dotnet" &> /dev/null; then
if [[ -z "dotnet" ]]; then
echo "dotnet not found"
fi
exit 1
fi
dotnet build -clp:"ErrorsOnly;Summary"
dotnet run --no-build