Move docs to luacs-docs/{lua,cs,landing-page}

luacs-docs/cs also has a proper http server for testing locally
This commit is contained in:
peelz
2022-08-03 21:34:42 -04:00
parent 53ea2b8973
commit 1bb7843811
136 changed files with 2208 additions and 2113 deletions
+2
View File
@@ -0,0 +1,2 @@
build
lua_modules
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.Affliction
]]
-- @code Affliction
-- @pragma nostrip
local Affliction = {}
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.AfflictionPrefab
]]
-- @code AfflictionPrefab
-- @pragma nostrip
local AfflictionPrefab = {}
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.AnimController
]]
-- @code AnimController
-- @pragma nostrip
local AnimController = {}
+44
View File
@@ -0,0 +1,44 @@
-- luacheck: ignore 111
--[[--
Barotrauma Character class with some additional functions and fields
Barotrauma source code: [Character.cs](https://github.com/evilfactory/Barotrauma-lua-attempt/blob/master/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs)
]]
-- @code Character
-- @pragma nostrip
local Character = {}
-- @remove function Character.Create(characterInfo, position, seed, id, isRemotePlayer, hasAi, ragdoll) end
-- @remove function TeleportTo(worldPos) end
-- @remove Character.CharacterList
--- Creates a Character using CharacterInfo.
-- @realm server
-- @tparam CharacterInfo characterInfo
-- @tparam Vector2 position
-- @tparam string seed
-- @tparam number id
-- @tparam bool isRemotePlayer
-- @tparam bool hasAi
-- @tparam RagdollParams ragdoll
-- @treturn Character
-- @usage
-- local vsauce = CharacterInfo("human", "custom name")
-- local character = Character.Create(vsauce, Vector2(0, 0), "some random characters")
-- print(character)
function Character.Create(characterInfo, position, seed, id, isRemotePlayer, hasAi, ragdoll) end
--- Teleports a character to a position.
-- @realm server
-- @tparam Vector2 position
-- @usage
-- Character.CharacterList[1].TeleportTo(Vector2(0, 0)) -- teleports first created characters to 0, 0
function TeleportTo(worldPos) end
---
-- Character.CharacterList, Table containing all characters.
-- @realm shared
-- @table Character.CharacterList
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.CharacterHealth
]]
-- @code CharacterHealth
-- @pragma nostrip
local CharacterHealth = {}
@@ -0,0 +1,11 @@
-- 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 = {}
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.CharacterInventory
]]
-- @code CharacterInventory
-- @pragma nostrip
local CharacterInventory = {}
+37
View File
@@ -0,0 +1,37 @@
-- 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
@@ -0,0 +1,9 @@
-- 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
+9
View File
@@ -0,0 +1,9 @@
-- 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
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.GameScreen
]]
-- @code Game.GameScreen
-- @pragma nostrip
local GameScreen = {}
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.GameSession
]]
-- @code Game.GameSession
-- @pragma nostrip
local GameSession = {}
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.GameSettings
]]
-- @code Game.Settings
-- @pragma nostrip
local GameSettings = {}
+8
View File
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.Hull
]]
-- @code Hull
-- @pragma nostrip
local Hull = {}
+8
View File
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.Inventory
]]
-- @code Inventory
-- @pragma nostrip
local Inventory = {}
+46
View File
@@ -0,0 +1,46 @@
-- luacheck: ignore 111
--[[--
Barotrauma Item class with some additional functions and fields
Barotrauma source code: [Item.cs](https://github.com/evilfactory/Barotrauma-lua-attempt/blob/master/Barotrauma/BarotraumaShared/SharedSource/Items/Item.cs)
]]
-- @code Item
-- @pragma nostrip
Item = {}
--- Adds to remove queue, use this instead of Remove, to prevent desync.
-- @realm server
function Item.AddToRemoveQueue(item) end
--- Gets a component from an item by a string name.
-- @treturn Component component
-- @realm server
function GetComponentString(componentName) end
--- Sends a signal.
-- @realm server
function SendSignal(signalOrString, connectionOrConnectionName) end
---
-- Physics body of the item.
-- @realm shared
-- @PhysicsBody body
-- @usage
-- Item.ItemList[1].body.position = CreateVector2(0, 0) -- teleports first item created to 0, 0 of the level
---
-- Item.ItemList, Table containing all items.
-- @realm shared
-- @Item Item.ItemList
---
-- Prefab, ItemPrefab containing the original prefab of the item.
-- @realm shared
-- @ItemPrefab Prefab
---
-- WorldPosition, Vector2 position of the item in the world
-- @realm shared
-- @Vector2 WorldPosition
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.ItemInventory
]]
-- @code ItemInventory
-- @pragma nostrip
local ItemInventory = {}
+36
View File
@@ -0,0 +1,36 @@
-- 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
+11
View File
@@ -0,0 +1,11 @@
-- 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 = {}
+11
View File
@@ -0,0 +1,11 @@
-- 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 = {}
+8
View File
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.Level
]]
-- @code Level
-- @pragma nostrip
local Level = {}
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.NetLobbyScreen
]]
-- @code Game.NetLobbyScreen
-- @pragma nostrip
local NetLobbyScreen = {}
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.Networking.ServerSettings
]]
-- @code Game.ServerSettings
-- @pragma nostrip
local ServerSettings = {}
+13
View File
@@ -0,0 +1,13 @@
-- 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 = {}
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.SubmarineInfo
]]
-- @code SubmarineInfo
-- @pragma nostrip
local SubmarineInfo = {}
+8
View File
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.WayPoint
]]
-- @code WayPoint
-- @pragma nostrip
local WayPoint = {}
+8
View File
@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
FarseerPhysics.Dynamics.World
]]
-- @code Game.World
-- @pragma nostrip
local World = {}
+80
View File
@@ -0,0 +1,80 @@
-- vim:ft=lua
file = {
"lua"
}
module_file = {}
dir = "build"
project = "LuaForBarotrauma"
title = "LuaForBarotrauma Documentation"
no_space_before_args = true
style = "css"
template = "templates"
format = "markdown"
ignore = true
topics = "manual"
use_markdown_titles = true
kind_names = {
topic = "Manual",
module = "Classes"
}
merge = true
sort = true
sort_modules = true
simple_args_string = true -- we show optionals/defaults outside of the display name
strip_metamethod_prefix = true -- remove the name of the table when displaying metamethod names
no_viewed_topic_at_top = true -- don't put the currently viewed topic at the top
use_new_templates = true -- new templating system
pretty_urls = true -- avoid showing .html in urls
pretty_topic_names = true -- strips extension from manual filenames, this does not check filename collisions
custom_tags = {
{"realm", hidden = true},
{"deprecated", hidden = true},
{"internal", hidden = true}
}
custom_display_name_handler = function(item, default_handler)
if (item.type == "function" and item.module) then
if (item.module.type == "classmod" or item.module.type == "panel") then
return item.module.mod_name .. ":" .. default_handler(item)
elseif (item.module.type == "hooks") then
return item.module.mod_name:upper() .. ":" .. default_handler(item)
end
end
return default_handler(item)
end
new_type("code", "Code", true)
new_type("enum", "Enum", true)
tparam_alias("Client", "client")
tparam_alias("Character", "character")
tparam_alias("Submarine", "submarine")
tparam_alias("Item", "item")
tparam_alias("ItemPrefab", "ItemPrefab")
tparam_alias("Vector2", "Vector2")
tparam_alias("Vector3", "Vector3")
tparam_alias("Vector4", "Vector4")
tparam_alias("CauseOfDeath", "CauseOfDeath")
tparam_alias("PhysicsBody", "PhysicsBody")
tparam_alias("JobPrefab", "JobPrefab")
tparam_alias("Job", "Job")
tparam_alias("Inventory", "Inventory")
tparam_alias("CharacterInventory", "CharacterInventory")
tparam_alias("ItemInventory", "ItemInventory")
tparam_alias("Camera", "Camera")
tparam_alias("Enumerable", "Enumerable")
tparam_alias("Identifier", "Identifier")
tparam_alias("CharacterHealth", "CharacterHealth")
tparam_alias("string", "string")
tparam_alias("bool", "boolean")
tparam_alias("function", "function")
tparam_alias("tab", "table")
+81
View File
@@ -0,0 +1,81 @@
/* Dracula Theme v1.2.5
*
* https://github.com/dracula/highlightjs
*
* Copyright 2016-present, All rights reserved
*
* Code licensed under the MIT license
*
* @author Denis Ciccale <dciccale@gmail.com>
* @author Zeno Rocha <hi@zenorocha.com>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #282a36;
}
.hljs-built_in,
.hljs-selector-tag,
.hljs-section,
.hljs-link {
color: #8be9fd;
}
.hljs-keyword {
color: #ff79c6;
}
.hljs,
.hljs-subst {
color: #f8f8f2;
}
.hljs-title,
.hljs-attr,
.hljs-meta-keyword {
font-style: italic;
color: #50fa7b;
}
.hljs-string,
.hljs-meta,
.hljs-name,
.hljs-type,
.hljs-symbol,
.hljs-bullet,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
color: #f1fa8c;
}
.hljs-comment,
.hljs-quote,
.hljs-deletion {
color: #6272a4;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-title,
.hljs-section,
.hljs-doctag,
.hljs-type,
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-literal,
.hljs-number {
color: #bd93f9;
}
.hljs-emphasis {
font-style: italic;
}
+543
View File
@@ -0,0 +1,543 @@
:root {
--content-width: 100%;
--sidebar-width: 25%;
--padding-big: 48px;
--padding-normal: 24px;
--padding-small: 16px;
--padding-tiny: 10px;
--font-massive: 32px;
--font-huge: 24px;
--font-big: 18px;
--font-normal: 16px;
--font-tiny: 12px;
--font-style-normal: Segoe UI, Helvetica, Arial, sans-serif;
--font-style-code: Consolas, monospace;
--color-accent: rgb(47, 100, 74);
--color-accent-dark: rgb(33, 33, 33);
--color-white: rgb(255, 255, 255);
--color-offwhite: rgb(200, 200, 200);
--color-white-accent: rgb(203, 190, 209);
--color-black: rgb(0, 0, 0);
--color-lightgrey: rgb(160, 160, 160);
--color-background-light: rgb(245, 245, 245);
--color-background-dark: rgb(33, 33, 33);
--color-background-dark-ish: rgb(44, 44, 44);
--color-outline: rgb(149, 34, 160);
--color-good: #5190ff;
}
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
background-color: var(--color-background-dark);
font-family: var(--font-style-normal);
display: flex;
flex-direction: column;
}
a {
color: inherit;
text-decoration: inherit;
}
h1, h2, h3, h4 {
font-weight: 400;
}
ul li {
margin-left: var(--padding-small);
}
/* landing */
.landing {
background-color: var(--color-accent);
color: var(--color-white);
padding: 128px 0 128px 0;
}
.landing h1 {
margin: 0;
padding: 0;
border: none;
font-weight: 100;
font-size: var(--font-massive);
text-align: center;
}
.wrapper {
padding: var(--padding-small);
}
details {
user-select: none;
}
details summary {
outline: none;
}
code {
font-family: "Source Code Pro", monospace;
font-size: 85%;
white-space: pre;
tab-size: 4;
-moz-tab-size: 4;
padding: 1px 4px;
background-color: #282a36;
outline-style: solid;
outline-color: black;
outline-width: 2px;
}
pre {
background-color: rgb(0, 0, 0, 1);
margin-top: var(--padding-small);
padding: 2px;
overflow: auto;
}
pre code {
background-color: transparent;
}
span.realm {
width: 14px;
height: 14px;
border-radius: 3px;
display: inline-block;
margin-right: 5px;
}
span.realm.shared {
background: linear-gradient(45deg, #f80 0%, #f80 50%, #08f 51%, #08f 100%);
}
span.realm.client {
background-color: #f80;
}
span.realm.server {
background-color: #08f;
}
.colorful-label {
color: rgb(31, 141, 155);
}
/* wrapper element for sidebar/content */
main {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: flex-start;
width: var(--content-width);
margin: auto;
}
/* sidebar */
nav {
color: var(--color-offwhite);
background-color: var(--color-background-dark);
position: fixed;
display: flex;
flex-direction: column;
width: var(--sidebar-width);
height: 100%;
}
/* sidebar header */
nav header {
color: var(--color-white);
background-color: var(--color-accent);
padding: var(--padding-small);
}
nav header h1 {
font-size: var(--font-huge);
font-weight: 100;
text-align: center;
margin-bottom: var(--padding-small);
}
#search {
background-color: var(--color-accent-dark);
color: var(--color-white);
border: none;
font-size: var(--font-normal);
outline: none;
width: 100%;
padding: 6px;
}
#search::placeholder {
color: var(--color-white-accent);
}
#search::-webkit-search-cancel-button {
display: none;
}
/* sidebar contents */
nav section {
padding: var(--padding-small);
overflow: auto;
}
nav section ul {
list-style-type: none;
}
nav section::-webkit-scrollbar,
pre::-webkit-scrollbar {
width: 8px;
height: 8px;
}
nav section::-webkit-scrollbar-track,
pre::-webkit-scrollbar-track {
background: transparent;
}
nav section::-webkit-scrollbar-thumb {
background-color: var(--color-lightgrey);
}
pre::-webkit-scrollbar-thumb {
background-color: var(--color-lightgrey);
}
/* sidebar contents category */
nav section details.category {
padding-top: var(--padding-tiny);
}
nav section details.category > ul > li {
margin: 0;
line-height: 1.5;
}
nav section details.category > ul > li a {
display: inline-block;
width: 90%;
}
nav section details.category:first-of-type {
padding-top: calc(var(--padding-tiny) * -1);
}
nav section details.category summary::-webkit-details-marker {
opacity: 0.5;
cursor: pointer;
}
nav section details.category summary h2 {
color: var(--color-accent);
font-size: var(--font-big);
letter-spacing: 2px;
text-transform: uppercase;
cursor: pointer;
padding-bottom: var(--padding-tiny);
}
/* content */
article {
background-color: var(--color-background-dark-ish);
color: white;
width: calc(100% - var(--sidebar-width));
min-height: 100vh;
margin-left: var(--sidebar-width);
}
article .wrapper > *:first-child {
margin-top: 0;
}
/* header */
article header {
color: rgb(255, 255, 255);
background-color: var(--color-accent);
padding: var(--padding-tiny);
}
article header h1 {
border-bottom: 1px solid rgba(255, 255, 255, 0.25);
padding-bottom: 8px;
font-family: var(--font-style-code);
margin: 0;
}
article header h2 {
padding-top: var(--padding-tiny);
margin: 0;
font-size: var(--font-normal);
font-weight: normal;
}
article header.module a {
color: white !important;
text-decoration: underline;
}
details.category > summary {
list-style: none;
}
details.category > summary::-webkit-details-marker {
display: none;
}
article h1 {
font-size: 28px;
font-weight: 600;
border-bottom: 1px solid rgba(0, 0, 0, 0.25);
margin-top: 24px;
margin-bottom: 16px;
padding-bottom: 8px;
}
article h2 {
font-size: 20px;
font-weight: 600;
margin-top: 12px;
}
article h3 {
color: var(--color-good);
margin-top: var(--padding-tiny);
text-transform: uppercase;
}
article p {
margin-top: var(--padding-small);
}
article p a,
article ul li a,
article h1 a,
article h2 a {
color: var(--color-good);
font-weight: 600;
}
article h1.title {
color: rgb(255, 255, 255);
background-color: var(--color-accent);
margin-top: var(--padding-small);
margin-bottom: 0;
padding: var(--padding-tiny);
font-size: var(--font-big);
font-weight: 100;
letter-spacing: 2px;
text-transform: uppercase;
}
a.reference {
color: var(--color-good);
float: right;
margin-top: 8px;
padding-left: 8px;
font-size: 14px;
font-weight: 600;
}
.notice {
--color-notice-background: var(--color-accent);
--color-notice-text: var(--color-notice-background);
margin-top: var(--padding-tiny);
border: 2px solid var(--color-notice-background);
}
.notice.error {
--color-notice-background: rgb(194, 52, 130);
}
.notice.warning {
--color-notice-background: rgb(224, 169, 112);
--color-notice-text: rgb(167, 104, 37);
}
.notice .title {
color: var(--color-white);
background-color: var(--color-notice-background);
padding: var(--padding-tiny);
font-size: var(--font-normal);
text-transform: uppercase;
letter-spacing: 2px;
}
.notice p {
color: var(--color-notice-text);
margin: 0 !important;
padding: var(--padding-tiny);
}
/* function/table */
.method {
display: flex;
flex-flow: column;
padding: var(--padding-tiny);
margin-top: var(--padding-small);
}
.method header {
color: white;
background-color: inherit;
padding: 0;
order: -1;
}
.method header .anchor {
color: inherit;
text-decoration: inherit;
}
.method:target {
background-color: var(--color-background-dark);
outline: solid;
outline-width: 1px;
outline-color: var(--color-accent);
}
.method header:target {
background-color: var(--color-accent);
}
.method header h1 {
font-family: "Source Code Pro", monospace;
padding-bottom: var(--padding-tiny);
border-bottom: 1px solid var(--color-accent);
font-size: 20px;
}
.method header p:first-of-type {
margin-top: var(--padding-tiny);
}
.method h3 {
color: var(--color-good);
font-size: var(--font-normal);
letter-spacing: 2px;
text-transform: uppercase;
}
.method pre {
margin-top: var(--padding-tiny);
}
@media only screen and (max-width: 1100px) {
main nav {
position: inherit;
}
main article {
margin-left: 0;
}
}
.method ul {
margin-top: var(--padding-tiny);
background-color: inherit;
}
.method ul li {
list-style: none;
margin: 4px 0 0 var(--padding-normal);
}
.method ul li:first-of-type {
margin-top: 0;
}
.method ul li p {
margin: 4px 0 0 var(--padding-normal);
}
.method ul li pre {
margin: 4px 0 0 var(--padding-normal);
}
.method ul li a {
color: rgb(115, 53, 142);
font-weight: 600;
}
/* we have to manually specify these instead of making a shared class since you cannot customize the parameter class in ldoc */
.parameter, .type, .default {
display: inline-block;
color: rgb(255, 255, 255) !important;
padding: 4px;
font-size: 14px;
font-family: "Source Code Pro", monospace;
}
.parameter {
background-color: rgb(115, 53, 142);
}
.type {
background-color: rgb(31, 141, 155);
}
a.type {
font-weight: 300 !important;
text-decoration: underline;
}
.default {
background-color: rgb(193, 114, 11);
}
.type a {
padding: 0;
}
.or {
color: rgba(115, 53, 142, 0.5);
background-color: inherit;
width: calc(100% - 32px);
height: 8px;
margin: 0 0 8px 32px;
text-align: center;
font-weight: 600;
border-bottom: 1px solid rgba(115, 53, 142, 0.5);
}
.or span {
background-color: inherit;
padding: 0 8px 0 8px;
}
.strikethrough {
text-decoration: line-through;
}
+138
View File
@@ -0,0 +1,138 @@
const skippedCategories = ["manual"];
class Node {
constructor(name, element, expandable, noAutoCollapse, children = []) {
this.name = name;
this.element = element;
this.expandable = expandable;
this.noAutoCollapse = noAutoCollapse;
this.children = children;
}
AddChild(name, element, expandable, noAutoCollapse, children) {
let newNode = new Node(name, element, expandable, noAutoCollapse, children);
this.children.push(newNode);
return newNode;
}
}
class SearchManager {
constructor(input, contents) {
this.input = input;
this.input.addEventListener("input", event => {
this.OnInputUpdated(this.input.value.toLowerCase().replace(/:/g, "."));
});
// setup search tree
this.tree = new Node("", document.createElement("null"), true, true);
this.entries = {};
const categoryElements = contents.querySelectorAll(".category");
// iterate each kind (hooks/libraries/classes/etc)
for (const category of categoryElements) {
const nameElement = category.querySelector(":scope > summary > h2");
if (!nameElement) {
continue;
}
const categoryName = nameElement.textContent.trim().toLowerCase();
if (skippedCategories.includes(categoryName)) {
continue;
}
let categoryNode = this.tree.AddChild(categoryName, category, true, true);
const sectionElements = category.querySelectorAll(":scope > ul > li");
for (const section of sectionElements) {
const entryElements = section.querySelectorAll(":scope > details > ul > li > a");
const sectionName = section.querySelector(":scope > details > summary > a")
.textContent
.trim()
.toLowerCase();
let sectionNode = categoryNode.AddChild(sectionName, section.querySelector(":scope > details"), true);
for (let i = 0; i < entryElements.length; i++) {
const entryElement = entryElements[i];
const entryName = entryElement.textContent.trim().toLowerCase();
sectionNode.AddChild(sectionName + "." + entryName, entryElement.parentElement);
}
}
}
}
ResetVisibility(current) {
current.element.style.display = "";
if (current.noAutoCollapse) {
current.element.open = true;
}
else if (current.expandable) {
current.element.open = false;
}
for (let node of current.children) {
this.ResetVisibility(node);
}
}
Search(input, current) {
let matched = false;
if (current.name.indexOf(input) != -1) {
matched = true;
}
for (let node of current.children) {
let childMatched = this.Search(input, node);
matched = matched || childMatched;
}
if (matched) {
current.element.style.display = "";
if (current.expandable) {
current.element.open = true;
}
} else {
current.element.style.display = "none";
if (current.expandable) {
current.element.open = false;
}
}
return matched;
}
OnInputUpdated(input) {
if (input.length <= 1) {
this.ResetVisibility(this.tree);
return;
}
this.Search(input, this.tree);
}
}
window.onload = function() {
const openDetails = document.querySelector(".category > ul > li > details[open]");
if (openDetails) {
openDetails.scrollIntoView();
}
}
document.addEventListener("DOMContentLoaded", function() {
const searchInput = document.getElementById("search");
const contents = document.querySelector("body > main > nav > section");
if (searchInput && contents) {
new SearchManager(searchInput, contents);
}
});
File diff suppressed because one or more lines are too long
+43
View File
@@ -0,0 +1,43 @@
-- luacheck: ignore 111
--[[--
Class providing filesystem functionality.
]]
-- @code File
-- @pragma nostrip
File = {}
--- Read contents from path
-- @treturn string file contents
-- @realm shared
function File.Read(path) end
--- Write text to file
-- @realm shared
function File.Write(path, text) end
--- Check if file exists.
-- @treturn bool
-- @realm shared
function File.Exists(path) end
--- Check if directory exists.
-- @treturn bool
-- @realm shared
function File.DirectoryExists(path) end
--- Check if directory exists.
-- @treturn table table containing all files
-- @realm shared
function File.GetFiles(path) end
--- List all directories.
-- @treturn table table containing all directories
-- @realm shared
function File.GetDirectories(path) end
--- Search directory for all files including sub directories.
-- @treturn table table containing all files
-- @realm shared
function File.DirSearch(path) end
+115
View File
@@ -0,0 +1,115 @@
-- luacheck: ignore 111
--[[--
Class providing game related things, Access fields and functions like that: Game.*
]]
-- @code Game
-- @pragma nostrip
local Game = {}
--- Is the round started?
-- @realm shared
Game.RoundStarted = true
--- Is dedicated server?
-- @realm server
Game.IsDedicated = true
--- Server settings.
-- @realm server
Game.ServerSettings = true
--- Server settings.
-- @realm server
Game.Settings = true
--- ChatBox.
-- @realm ChatBox
Game.ChatBox = true
--- Send chat message to every client.
-- @realm server
function Game.SendMessage(msg, messageType, sender, character) end
--- Send traitor message.
-- @realm server
function Game.SendTraitorMessage(client, msg, missionid, type) end
--- Send direct message.
-- @realm server
function Game.SendDirectChatMessage(sendername, text, senderCharacter, chatMessageType, client, iconStyle) end
--- Send direct message.
-- @realm server
function Game.SendDirectChatMessage(chatMessage, client) end
--- True to override traitors.
-- @realm server
function Game.OverrideTraitors(override) end
--- True to override respawn sub, stops players from being respawned.
-- @realm server
function Game.OverrideRespawnSub(override) end
--- True to make wifi chat always work.
-- @realm server
function Game.AllowWifiChat(override) end
--- True to prevent headsets from transmitting wifi signals.
-- @realm server
function Game.OverrideSignalRadio(override) end
--- True to disable spam filter.
-- @realm server
function Game.DisableSpamFilter(override) end
--- True to disable character disconnect logic, aka stop character from being automatically stunned and killed.
-- @realm server
function Game.DisableDisconnectCharacter(override) end
--- True to allow husks to carry control to players.
-- @realm server
function Game.EnableControlHusk(override) end
--- Log message to server logs.
-- @realm server
function Game.Log(message, ServerLogMessageType) end
--- Spawn explosion.
-- @realm shared
function Game.Explode(pos, range, force, damage, structureDamage, itemDamage, empStrength, ballastFloraStrength) end
--- Get respawn sub submarine.
--@treturn Submarine Respawn Shuttle
-- @realm shared
function Game.GetRespawnSub() end
--- Dispatch respawn sub.
-- @realm server
function Game.DispatchRespawnSub() end
--- Execute console command.
-- @realm shared
function Game.ExecuteCommand(command) end
--- Starts the game.
-- @realm server
function Game.StartGame() end
--- Ends the game.
-- @realm server
function Game.EndGame() end
--- Adds a new command, onExecute is called with a table of strings.
-- @realm shared
function Game.AddCommand(name, help, onExecute, getValidArgs, isCheat) end
--- Assigns a command for server on execute, onExecute is called with a table of strings.
-- @realm shared
function Game.AssignOnExecute(names, onExecute) end
--- Assigns a command for client on execute, onExecute is called with a client, mouse position and a table of strings.
-- @realm server
function Game.AssignOnClientRequestExecute(names, onExecute) end
+251
View File
@@ -0,0 +1,251 @@
-- luacheck: ignore 111
--[[--
Hooks are basically functions that get called when events happen in-game, like chat messages.
]]
-- @code Hook
-- @pragma nostrip
local Hook = {}
--- Adds a hook.
-- @tparam string eventname event name
-- @tparam string hookname hook name
-- @tparam function func callback
-- @realm shared
-- @usage
-- Hook.Add("characterDeath", "characterDeathExample", function(character)
-- print(character)
-- end)
function Hook.Add(eventName, hookName, func) end
--- Removes a hook.
-- @tparam string eventname event name
-- @tparam string hookname hook name
-- @realm shared
-- @usage
-- Hook.Remove("character.death", "characterDeathExample")
function Hook.Remove(eventName, hookName) end
--- Calls a hook.
-- @tparam string eventname event name
-- @tparam table parameters parameters to be passed in
-- @realm shared
-- @usage
-- Hook.Add("think", "happyDebuggingSuckers", function()
-- Hook.Call("character.death", {}) -- ruin someone's day
-- end)
function Hook.Call(eventName, parameters) end
--- Patches a method, the callback is called with an instance variable and a ptable variable, ptable contains dictionary of parameter name -> parameter
-- @tparam string className
-- @tparam string methodName
-- @tparam function callback
-- @realm shared
-- @deprecated
-- @usage
-- Hook.HookMethod("Barotrauma.CharacterInfo", "IncreaseSkillLevel", function (instance, ptable)
-- print(string.format("%s gained % xp", instance.Character.Name, ptable.increase))
-- end, Hook.HookMethodType.After)
function Hook.HookMethod(className, methodName, callback) end
--- Game's fixed update rate, gets called normally 60 times a second.
-- @realm shared
function think() end
--- Gets called everytime someone sends a chat message, return true to cancel message
-- @tparam string message
-- @tparam client sender
-- @realm shared
function chatMessage(message, sender) end
--- Called when a client connects
-- @tparam client connectedClient
-- @realm shared
function client.connected(connectedClient) end
--- Called when a client disconnects
-- @tparam client disconnectedClient
-- @realm shared
function client.disconnected(disconnectedClient) end
--- Called on round start
-- @realm shared
function roundStart() end
--- Called on round end
-- @realm shared
function roundEnd() end
--- Gets called everytime a character is created.
-- @tparam character createdCharacter
-- @realm shared
function character.created(createdCharacter) end
--- Gets called after the character is given the job items, useful if your script only wants to check for newly created characters in campaign gamemode.
-- @tparam character character
-- @tparam WayPoint waypoint
-- @realm shared
function character.giveJobItems(character, waypoint) end
--- Gets called everytime a Character dies.
-- @tparam Character character A dead Character.
-- @realm shared
-- @usage
-- Hook.Add("character.death", "characterDeathExample", function(character)
-- print(character)
-- end)
function character.death(character) end
--- Gets called every time an affliction is applied to a character.
-- @realm shared
function character.applyAffliction(character, limbHealth, newAffliction, allowStacking) end
--- Gets gets called every time an attack damage.
-- @realm shared
function character.applyDamage(character, attackResult, hitLimb, allowStacking) end
--- Gets called every time an affliction updates.
-- @realm shared
function afflictionUpdate(affliction, characterHealth, limb) end
--- Gets called every time an Item gets "Used".
-- @realm shared
function item.use(item, itemUser, targetLimb) end
--- Same as itemUse.
-- @realm shared
function item.secondaryUse(item, itemUser) end
--- Gets called whenever an item is used as a treatment (eg. bandages).
-- @realm shared
function item.applyTreatment(item, usingCharacter, targetCharacter, limb) end
--- Gets called whenever an item is dropped, You can return true to cancel.
-- @realm shared
function item.drop(item, character) end
--- Gets called whenever an item is equipped. Return true to cancel.
-- @realm shared
function item.equip(item, character) end
--- Same as itemEquip, but for unequipping.
-- @realm shared
function item.unequip(item, character) end
--- Gets called every time an item is interacted, eg: picking item on ground, fixing something with wrench
-- @realm shared
function item.interact(item, characterPicker, ignoreRequiredItemsBool, forceSelectKeyBool, forceActionKeyBool) end
--- Gets called every time two items are combined, eg: drag an half empty magazine to another half empty magazine to combine
-- @realm shared
function item.combine(item, deconstructor, characterUser, allowRemove) end
--- Gets called every time an item is deconstructed. Return true to prevent item from being removed.
-- @realm shared
function item.deconstructed(item, otherItem, userCharacter) end
--- Gets called every time an item is created.
-- @realm shared
function item.created(item) end
--- Gets called every time an item is moved from one inventory slot to another, return true to cancel
-- @realm shared
function inventoryPutItem(inventory, item, characterUser, index, removeItemBool) end
--- Gets called every time items are swapped, return true to cancel
-- @realm shared
function inventoryItemSwap(inventory, item, characterUser, index, swapWholeStackBool) end
---
-- @realm shared
function changeFallDamage() end
--- Gets called every update when a gap passes oxygen
-- @realm shared
function gapOxygenUpdate(gap, hull1, hull2) end
--- Gets called everytime an Item receives a wire signal
-- @realm shared
function signalReceived(signal, connection) end
--- Gets called everytime the specified item receives a signal.
-- @realm shared
function signalReceived.YourItemIdentifier(signal, connection) end
--- Gets called everytime a WifiComponent starts transmitting a signal
-- @realm shared
function wifiSignalTransmitted(wifiComponent, signal, sentFromChat) end
--- Gets called everytime something is logged to the Server Log, do not call print() inside this function, i repeat, do not call print() inside this function.
-- @realm shared
function serverLog(text, serverLogMessageType) end
--- Called each time a new round start job has been assigned, this context allows for you to change the role before it's applied in game.
-- @realm shared
-- @usage
-- Hook.Add("jobsAssigned", "", function ()
-- for key, value in pairs(Client.ClientList) do
-- value.AssignedJob = JobVariant(JobPrefab.Get("assistant"), 0)
-- end
-- end)
function jobsAssigned() end
--- Check if a client is allowed to hear radio voice to another client, return true to allow, false to disallow.
-- @realm shared
function canUseVoiceRadio(sender, receiver) end
--- Changes the local voice range, return a number to change the local voice range, 1 = normal, 0.5 = lower range, 2 = higher range.
-- @realm shared
function changeLocalVoiceRange(sender, receiver) end
--- Called right before a message is going to be sent, return true to stop message from being sent.
-- @realm shared
function modifyChatMessage(chatMessage, wifiComponentSender) end
--- Called when the script execution is terminating.
-- @realm shared
function stop() end
---
-- @realm shared
function husk.clientControl(client, husk) end
---
-- @realm shared
function traitor.traitorAssigned(traitor) end
--- Return true to accept traitor candidate.
-- @realm shared
function traitor.findTraitorCandidate(character, team) end
--- Called when a melee weapon has impacted a physical object.
-- @realm shared
function meleeWeapon.handleImpact(meleeComponent, targetBody) end
--- Called when a status effect is applied to the specified item, useful for things like medical items. You can also return true to cancel out the status effect.
-- @realm shared
-- @usage
-- Hook.Add("statusEffect.apply.antibleeding1", "test", function (effect, deltaTime, item, targets, worldPosition)
-- if effect.type == ActionType.OnUse then
-- print(effect, ' ', item, ' ', targets[3])
-- return true
-- end
--end)
function statusEffect.apply.YourItemIdentifier(statusEffect, deltaTime, item, targets, worldPosition) end
--- Called when a client tries to change his name, return false to prevent the name from being changed.
-- @realm shared
function tryChangeClientName(client, newName, newJob, newTeam) end
--- Called after all mods are executed.
-- @realm shared
function loaded() end
--- Called after the CPR skill check succeeds.
-- @realm shared
function human.CPRSuccess(animController) end
--- Called after the CPR skill check fails.
-- @realm shared
function human.CPRFailed(animController) end
+55
View File
@@ -0,0 +1,55 @@
-- luacheck: ignore 111
--[[--
Class providing networking related tasks.
]]
-- @code Networking
-- @pragma nostrip
local Networking = {}
---
-- @realm server
Networking.FileSenderMaxPacketsPerUpdate = 4
---
-- @realm server
Networking.LastClientListUpdateID = 0
--- Send a post HTTP Request, callback is called with an argument result string.
-- @realm server
function Networking.HttpGet(url, callback, textData, contentType) end
--- Send a get HTTP Request, callback is called with an argument result string.
-- @realm server
function Networking.HttpPost(url, callback) end
--- Creates a new net message, returns an IWriteMessage
-- @treturn IWriteMessage netMessage
-- @realm shared
function Networking.Start(netMessageName) end
--- Sends a net message to the server.
-- @realm client
function Networking.Send(netMessage, deliveryMethod) end
--- Sends a net message to a connection, if the connection is null, then it sends the message to all connections
-- @realm server
function Networking.Send(netMessage, connection, deliveryMethod) end
--- Adds a function to listen for lua net messages
-- @realm shared
function Networking.Receive(netMessageName, callback) end
--- Writes again the lobby data of a client, useful for syncing submarine lists or other lobby options.
-- @realm server
function Networking.ClientWriteLobby(client) end
--- Creates an entity event.
-- @realm shared
function Networking.CreateEntityEvent(entity, extraData) end
--- Updates the client permissions, call this after you i've changed the permissions of a client, so they are notified about it.
-- @realm server
function Networking.UpdateClientPermissions(client) end
+46
View File
@@ -0,0 +1,46 @@
-- luacheck: ignore 111
--[[--
Barotrauma Signal struct with some additional functions and fields
Barotrauma source code: [Signal.cs](https://github.com/evilfactory/Barotrauma-lua-attempt/blob/master/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Signal/Signal.cs)
]]
-- @code Signal
-- @pragma nostrip
Signal = {}
--- Instantiates a new Signal.
-- @treturn Signal
-- @realm shared
function Signal(stringValue, stepsTaken, characterSender, itemSource, power, strength) end
---
-- value, String value of the signal.
-- @realm shared
-- @string value
---
-- stepsTaken = 1
-- @realm shared
-- @number stepsTaken
---
-- sender = nil
-- @realm shared
-- @Character sender
---
-- source = nil
-- @realm shared
-- @Item source
---
-- power = 0
-- @realm shared
-- @number power
---
-- strength = 1
-- @realm shared
-- @number strength
+35
View File
@@ -0,0 +1,35 @@
-- luacheck: ignore 111
--[[--
Provides steam integration.
]]
-- @code Steam
-- @pragma nostrip
local Steam = {}
--- Downloads an item from workshop and places it in a folder.
-- @tparam string itemID
-- @tparam string destinationFolder
-- @tparam function callback
-- @realm shared
-- @usage
-- Steam.DownloadWorkshopItem("2805065898", "LocalMods/MyMod/Temp/Download", function(workshopItem)
-- if workshopItem == nil then print("failed to download workshop item") return end
--
-- print(workshopItem.Title .. " has been successfully downloaded.")
-- end)
function Steam.DownloadWorkshopItem(id, destinationFolder, callback) end
--- Gets information about a workshop item.
-- @tparam string itemID
-- @tparam function callback
-- @realm shared
function Steam.GetWorkshopItem(id, callback) end
--- Callback is called with the list of all workshop items inside the specified collection.
-- @tparam string itemID
-- @tparam function callback
-- @realm shared
function Steam.GetWorkshopCollection(id, callback) end
+26
View File
@@ -0,0 +1,26 @@
-- luacheck: ignore 111
--[[--
Class providing timing related things.
]]
-- @code Timer
-- @pragma nostrip
Timer = {}
--- Get time in seconds.
-- @treturn number current time in seconds
-- @realm shared
function Timer.GetTime() end
--- Calls a function after a certain amount of time.
-- @realm shared
function Timer.Wait(func, milliseconds) end
--- Calls a function after a certain amount of time.
-- @realm shared
function Timer.GetUsageMemory() end
--- Same as GetTime()
-- @realm shared
Timer.Time = 0
+31
View File
@@ -0,0 +1,31 @@
-- luacheck: ignore 111
--[[--
Class providing vector functionality.
These are the XNA Vectors, you can find all the functions and fields here: <br>
<a href="https://docs.microsoft.com/en-us/previous-versions/windows/silverlight/dotnet-windows-silverlight/bb199660(v=xnagamestudio.35)">XNA Vector2</a> <br>
<a href="https://docs.microsoft.com/en-us/previous-versions/windows/silverlight/dotnet-windows-silverlight/bb199670(v=xnagamestudio.35)">XNA Vector3</a> <br>
<a href="https://docs.microsoft.com/en-us/previous-versions/windows/silverlight/dotnet-windows-silverlight/bb199679(v=xnagamestudio.35)">XNA Vector4</a> <br>
Access them via Vector2.\*, Vector3.\*, Vector4.\* <br>
]]
-- @code Vectors
local Vector2 = {}
local Vector3 = {}
local Vector4 = {}
--- Create Vector2
-- @treturn Vector2
-- @realm shared
function Vector2(X, Y) end
--- Create Vector3
-- @treturn Vector3
-- @realm shared
function Vector3(X, Y, Z) end
--- Create Vector4
-- @treturn Vector4
-- @realm shared
function Vector4(X, Y, Z, W) end
@@ -0,0 +1,39 @@
--[[--
CauseOfDeathType enum.
]]
-- @enum CauseOfDeathType
---
-- CauseOfDeathType.Unknown = 0
-- @realm shared
-- @number CauseOfDeathType.Unknown
---
-- CauseOfDeathType.Pressure = 1
-- @realm shared
-- @number CauseOfDeathType.Pressure
---
-- CauseOfDeathType.Suffocation = 2
-- @realm shared
-- @number CauseOfDeathType.Suffocation
---
-- CauseOfDeathType.Drowning = 3
-- @realm shared
-- @number CauseOfDeathType.Drowning
---
-- CauseOfDeathType.Drowning = 3
-- @realm shared
-- @number CauseOfDeathType.Drowning
---
-- CauseOfDeathType.Affliction = 4
-- @realm shared
-- @number CauseOfDeathType.Affliction
---
-- CauseOfDeathType.Disconnected = 5
-- @realm shared
-- @number CauseOfDeathType.Disconnected
@@ -0,0 +1,64 @@
--[[--
ChatMessageType enum.
]]
-- @enum ChatMessageType
---
-- ChatMessageType.Default = 0
-- @realm shared
-- @number ChatMessageType.Default
---
-- ChatMessageType.Error = 1
-- @realm shared
-- @number ChatMessageType.Error
---
-- ChatMessageType.Dead = 2
-- @realm shared
-- @number ChatMessageType.Dead
---
-- ChatMessageType.Server = 3
-- @realm shared
-- @number ChatMessageType.Server
---
-- ChatMessageType.Radio = 4
-- @realm shared
-- @number ChatMessageType.Radio
---
-- ChatMessageType.Private = 5
-- @realm shared
-- @number ChatMessageType.Private
---
-- ChatMessageType.Console = 6
-- @realm shared
-- @number ChatMessageType.Console
---
-- ChatMessageType.MessageBox = 7
-- @realm shared
-- @number ChatMessageType.MessageBox
---
-- ChatMessageType.Order = 8
-- @realm shared
-- @number ChatMessageType.Order
---
-- ChatMessageType.ServerLog = 9
-- @realm shared
-- @number ChatMessageType.ServerLog
---
-- ChatMessageType.ServerMessageBox = 10
-- @realm shared
-- @number ChatMessageType.ServerMessageBox
---
-- ChatMessageType.ServerMessageBoxInGame = 11
-- @realm shared
-- @number ChatMessageType.ServerMessageBoxInGame
@@ -0,0 +1,105 @@
--[[--
ClientPermissions enum.
]]
-- @enum ClientPermissions
---
-- ClientPermissions.None = 0x0
-- @realm shared
-- @number ClientPermissions.None
---
-- ClientPermissions.None = 0x0
-- @realm shared
-- @number ClientPermissions.None
---
-- ClientPermissions.ManageRound = 0x1
-- @realm shared
-- @number ClientPermissions.ManageRound
---
-- ClientPermissions.Kick = 0x2
-- @realm shared
-- @number ClientPermissions.Kick
---
-- ClientPermissions.Ban = 0x4
-- @realm shared
-- @number ClientPermissions.Ban
---
-- ClientPermissions.Unban = 0x8
-- @realm shared
-- @number ClientPermissions.Unban
---
-- ClientPermissions.SelectSub = 0x10
-- @realm shared
-- @number ClientPermissions.SelectSub
---
-- ClientPermissions.SelectMode = 0x20
-- @realm shared
-- @number ClientPermissions.SelectMode
---
-- ClientPermissions.ManageCampaign = 0x40
-- @realm shared
-- @number ClientPermissions.ManageCampaign
---
-- ClientPermissions.ConsoleCommands = 0x80
-- @realm shared
-- @number ClientPermissions.ConsoleCommands
---
-- ClientPermissions.ServerLog = 0x100
-- @realm shared
-- @number ClientPermissions.ServerLog
---
-- ClientPermissions.ManageSettings = 0x200
-- @realm shared
-- @number ClientPermissions.ManageSettings
---
-- ClientPermissions.ManagePermissions = 0x400
-- @realm shared
-- @number ClientPermissions.ManagePermissions
---
-- ClientPermissions.KarmaImmunity = 0x800
-- @realm shared
-- @number ClientPermissions.KarmaImmunity
---
-- ClientPermissions.ManageMoney = 0x1000
-- @realm shared
-- @number ClientPermissions.ManageMoney
---
-- ClientPermissions.SellInventoryItems = 0x2000
-- @realm shared
-- @number ClientPermissions.SellInventoryItems
---
-- ClientPermissions.SellSubItems = 0x4000
-- @realm shared
-- @number ClientPermissions.SellSubItems
---
-- ClientPermissions.ManageMap = 0x8000
-- @realm shared
-- @number ClientPermissions.ManageMap
---
-- ClientPermissions.ManageHires = 0x10000
-- @realm shared
-- @number ClientPermissions.ManageHires
---
-- ClientPermissions.All = 0x1FFF
-- @realm shared
-- @number ClientPermissions.All
@@ -0,0 +1,109 @@
--[[--
DisconnectReason enum.
]]
-- @enum DisconnectReason
---
-- DisconnectReason.Unknown = 0
-- @realm shared
-- @number DisconnectReason.Unknown
---
-- DisconnectReason.Banned = 1
-- @realm shared
-- @number DisconnectReason.Banned
---
-- DisconnectReason.Kicked = 2
-- @realm shared
-- @number DisconnectReason.Kicked
---
-- DisconnectReason.ServerShutdown = 3
-- @realm shared
-- @number DisconnectReason.ServerShutdown
---
-- DisconnectReason.ServerCrashed = 4
-- @realm shared
-- @number DisconnectReason.ServerCrashed
---
-- DisconnectReason.ServerFull = 5
-- @realm shared
-- @number DisconnectReason.ServerFull
---
-- DisconnectReason.AuthenticationRequired = 6
-- @realm shared
-- @number DisconnectReason.AuthenticationRequired
---
-- DisconnectReason.SteamAuthenticationRequired = 7
-- @realm shared
-- @number DisconnectReason.SteamAuthenticationRequired
---
-- DisconnectReason.SteamAuthenticationFailed = 8
-- @realm shared
-- @number DisconnectReason.SteamAuthenticationFailed
---
-- DisconnectReason.SessionTaken = 9
-- @realm shared
-- @number DisconnectReason.SessionTaken
---
-- DisconnectReason.TooManyFailedLogins = 10
-- @realm shared
-- @number DisconnectReason.TooManyFailedLogins
---
-- DisconnectReason.NoName = 11
-- @realm shared
-- @number DisconnectReason.NoName
---
-- DisconnectReason.InvalidName = 12
-- @realm shared
-- @number DisconnectReason.InvalidName
---
-- DisconnectReason.NameTaken = 13
-- @realm shared
-- @number DisconnectReason.NameTaken
---
-- DisconnectReason.InvalidVersion = 14
-- @realm shared
-- @number DisconnectReason.InvalidVersion
---
-- DisconnectReason.MissingContentPackage = 15
-- @realm shared
-- @number DisconnectReason.MissingContentPackage
---
-- DisconnectReason.IncompatibleContentPackage = 16
-- @realm shared
-- @number DisconnectReason.IncompatibleContentPackage
---
-- DisconnectReason.NotOnWhitelist = 17
-- @realm shared
-- @number DisconnectReason.NotOnWhitelist
---
-- DisconnectReason.ExcessiveDesyncOldEvent = 18
-- @realm shared
-- @number DisconnectReason.ExcessiveDesyncOldEvent
---
-- DisconnectReason.ExcessiveDesyncRemovedEvent = 19
-- @realm shared
-- @number DisconnectReason.ExcessiveDesyncRemovedEvent
---
-- DisconnectReason.SyncTimeout = 20
-- @realm shared
-- @number DisconnectReason.SyncTimeout
@@ -0,0 +1,14 @@
--[[--
Hook.HookMethodType enum.
]]
-- @enum Hook.HookMethodType
---
-- Hook.HookMethodType.Before = 0
-- @realm shared
-- @number Hook.HookMethodType.Before
---
-- Hook.HookMethodType.After = 1
-- @realm shared
-- @number Hook.HookMethodType.After
+59
View File
@@ -0,0 +1,59 @@
--[[--
InvSlotType enum.
]]
-- @enum InvSlotType
---
-- InvSlotType.None = 0
-- @realm shared
-- @number InvSlotType.None
---
-- InvSlotType.Any = 1
-- @realm shared
-- @number InvSlotType.Any
---
-- InvSlotType.RightHand = 2
-- @realm shared
-- @number InvSlotType.RightHand
---
-- InvSlotType.LeftHand = 4
-- @realm shared
-- @number InvSlotType.LeftHand
---
-- InvSlotType.Head = 8
-- @realm shared
-- @number InvSlotType.Head
---
-- InvSlotType.InnerClothes = 16
-- @realm shared
-- @number InvSlotType.InnerClothes
---
-- InvSlotType.OuterClothes = 32
-- @realm shared
-- @number InvSlotType.OuterClothes
---
-- InvSlotType.Headset = 64
-- @realm shared
-- @number InvSlotType.Headset
---
-- InvSlotType.Card = 128
-- @realm shared
-- @number InvSlotType.Card
---
-- InvSlotType.Bag = 256
-- @realm shared
-- @number InvSlotType.Bag
---
-- InvSlotType.HealthInterface = 512
-- @realm shared
-- @number InvSlotType.HealthInterface
+100
View File
@@ -0,0 +1,100 @@
--[[--
LimbType enum.
]]
-- @enum LimbType
---
-- LimbType.None = 0
-- @realm shared
-- @number LimbType.None
---
-- LimbType.LeftHand = 1
-- @realm shared
-- @number LimbType.LeftHand
---
-- LimbType.RightHand = 2
-- @realm shared
-- @number LimbType.RightHand
---
-- LimbType.LeftArm = 3
-- @realm shared
-- @number LimbType.LeftArm
---
-- LimbType.RightArm = 4
-- @realm shared
-- @number LimbType.RightArm
---
-- LimbType.LeftForearm = 5
-- @realm shared
-- @number LimbType.LeftForearm
---
-- LimbType.RightForearm = 6
-- @realm shared
-- @number LimbType.RightForearm
---
-- LimbType.LeftLeg = 7
-- @realm shared
-- @number LimbType.LeftLeg
---
-- LimbType.RightLeg = 8
-- @realm shared
-- @number LimbType.RightLeg
---
-- LimbType.LeftFoot = 9
-- @realm shared
-- @number LimbType.LeftFoot
---
-- LimbType.RightFoot = 10
-- @realm shared
-- @number LimbType.RightFoot
---
-- LimbType.Head = 11
-- @realm shared
-- @number LimbType.Head
---
-- LimbType.Torso = 12
-- @realm shared
-- @number LimbType.Torso
---
-- LimbType.Tail = 13
-- @realm shared
-- @number LimbType.Tail
---
-- LimbType.Legs = 14
-- @realm shared
-- @number LimbType.Legs
---
-- LimbType.RightThigh = 15
-- @realm shared
-- @number LimbType.RightThigh
---
-- LimbType.LeftThigh = 16
-- @realm shared
-- @number LimbType.LeftThigh
---
-- LimbType.Waist = 17
-- @realm shared
-- @number LimbType.Waist
---
-- LimbType.Jaw = 18
-- @realm shared
-- @number LimbType.Jaw
@@ -0,0 +1,109 @@
--[[--
NetEntityEvent.Type enum.
]]
-- @enum NetEntityEvent.Type
---
-- NetEntityEvent.Type.Invalid = 0
-- @realm shared
-- @number NetEntityEvent.Type.Invalid
---
-- NetEntityEvent.Type.ComponentState = 1
-- @realm shared
-- @number NetEntityEvent.Type.ComponentState
---
-- NetEntityEvent.Type.InventoryState = 2
-- @realm shared
-- @number NetEntityEvent.Type.InventoryState
---
-- NetEntityEvent.Type.Status = 3
-- @realm shared
-- @number NetEntityEvent.Type.Status
---
-- NetEntityEvent.Type.Treatment = 4
-- @realm shared
-- @number NetEntityEvent.Type.Treatment
---
-- NetEntityEvent.Type.ApplyStatusEffect = 5
-- @realm shared
-- @number NetEntityEvent.Type.ApplyStatusEffect
---
-- NetEntityEvent.Type.ChangeProperty = 6
-- @realm shared
-- @number NetEntityEvent.Type.ChangeProperty
---
-- NetEntityEvent.Type.Control = 7
-- @realm shared
-- @number NetEntityEvent.Type.Control
---
-- NetEntityEvent.Type.UpdateSkills = 8
-- @realm shared
-- @number NetEntityEvent.Type.UpdateSkills
---
-- NetEntityEvent.Type.Combine = 9
-- @realm shared
-- @number NetEntityEvent.Type.Combine
---
-- NetEntityEvent.Type.SetAttackTarget = 10
-- @realm shared
-- @number NetEntityEvent.Type.SetAttackTarget
---
-- NetEntityEvent.Type.ExecuteAttack = 11
-- @realm shared
-- @number NetEntityEvent.Type.ExecuteAttack
---
-- NetEntityEvent.Type.Upgrade = 12
-- @realm shared
-- @number NetEntityEvent.Type.Upgrade
---
-- NetEntityEvent.Type.AssignCampaignInteraction = 13
-- @realm shared
-- @number NetEntityEvent.Type.AssignCampaignInteraction
---
-- NetEntityEvent.Type.TeamChange = 14
-- @realm shared
-- @number NetEntityEvent.Type.TeamChange
---
-- NetEntityEvent.Type.ObjectiveManagerState = 15
-- @realm shared
-- @number NetEntityEvent.Type.ObjectiveManagerState
---
-- NetEntityEvent.Type.AddToCrew = 16
-- @realm shared
-- @number NetEntityEvent.Type.AddToCrew
---
-- NetEntityEvent.Type.UpdateExperience = 17
-- @realm shared
-- @number NetEntityEvent.Type.UpdateExperience
---
-- NetEntityEvent.Type.UpdateTalents = 18
-- @realm shared
-- @number NetEntityEvent.Type.UpdateTalents
---
-- NetEntityEvent.Type.UpdateMoney = 19
-- @realm shared
-- @number NetEntityEvent.Type.UpdateMoney
---
-- NetEntityEvent.Type.UpdatePermanentStats = 20
-- @realm shared
-- @number NetEntityEvent.Type.UpdatePermanentStats
+19
View File
@@ -0,0 +1,19 @@
--[[--
RandSync enum.
]]
-- @enum RandSync
---
-- RandSync.Unsynced = -1
-- @realm shared
-- @number RandSync.Unsynced
---
-- RandSync.Server = 0
-- @realm shared
-- @number RandSync.Server
---
-- RandSync.ClientOnly = 1
-- @realm shared
-- @number RandSync.ClientOnly
@@ -0,0 +1,64 @@
--[[--
ServerLogMessageType enum.
]]
-- @enum ServerLogMessageType
---
-- ServerLogMessageType.Chat = 0
-- @realm shared
-- @number ServerLogMessageType.Chat
---
-- ServerLogMessageType.ItemInteraction = 1
-- @realm shared
-- @number ServerLogMessageType.ItemInteraction
---
-- ServerLogMessageType.Inventory = 2
-- @realm shared
-- @number ServerLogMessageType.Inventory
---
-- ServerLogMessageType.Attack = 3
-- @realm shared
-- @number ServerLogMessageType.Attack
---
-- ServerLogMessageType.Spawning = 4
-- @realm shared
-- @number ServerLogMessageType.Spawning
---
-- ServerLogMessageType.Wiring = 5
-- @realm shared
-- @number ServerLogMessageType.Wiring
---
-- ServerLogMessageType.ServerMessage = 6
-- @realm shared
-- @number ServerLogMessageType.ServerMessage
---
-- ServerLogMessageType.ConsoleUsage = 7
-- @realm shared
-- @number ServerLogMessageType.ConsoleUsage
---
-- ServerLogMessageType.Money = 8
-- @realm shared
-- @number ServerLogMessageType.Money
---
-- ServerLogMessageType.Karma = 9
-- @realm shared
-- @number ServerLogMessageType.Karma
---
-- ServerLogMessageType.Talent = 10
-- @realm shared
-- @number ServerLogMessageType.Talent
---
-- ServerLogMessageType.Error = 11
-- @realm shared
-- @number ServerLogMessageType.Error
+29
View File
@@ -0,0 +1,29 @@
--[[--
SpawnType enum.
]]
-- @enum SpawnType
---
-- SpawnType.Path = 0
-- @realm shared
-- @number SpawnType.Path
---
-- SpawnType.Human = 1
-- @realm shared
-- @number SpawnType.Human
---
-- SpawnType.Enemy = 2
-- @realm shared
-- @number SpawnType.Enemy
---
-- SpawnType.Cargo = 4
-- @realm shared
-- @number SpawnType.Cargo
---
-- SpawnType.Corpse = 8
-- @realm shared
-- @number SpawnType.Corpse
+262
View File
@@ -0,0 +1,262 @@
-- 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
@@ -0,0 +1,299 @@
-- 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
@@ -0,0 +1,591 @@
-- 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
@@ -0,0 +1,367 @@
-- 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
@@ -0,0 +1,564 @@
-- 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
@@ -0,0 +1,338 @@
-- 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
+487
View File
@@ -0,0 +1,487 @@
-- 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
@@ -0,0 +1,213 @@
-- 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
+176
View File
@@ -0,0 +1,176 @@
-- 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
@@ -0,0 +1,58 @@
-- 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
@@ -0,0 +1,256 @@
-- 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
@@ -0,0 +1,53 @@
-- 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
+817
View File
@@ -0,0 +1,817 @@
-- 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
+276
View File
@@ -0,0 +1,276 @@
-- 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
@@ -0,0 +1,276 @@
-- 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
+628
View File
@@ -0,0 +1,628 @@
-- 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
+106
View File
@@ -0,0 +1,106 @@
-- 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
+214
View File
@@ -0,0 +1,214 @@
-- 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
+559
View File
@@ -0,0 +1,559 @@
-- 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
@@ -0,0 +1,167 @@
-- 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
@@ -0,0 +1,588 @@
-- 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
+623
View File
@@ -0,0 +1,623 @@
-- 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
@@ -0,0 +1,307 @@
-- 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
+507
View File
@@ -0,0 +1,507 @@
-- 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
+478
View File
@@ -0,0 +1,478 @@
-- 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
+122
View File
@@ -0,0 +1,122 @@
# Common Questions
## What does attempt to index a nil value mean!?
It means you tried to access a field of something that doesn't exist, for example:
```
local thisIsNil = nil
print(thisIsNil.what)
print(thisIsNil.something())
```
## Why i'm getting "Cannot access field test of userdata<something>" errors?
Because you are trying to access a field in a C# class that doesn't exist.
```
print(Item.thisDoesntExist)
```
## What is "Attempt to access instance member "Drop" from a static userdata"
It means you are trying to access a member that requires an instance to accessed, for example:
```
-- there's a static global class called Item, but because it's static, you can't call item specific
-- things on it, this will error.
Item.Drop()
Item.ItemList[1].Drop() -- this won't error, it will drop the first item ever created.
```
## I'm getting a super big error with things related to the C# side
It usually happens when you call something on the C# side and you provide nil inputs, you can get a better idea of it by analyzing the error message and trying to link it your lua code, for example:
```
Game.SendMessage(nil)
```
This will result in
```
[LUA ERROR] System.NullReferenceException: Object reference not set to an instance of an object.
at Barotrauma.Networking.ChatMessage.GetChatMessageCommand(String message, String& messageWithoutCommand)
at Barotrauma.Networking.GameServer.SendChatMessage(String message, Nullable`1 type, Client senderClient,
Character senderCharacter, PlayerConnectionChangeType changeType)
```
You can easily tell that the error has something to do with chat messages, and by looking back at your Lua code you can easily see whats causing it.
## How do i list all clients, characters and items?
```
for _, client in pairs(Client.ClientList) do
end
for _, character in pairs(Character.CharacterList) do
end
for _, item in pairs(Item.ItemList) do
end
```
## Running pairs() on an enumerator doesn't work!
pairs() Returns an enumerator that iterates through the entire table keys, if you already have an enumerator, you can just pass it in directly.
```
-- get first item ever created and loop through all the items stored inside it.
for item in Item.ItemList[1].OwnInventory.AllItems do
end
```
## How do i spawn an item?
```
local prefab = ItemPrefab.GetItemPrefab("screwdriver")
local firstPlayerCharacter = Client.ClientList[1].Character
-- Spawn on the world
Entity.Spawner.AddItemToSpawnQueue(prefab, firstPlayerCharacter.WorldPosition, nil, nil, function(item)
print(item.Name .. " Has been spawned.")
end)
-- Spawn inside an inventory
Entity.Spawner.AddItemToSpawnQueue(prefab, firstPlayerCharacter.Inventory, nil, nil, function(item)
print(item.Name .. " Has been spawned.")
end)
```
## How do i give a character a certain affliction
```
local burnPrefab = AfflictionPrefab.Prefabs["burn"]
local char = Character.CharacterList[1]
local limb = char.AnimController.MainLimb
-- or char.AnimController.Limbs[1]
char.CharacterHealth.ApplyAffliction(limb, burnPrefab.Instantiate(100))
```
## How do i get the amount of a affliction that a character has?
```
local char = Character.CharacterList[1]
print(char.CharacterHealth.GetAffliction("burn"))
-- or
print(char.CharacterHealth.GetAffliction("burn", char.AnimController.Limbs[1]))
```
## How do i send a private chat message?
```
local chatMessage = ChatMessage.Create("Sender name", "text here", ChatMessageType.MessageBox, nil, nil)
chatMessage.Color = Color(255, 255, 0, 255)
Game.SendDirectChatMessage(chatMessage, Client.ClientList[1])
```
## How do i teleport a character or an item?
```
-- teleports an item to 0, 0
local item = Item.ItemList[1]
item.SetTransform(Vector2(0, 0), item.Rotation)
-- teleports a character to 0, 0
local character = Client.ClientList[1].Character
character.TeleportTo(Vector2(0, 0))
```
+103
View File
@@ -0,0 +1,103 @@
# Getting started
If you want to learn how Lua works and the syntax, you can check these websites: [https://www.lua.org/manual/5.2/](https://www.lua.org/manual/5.2/) [https://www.tutorialspoint.com/lua/lua_overview.htm](https://www.tutorialspoint.com/lua/lua_overview.htm)
## How mods are executed
When the server finishes loading everything, Lua For Barotrauma starts up and reads the file `Lua/LuaSetup.lua` and executes it, this Lua script registers classes to be available on the Lua side, creates static references and puts them in the global space, and then goes on each mod and executes their Autorun if the content package is enabled, and after that, goes on each mod, and executes ForcedAutorun which executes even if the content package is disabled.
## Creating your first mod
When creating a new Lua mod, you will need to create a new folder on the **LocalMods** folder, then inside this folder you will need to create a folder called **Lua**, and then inside the Lua folder you create a folder called **Autorun**, inside this folder you can add your Lua scripts that will be executed automatically, it will look something like this `LocalMods/MyMod/Lua/Autorun/test.lua`, remember that your mod will only work if it's a valid xml mod that has a filelist.xml. If you use ForcedAurorun, the mod executes even if it's disabled.
Now you can open **test.lua** in your favorite text editor (<a href="https://code.visualstudio.com/" target="_blank">VSCode</a> with the <a href="https://marketplace.visualstudio.com/items?itemName=sumneko.lua" target="_blank">Lua Sumneko extension</a> recommended) and type in **print("Hello, world")**, now start the server by hosting a game or running the server executable manually, you will see in your console a text appear with the text that you entered in print, you can now type in the server console `reloadlua`, this will re-execute all the Lua scripts. You can also type in `lua yourscript` to run a short lua snippet, like this `lua print('Hello, world')`, remember to remove double quotes, because Barotrauma console automatically formats those.
**Note: When you host a server via the in game menus, you won't be able to see the first server debug prints, because the server will print those before your client joins the server.**
## Including other files
If you wish to separate your Lua scripts into multiple files, you can do it by either having multiple scripts in the Autorun folder, or having a single script that is responsible for executing the rest of your Lua scripts, for that you will need to get relative paths to your mod, here's an example of how to do it:
```
-- this variable will be accessible to any other script, so you can use it to get the mod's path.
MyModGlobal = {}
MyModGlobal.Path = ...
dofile(MyModGlobal.Path .. "/Lua/yourscript.lua")
```
Alternatively, you may use the `require` function to load Lua scripts by their module name (file name without `.lua` inside your mod's `Lua/` folder, subfolders are dot-separated). This is slightly different from `dofile`; `require` will return whatever the Lua script you are calling returns. Also, `require` will execute the Lua script only the first time, and will just return its original return value on subsequent calls.
```
local MyMod = {
Path = ... -- Get path to this mod/content package, exact same as MyModGlobal.Path = ... above.
}
-- Equivalent to: dofile(MyMod.Path .. "/Lua/MyScript.lua")
require "MyScript"
-- Equivalent to: dofile(MyMod.Path .. "/Lua/Subfolder1/Subfolder2/Subfoler3/MyScript.lua")
require "Subfolder1.Subfolder2.Subfolder3.MyScript"
```
Note that `require` does not necessitate the use of `MyMod.Path = ...`, instead it looks for the first match in the `Lua/` folder of every enabled (including forced ran) Barotrauma mod. This means that you can execute the scripts of other Barotrauma mods. To ensure that you do not inadvertently execute a script from a different Barotrauma mod, you should use a unique subfolder name for your scripts.
```
-- Generic: Bad, likely to execute MyScript.lua from a different mod from ours.
-- AnyModPath/Lua/MyScript.lua
require "MyScript"
-- More unique: Good, less likely to execute MyScript from a different mod from ours.
-- AnyModPath/Lua/MyName/MyMod/MyScript.lua
require "MyName.MyMod.MyScript"
```
`require` will return whatever the script it loads returns.
```
-- Inside MyScript.lua:
local MyString = "Hello World!"
return MyString
-------------------------------
-- Inside another script:
local MyString = require "MyScript"
-- Will print "Hello World!"
print(MyString)
```
The main advantages of `require` over `dofile` are: 1. multiple scripts can try to load the same file without executing its contents multiple times but instead only once; and 2. scripts can load scripts from third-party mods without having to know their paths. It is an alternative over using global variables for sharing data between scripts; while a script needs to wait for a global variable to be initialised first, you can instead bundle the variable initalisation logic (which must only run once) with a script that also returns the variable (in a table) for other mods to `require` and use.
Find more information about `require` in the Programming in Lua book: http://www.lua.org/pil/8.1.html.
## Error handling
Sometimes you may expect an error to happen when you call specific functions in your script. Errors will stop the execution of your script unless they are handled correctly.
`pcall` (protected call) is a function that allows you to call another function in *protected mode*, which means that any errors that occur will be caught and a status code will be returned that your script can use to understand whether the function failed or succeeded, and the type of error that occured.
```
-- Require a third-party script, risky as it raises an error if the user does not have it installed.
local result = require "ThirdPartyAuthor.ThirdPartyMod.ThirdPartyScript"
-- Only prints if the above does not raise an error.
print(result)
-- Same as above, except any error is handled.
local ok, result = pcall(require, "ThirdPartyAuthor.ThirdPartyMod.ThirdPartyScript")
-- `ok` is true if no error, false if there is an error.
if ok then
-- No error, print our result!
print(result)
else
-- There was an error, in this case `result` is a string containing the error code.
print("Error when loading third-party script: ", result)
end
```
Read more about error handling in the Programming in Lua book: http://www.lua.org/pil/8.4.html. Confer also the Lua 5.2 reference manual: http://www.lua.org/manual/5.2/manual.html.
## Learning the libraries
In the sidebar of the documentation, you can see a tab named Code, in there you can check out all the functions and fields that each class has, each one of them has a box with a color on it, where <span class="realm server"></span> means Server-Side, <span class="realm client"></span> means Client-Side and <span class="realm shared"></span> means both Server-Side and Client-Side, by clicking on them you can learn more about them. Not everything is documented here, theres stuff missing that still needs to be added, if you want to find more in-depth functions and fields in the Barotrauma classes, you should check the Barotrauma source code.
See <a href="../lua-examples" target="_blank">Lua Examples</a>, <a href="../common-questions" target="_blank">Common Questions</a>
+51
View File
@@ -0,0 +1,51 @@
# How to use hooks
Hooks are basically functions that get called when events happen in-game, like chat messages. They can be triggered either by Lua itself or the game code.
## Adding hooks
Hooks can be added like this:
```
Hook.Add("chatMessage", "test", function(message, client)
print(client.Name .. " has sent " .. message)
end)
```
The event name (first argument), is case-insensitive, so you can call it chatMessage, cHaTmEsSaGe, chatmessage, etc.
## Calling hooks
You can also call hooks with the following code:
```
Hook.Call("myCustomEvent", {"some", "arguments", 123})
```
## XML Status Effect Hooks
With Lua, a new XML tags is added, it can be used to call Lua hooks inside status effects:
```
<StatusEffect type="OnUse">
<LuaHook name="doSomething" />
</StatusEffect>
```
```
Hook.Add("doSomething", "something", function (effect, deltaTime, item, targets, worldPosition)
print(effect, ' ', item)
end)
```
## Patching
Patching allows you to hook into existing methods in the game code, notice that it can be a little unstable depending on the method that you are patching, so be aware.
```
Hook.HookMethod("Barotrauma.CharacterInfo", "IncreaseSkillLevel", function (instance, ptable)
print(string.format("%s gained % xp", instance.Character.Name, ptable.increase))
end, Hook.HookMethodType.After)
```
If you return anything other than nil, it will stop the execution of the method, if the method has a return type, it will also return what you returned in the Lua function. (Only in Hook.HookMethodType.After)
@@ -0,0 +1,88 @@
# Installing Lua For Barotrauma Manually
## Notice: Using the LuaForBarotrauma package is not required if it's installed manually, but you may use it anyway if you wish to support the mod, since players automatically download packages when joining the server.
## If you are getting TextManager errors, open config_player.xml in your server and change the language from None to English
## Adding Lua For Barotrauma to an existing server
1 - Download [latest version of LuaForBarotrauma](https://github.com/evilfactory/Barotrauma-lua-attempt/releases/tag/latest), choose the correct platform in the assets drop down.<br>
2 - Extract the zip file<br>
3 - Copy the following files inside the extracted zip:<br>
- **DedicatedServer.deps.json**
- **DedicatedServer.dll**
- **DedicatedServer.pdb**
- **0Harmony.dll**
- **MoonSharp.Interpreter.dll**
- **MonoMod.Common.dll**
- **Mono.Cecil.dll**
- **Mono.Cecil.Mdb.dll**
- **Mono.Cecil.Pdb.dll**
- **Mono.Cecil.Rocks.dll**
- **Microsoft.CodeAnalysis.CSharp.Scripting.dll**
- **Microsoft.CodeAnalysis.CSharp.dll**
- **Microsoft.CodeAnalysis.dll**
- **Microsoft.CodeAnalysis.Scripting.dll**
- **System.Collections.Immutable.dll**
- **System.Reflection.Metadata.dll**
- **System.Runtime.CompilerServices.Unsafe.dll**
- file that starts with **mscordaccore\_amd64\_amd64\_**
- and the **Lua/** folder
4 - Paste them to your existing server, and let it replace the files<br>
## Adding Lua For Barotrauma to an existing client
Same as above, but instead you need to copy/replace the following files:
- **Barotrauma.deps.json**
- **Barotrauma.dll**
- **Barotrauma.pdb**
- **0Harmony.dll**
- **MoonSharp.Interpreter.dll**
- **MonoMod.Common.dll**
- **Mono.Cecil.dll**
- **Mono.Cecil.Mdb.dll**
- **Mono.Cecil.Pdb.dll**
- **Mono.Cecil.Rocks.dll**
- **Microsoft.CodeAnalysis.CSharp.Scripting.dll**
- **Microsoft.CodeAnalysis.CSharp.dll**
- **Microsoft.CodeAnalysis.dll**
- **Microsoft.CodeAnalysis.Scripting.dll**
- **System.Collections.Immutable.dll**
- **System.Reflection.Metadata.dll**
- **System.Runtime.CompilerServices.Unsafe.dll**
- file that starts with **mscordaccore\_amd64\_amd64\_**
- and the **Lua/** folder
## Using Lua For Barotrauma from scratch
<iframe width="560" height="315" src="https://www.youtube.com/embed/ov0MUOUVB7A" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
1 - Download [latest version of LuaForBarotrauma](https://github.com/evilfactory/Barotrauma-lua-attempt/releases/tag/latest), choose the correct platform in the assets drop down.<br>
2 - Extract the zip file<br>
3 - Find the Content folder in your original Barotrauma game: <br>
![](https://cdn.discordapp.com/attachments/799752463619325968/833120013149929492/unknown.png)
![](https://cdn.discordapp.com/attachments/799752463619325968/833120379378991104/unknown.png)
![](https://cdn.discordapp.com/attachments/799752463619325968/833120841277374464/unknown.png)
4 - Copy the Content folder to the extracted folder <br>
![](https://cdn.discordapp.com/attachments/799752463619325968/833133217300742154/unknown.png)
6 - Optional: Copy config_player.xml from your original game so it retains your configurations.
7 - Done! Now run DedicatedServer.exe to run the modded server or run Barotrauma.exe to run the modded client.<br>
### Linux notice
Sometimes you will get steam initialization errors, most of the time it's because it's missing the linux64/steamclient.so binary, so you can just copy the binary from your steam instalation over to the folder and it should work.
## Checking if everything is working
If the commands `reloadlua` or `cl_reloadlua` work without errors, it means you successfully installed the mod.
+87
View File
@@ -0,0 +1,87 @@
# Lua Examples
```
Hook.Add('chatMessage', 'suicide_mod', function(msg, client)
if msg == '!suicide' and client.Character ~= nil then
client.Character.Kill(CauseOfDeathType.Unknown)
Game.SendMessage(client.name .. ' killed himself!', ChatMessageType.Server)
return true -- hide message
end
end)
```
<br>
```
Hook.Add("itemApplyTreatment", "testItemApplyTreatment", function (item, user, character, targetlimb)
if item.Prefab.Identifier == "antibleeding1" then
local pos = character.WorldPosition
Game.Explode(pos, 1, 500, 5000, 5000, 5000)
Game.RemoveItem(item)
end
end)
```
<br>
```
-- for example: create an item in xml named RandomComponent and add the wiring inputs/outputs trigger_random and random_out
Hook.Add("signalReceived", "signalReceivedTest", function (signal, connection)
if connection.Item.Prefab.Identifier == "RandomComponent" and connection.Name == "trigger_random" then
connection.Item.SendSignal(tostring(Random.Range(0, 100)), "random_out")
end
end)
```
<br>
```
local discordWebHook = "your discord webhook here"
local function escapeQuotes(str)
return str:gsub("\"", "\\\"")
end
Hook.Add("chatMessage", "discordIntegration", function (msg, client)
local escapedName = escapeQuotes(client.name)
local escapedMessage = escapeQuotes(msg)
Networking.RequestPostHTTP(discordWebHook, function(result) end, '{\"content\": \"'..escapedMessage..'\", \"username\": \"'..escapedName..'\"}')
end)
```
<br>
```
-- by jimmyl
Hook.Add("chatMessage","controlhuskcommand",function(msg, client)
if msg == "!controlhusk" then
if client.Character ~= nil then
if not client.Character.IsDead then
return true
end
end
if not client.InGame then
return true
end
local chars = Character.CharacterList
local suitablechars = {}
for i = 1, #chars, 1 do
local charat = chars[i]
if not charat.IsDead and string.match(string.lower(charat.SpeciesName.Value), "husk") and not charat.IsRemotelyControlled then
table.insert(suitablechars, charat)
end
end
if #suitablechars >= 1 then
client.SetClientCharacter(suitablechars[Random.Range(1, #suitablechars)])
end
return true -- hide message
end
end)
```
+19
View File
@@ -0,0 +1,19 @@
Import-Module $PSScriptRoot/../../scripts/location.ps1
try {
Change-Location $PSScriptRoot/..
Remove-Item -Force -Recurse ./build | Out-Null
New-Item -ItemType Directory ./build | Out-Null
Copy-Item -Path ./css/. -Destination ./build -Recurse -Force | Out-Null
Copy-Item -Path ./js/. -Destination ./build -Recurse -Force | Out-Null
if ((Get-Command "lua_modules/bin/ldoc" -ErrorAction SilentlyContinue) -eq $null) {
echo "ldoc not found; please run docs/scripts/install.ps1"
exit 1
}
lua_modules/bin/ldoc .
} finally {
Restore-Location
}
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
cd "$DIR/.."
ldoc_path=./lua_modules/bin/ldoc
if [[ ! -x "$ldoc_path" ]]; then
echo "ldoc not found; please run docs/scripts/install.sh"
exit 1
fi
rm -rf ./build
mkdir ./build
cp -r ./js/. ./build
cp -r ./css/. ./build
"$ldoc_path" .
+43
View File
@@ -0,0 +1,43 @@
Import-Module $PSScriptRoot/../../scripts/location.ps1
try {
Change-Location $PSScriptRoot/..
$lua_binary = $env:LUA_BINARY
if ($lua_binary -eq $null) {
$lua_binary = "lua"
}
if ((Get-Command "$lua_binary" -ErrorAction SilentlyContinue) -eq $null) {
if ($env:LUA_BINARY -eq $null) {
echo "lua binary not found; please set `$LUA_BINARY manually."
} else {
echo "lua binary not found: $lua_binary"
}
exit 1
}
if ((Get-Command "luarocks" -ErrorAction SilentlyContinue) -eq $null) {
echo "luarocks not found"
exit 1
}
$lua_version = (Invoke-Expression -Command "& $lua_binary -v 2>&1") -Replace '^Lua (\d+)\.(\d+).*$','$1.$2'
echo "Detected lua version $lua_version"
$luarocks_args=@(
"--tree",
"$(Get-Location)/lua_modules",
"--lua-version",
"$lua_version"
)
try {
Change-Location ./libs/ldoc
luarocks @luarocks_args make
} finally {
Restore-Location
}
} finally {
Restore-Location
}
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
cd "$DIR/.."
lua_binary="${LUA_BINARY:-lua}"
if ! command -v "$lua_binary" &> /dev/null; then
if [[ -z "${LUA_BINARY+x}" ]]; then
echo "lua binary not found; please set \$LUA_BINARY manually."
else
echo "lua binary not found: $lua_binary"
fi
exit 1
fi
if ! command -v "$lua_binary" &> /dev/null; then
echo "luarocks not found"
exit 1
fi
lua_version="$("$lua_binary" -v | grep -Po '^Lua \K(\d+)\.(\d+)')"
echo "Detected lua version $lua_version"
# Install dependencies (npm style)
# NOTE: you need to have lua header files installed.
# On debian-based distros: apt install libluaX.X-dev
luarocks_args=(
"--tree"
"$PWD/lua_modules"
"--lua-version"
"$lua_version"
)
(
cd libs/ldoc
luarocks ${luarocks_args[@]} make
)
+14
View File
@@ -0,0 +1,14 @@
Import-Module $PSScriptRoot/../../scripts/location.ps1
try {
Change-Location $PSScriptRoot/..
if ((Get-Command "python3" -ErrorAction SilentlyContinue) -eq $null) {
echo "python3 not found"
exit 1
}
python3 ../scripts/http_server.py ./build --port 8000
} finally {
Restore-Location
}
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
cd "$DIR/.."
if ! command -v "python3" &> /dev/null; then
echo "python3 not found"
exit 1
fi
python3 ../scripts/http_server.py ./build --port 8000
+24
View File
@@ -0,0 +1,24 @@
<div class="landing">
<h1>Lua For Barotrauma Documentation</h1>
</div>
<div class="wrapper">
<p style="text-align: center;"></p>
<h2>Welcome to the Lua For Barotrauma documentation!</h2>
<p>This is a work in progress documentation, not everything is documented here, but because Barotrauma classes are exposed to Lua, you can check the Barotrauma source code for functions and fields that you can access.</p>
<h2>Installing Lua For Barotrauma</h2>
<p>Downloading and using the Core Content Package from <a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2559634234" target="_blank">Workshop</a> should be enough to have it installed, but if you want to install it manually, you can check out <a href="{* ldoc.url('manual/installing-lua-for-barotrauma-manually') *}">this guide.</a>
</p>
<h2>Getting Started</h2>
<p>If you want to get started with Lua For Barotrauma modding, check out <a href="{* ldoc.url('manual/getting-started') *}">this guide.</a>
</p>
<h2>Links</h2>
<p>
<a href="https://github.com/evilfactory/Barotrauma-lua-attempt" target="_blank">Github</a><br>
<a href="https://discord.gg/f9zvNNuxu9" target="_blank">Discord Server</a>
</p>
</div>
+138
View File
@@ -0,0 +1,138 @@
{%
local baseUrl = ldoc.css:gsub("ldoc.css", "")
local repo = "https://github.com/evilfactory/Barotrauma-lua-attempt/"
local pageTitle = mod and (ldoc.display_name(mod) .. " - " .. ldoc.title) or ldoc.title
local oldmarkup = ldoc.markup
function ldoc.markup(text, item)
return oldmarkup(text, item, ldoc.plain)
end
function ldoc.url(path)
return baseUrl .. path
end
function ldoc.realm_icon(realm)
return "<span class=\"realm " .. (realm or "") .. "\"></span>"
end
function ldoc.sidebar_item(item, module)
local text = ""
local deprecated = item.tags.deprecated
if deprecated then
text = text .. "<span class=\"strikethrough\">"
else
text = text .. "<span>"
end
text = text .. ldoc.realm_icon(item.tags.realm[1])
text = text .. "<a href=\""
.. ldoc.ref_to_module(module) .. "#" .. item.name
.. "\">"
if ldoc.is_kind_classmethod(module.kind) then
text = text .. item.name:gsub(".+:", "")
else
text = text .. item.name:gsub(module.name .. ".", "")
end
text = text
.. "</a>"
.. "</span>"
return text
end
function ldoc.item_header(item)
local text = ""
text = text .. "<a class=\"anchor\">"
local deprecated = item.tags.deprecated
if deprecated then
text = text .. "<h1 class=\"strikethrough\">"
else
text = text .. "<h1>"
end
text = text
.. ldoc.realm_icon(item.tags.realm[1])
.. ldoc.display_name(item)
.. "</h1>"
.. "</a>"
return text
end
function ldoc.is_kind_classmethod(kind)
return kind ~= "libraries"
end
function ldoc.repo_reference(item)
return repo .. "tree/master" .. item.file.filename:gsub(item.file.base, "/gamemode") .. "#L" .. item.lineno
end
local function moduleDescription(mod)
if (mod.type == "topic") then
return mod.body:gsub(mod.display_name, ""):gsub("#", ""):sub(1, 256) .. "..."
end
return mod.summary
end
%}
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{pageTitle}}</title>
<meta property="og:type" content="website" />
<meta property="og:title" content="{{pageTitle}}" />
<meta property="og:site_name" content="Lua For Barotrauma Documentation" />
{% if (mod) then %}
<meta property="og:description" content="{{moduleDescription(mod)}}" />
{% else %}
<meta property="og:description" content="A Barotrauma modification that adds Lua modding support." />
{% end %}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro" />
<link rel="stylesheet" href="{* ldoc.css *}" />
<link rel="stylesheet" href="{* ldoc.url('highlight.css') *}" />
</head>
<body>
<main>
{(templates/sidebar.ltp)}
<article>
{% if (ldoc.root) then -- we're rendering the landing page (index.html) %}
{(templates/landing.ltp)}
{% elseif (ldoc.body) then -- we're rendering non-code elements %}
<div class="wrapper">
{* ldoc.body *}
</div>
{% elseif (module) then -- we're rendering libary contents %}
<div class="wrapper">
{(templates/module.ltp)}
</div>
{% end %}
</article>
</main>
<script type="text/javascript" src="{* ldoc.url('app.js') *}"></script>
<script type="text/javascript" src="{* ldoc.url('highlight.min.js') *}"></script>
<script type="text/javascript">
var elements = document.querySelectorAll("pre code")
hljs.configure({
languages: ["lua", ""]
});
for (var i = 0; i < elements.length; i++)
{
hljs.highlightBlock(elements[i]);
}
</script>
</body>
</html>
+152
View File
@@ -0,0 +1,152 @@
<header class="module">
<h1>{{mod.name}}</h1>
<h2>{* ldoc.markup(mod.summary) *}</h2>
</header>
<p>{* ldoc.markup(mod.description) *}</p>
{%
local kinds = {}
local kindsIpairs = {}
for kind, items in mod.kinds() do
local name = kind
if kind == "Tables" then
name = "Fields"
end
for item in items() do
if kinds[name] == nil then
kinds[name] = {}
local value = {}
value.kind = name
value.items = kinds[name]
table.insert(kindsIpairs, value)
end
kinds[name][item] = true
end
end
%}
{% for i, value in ipairs(kindsIpairs) do
local kind = value.kind
local items = value.items
%}
<h1 class="title">{{kind}}</h1>
{% for item, _ in pairs(items) do %}
<section class="method" id="{{item.name}}">
<header>
{* ldoc.item_header(item) *}
{% if item.tags.deprecated then %}
<div class="notice warning">
<div class="title">Deprecated</div>
<p>This API is deprecated and shouldn't be used anymore.</p>
</div>
{% end %}
{% if (item.tags.internal) then %}
<div class="notice error">
<div class="title">Internal</div>
<p>This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.</p>
</div>
{% end %}
{% if (ldoc.descript(item):len() == 0) then %}
<div class="notice warning">
<div class="title">Incomplete</div>
<p>Documentation for this section is incomplete and needs expanding.</p>
</div>
{% else %}
<p>{* ldoc.markup(ldoc.descript(item)) *}</p>
{% end %}
</header>
{# function arguments #}
{% if (item.params and #item.params > 0) then %}
{% local subnames = mod.kinds:type_of(item).subnames %}
{% if (subnames) then %}
<h3>{{subnames}}</h3>
{% end %}
{% for argument in ldoc.modules.iter(item.params) do %}
{% local argument, sublist = item:subparam(argument) %}
<ul>
{% for argumentName in ldoc.modules.iter(argument) do %}
{% local displayName = item:display_name_of(argumentName) %}
{% local type = ldoc.typename(item:type_of_param(argumentName)) %}
{% local default = item:default_of_param(argumentName) %}
<li>
<span class="tag parameter">{{displayName}}</span>
{% if (type ~= "") then %}
<span class="tag">{* type *}</span>
{% end %}
{% if (default and default ~= true) then %}
<span class="tag default">default: {{default}}</span>
{% elseif (default) then %}
<span class="tag default">optional</span>
{% end %}
<p>{* ldoc.markup(item.params.map[argumentName]) *}</p>
</li>
{% end %}
</ul>
{% end %}
{% end %}
{# function returns #}
{% if ((not ldoc.no_return_or_parms) and item.retgroups) then %}
{% local groups = item.retgroups %}
<h3>Returns</h3>
<ul>
{% for i, group in ldoc.ipairs(groups) do %}
{% for returnValue in group:iter() do %}
{% local type, ctypes = item:return_type(returnValue) %}
{% type = ldoc.typename(type) %}
<li>
{% if (type ~= "") then %}
{* type *}
{% else -- we'll assume that it will return a variable type if none is set %}
<span class="tag type">any</span>
{% end %}
<p>{* ldoc.markup(returnValue.text) *}</p>
</li>
{% end %}
{% if (i ~= #groups) then %}
<div class="or"><span>OR</span></div>
{% end %}
{% end %}
</ul>
{% end %}
{% if (item.usage) then -- function usage %}
<h3>Example Usage</h3>
{% for usage in ldoc.modules.iter(item.usage) do %}
<pre><code>{* usage *}</code></pre>
{% end %}
{% end %}
{% if (item.see) then %}
<h3>See Also</h3>
<ul>
{% for see in ldoc.modules.iter(item.see) do %}
<li><a href="{* ldoc.href(see) *}">{{see.label}}</a></li>
{% end %}
</ul>
{% end %}
</section>
{% end %}
{% end %}
+102
View File
@@ -0,0 +1,102 @@
{%
local function isKindExpandable(kind)
return kind ~= "Manual"
end
%}
<nav>
<header>
{% if (not ldoc.root) then %}
<h1><a href="{* ldoc.url('') *}">Lua For Barotrauma Documentation</a></h1>
{% end %}
<input id="search" type="search" autocomplete="off" placeholder="Search..." />
</header>
<section>
{% for kind, mods, type in ldoc.kinds() do %}
{% if (ldoc.allowed_in_contents(type, mod)) then %}
<details class="category" open>
<summary>
<h2>{{kind}}</h2>
</summary>
<ul>
{% for currentMod in mods() do %}
{% local name = ldoc.display_name(currentMod) %}
<li>
{% if (isKindExpandable(kind)) then %}
<details {{currentMod.name == (mod or {}).name and "open" or ""}}>
<summary><a href="{* ldoc.ref_to_module(currentMod) *}">{{name}}</a></summary>
<ul>
{% else %}
<a href="{* ldoc.ref_to_module(currentMod) *}">{{name}}</a>
{% end %}
{% if (isKindExpandable(kind)) then
currentMod.items:sort(function(a, b)
return a.name < b.name
end)
end %}
{%
local isThereFunctions = false
for k, v in pairs(currentMod.items) do
if (v.kind == "functions") then
isThereFunctions = true
break
end
end
%}
{% if isThereFunctions then %}
<li>
<label class="colorful-label">FUNCTIONS</label>
</li>
{% end %}
{% for k, v in pairs(currentMod.items) do %}
{% if (v.kind == "functions") then %}
<li>
{* ldoc.sidebar_item(v, currentMod) *}
</li>
{% end %}
{% end %}
{%
local isThereFields = false
for k, v in pairs(currentMod.items) do
if (v.kind == "fields" or v.kind == "tables") then
isThereFields = true
break
end
end
%}
{% if isThereFields then %}
<li>
<label class="colorful-label">FIELDS</label>
</li>
{% end %}
{% for k, v in pairs(currentMod.items) do %}
{% if (v.kind == "fields" or v.kind == "tables") then %}
<li>
{* ldoc.sidebar_item(v, currentMod) *}
</li>
{% end %}
{% end %}
{% if (isKindExpandable(kind)) then %}
</ul>
</details>
{% end %}
</li>
{% end %}
</ul>
</details>
{% end %}
{% end %}
</section>
</nav>