added more stuff to docs
This commit is contained in:
@@ -54,6 +54,13 @@ tparam_alias("Client", "client")
|
|||||||
tparam_alias("Character", "character")
|
tparam_alias("Character", "character")
|
||||||
tparam_alias("Submarine", "submarine")
|
tparam_alias("Submarine", "submarine")
|
||||||
tparam_alias("Item", "item")
|
tparam_alias("Item", "item")
|
||||||
|
tparam_alias("Vector2", "Vector2")
|
||||||
|
tparam_alias("Vector3", "Vector3")
|
||||||
|
tparam_alias("Vector4", "Vector4")
|
||||||
|
tparam_alias("CauseOfDeath", "CauseOfDeath")
|
||||||
|
tparam_alias("CharacterInventory", "CharacterInventory")
|
||||||
|
tparam_alias("PhysicsBody", "PhysicsBody")
|
||||||
|
|
||||||
|
|
||||||
tparam_alias("string", "string")
|
tparam_alias("string", "string")
|
||||||
tparam_alias("bool", "boolean")
|
tparam_alias("bool", "boolean")
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
local class = ""
|
||||||
|
|
||||||
|
local generatedDocs = ""
|
||||||
|
|
||||||
|
local function addline(line)
|
||||||
|
generatedDocs = generatedDocs .. line .. "\n"
|
||||||
|
end
|
||||||
|
|
||||||
|
for line, _ in io.lines("input.txt") do
|
||||||
|
local words = {}
|
||||||
|
for word in line:gmatch("%w+") do table.insert(words, word) end
|
||||||
|
|
||||||
|
if words[1] == "Float" then words[1] = "number" end
|
||||||
|
if words[1] == "Bool" then words[1] = "bool" end
|
||||||
|
if words[1] == "String" then words[1] = "string" end
|
||||||
|
|
||||||
|
addline("---")
|
||||||
|
addline("-- " .. words[2] .. ", returns a " .. words[1] .. ".")
|
||||||
|
addline("-- @realm shared")
|
||||||
|
addline("-- @" .. words[1] .. " " .. words[2])
|
||||||
|
addline("")
|
||||||
|
|
||||||
|
Character = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
print(generatedDocs)
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
Bool IsRemotelyControlled
|
||||||
|
Bool IsObserving
|
||||||
|
Bool IsBot
|
||||||
|
Bool IsDead
|
||||||
|
Bool IsHuman
|
||||||
|
Bool IsMale
|
||||||
|
Bool IsFemale
|
||||||
|
Bool CanSpeak
|
||||||
|
Bool NeedsAir
|
||||||
|
Bool NeedsWater
|
||||||
|
Bool NeedsOxygen
|
||||||
|
Bool IsTraitor
|
||||||
|
Bool HideFace
|
||||||
|
Bool LockHands
|
||||||
|
Bool CanMove
|
||||||
|
Bool CanInteract
|
||||||
|
Bool ObstructVision
|
||||||
|
Bool IsRagdolled
|
||||||
|
Bool IsIncapacitated
|
||||||
|
Bool IsUnconscious
|
||||||
|
Bool IsPet
|
||||||
|
Bool UseHullOxygen
|
||||||
|
Bool CanBeSelected
|
||||||
|
Bool CanBeDragged
|
||||||
|
Bool CanInventoryBeAccessed
|
||||||
|
Bool GodMode
|
||||||
|
Bool IsInFriendlySub
|
||||||
|
Vector2 Position
|
||||||
|
Vector2 DrawPosition
|
||||||
|
Vector2 CursorPosition
|
||||||
|
Vector2 SmoothedCursorPosition
|
||||||
|
Vector2 CursorWorldPosition
|
||||||
|
Float LowPassMultiplier
|
||||||
|
Float Oxygen
|
||||||
|
Float OxygenAvailable
|
||||||
|
Float Stun
|
||||||
|
Float Vitality
|
||||||
|
Float MaxVitality
|
||||||
|
Float Health
|
||||||
|
Float HealthPercentage
|
||||||
|
Float SpeechImpediment
|
||||||
|
Float PressureTimer
|
||||||
|
Float CurrentSpeed
|
||||||
|
Item FocusedItem
|
||||||
|
Item PickingItem
|
||||||
|
String Name
|
||||||
|
String DisplayName
|
||||||
|
String LogName
|
||||||
|
CharacterInventory Inventory
|
||||||
|
CauseOfDeath CauseOfDeath
|
||||||
+266
-4
@@ -9,6 +9,8 @@ Barotrauma source code: [Character.cs](https://github.com/evilfactory/Barotrauma
|
|||||||
-- @pragma nostrip
|
-- @pragma nostrip
|
||||||
|
|
||||||
local Character = {}
|
local Character = {}
|
||||||
|
-- @field public name string @add name field to class Car, you'll see it in code completion
|
||||||
|
|
||||||
|
|
||||||
--- Creates a Character using CharacterInfo.
|
--- Creates a Character using CharacterInfo.
|
||||||
-- @treturn Character
|
-- @treturn Character
|
||||||
@@ -20,7 +22,267 @@ local Character = {}
|
|||||||
function Character.Create(characterInfo, position, seed, id, isRemotePlayer, hasAi, ragdollParams) end
|
function Character.Create(characterInfo, position, seed, id, isRemotePlayer, hasAi, ragdollParams) end
|
||||||
|
|
||||||
|
|
||||||
--- List of all characters.
|
--- Teleports a character to a position.
|
||||||
-- @treturn table
|
-- @realm server
|
||||||
-- @realm shared
|
-- @tparam Vector2 position
|
||||||
Character.CharacterList = {}
|
-- @usage
|
||||||
|
-- Character.CharacterList[1].TeleportTo(CreateVector2(0, 0)) -- teleports first created characters to 0, 0
|
||||||
|
function TeleportTo(position) end
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Character.CharacterList, List of all characters.
|
||||||
|
-- @realm shared
|
||||||
|
-- @table Character.CharacterList
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
-- IsRemotelyControlled, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool IsRemotelyControlled
|
||||||
|
|
||||||
|
---
|
||||||
|
-- IsObserving, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool IsObserving
|
||||||
|
|
||||||
|
---
|
||||||
|
-- IsBot, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool IsBot
|
||||||
|
|
||||||
|
---
|
||||||
|
-- IsDead, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool IsDead
|
||||||
|
|
||||||
|
---
|
||||||
|
-- IsHuman, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool IsHuman
|
||||||
|
|
||||||
|
---
|
||||||
|
-- IsMale, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool IsMale
|
||||||
|
|
||||||
|
---
|
||||||
|
-- IsFemale, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool IsFemale
|
||||||
|
|
||||||
|
---
|
||||||
|
-- CanSpeak, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool CanSpeak
|
||||||
|
|
||||||
|
---
|
||||||
|
-- NeedsAir, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool NeedsAir
|
||||||
|
|
||||||
|
---
|
||||||
|
-- NeedsWater, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool NeedsWater
|
||||||
|
|
||||||
|
---
|
||||||
|
-- NeedsOxygen, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool NeedsOxygen
|
||||||
|
|
||||||
|
---
|
||||||
|
-- IsTraitor, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool IsTraitor
|
||||||
|
|
||||||
|
---
|
||||||
|
-- HideFace, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool HideFace
|
||||||
|
|
||||||
|
---
|
||||||
|
-- LockHands, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool LockHands
|
||||||
|
|
||||||
|
---
|
||||||
|
-- CanMove, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool CanMove
|
||||||
|
|
||||||
|
---
|
||||||
|
-- CanInteract, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool CanInteract
|
||||||
|
|
||||||
|
---
|
||||||
|
-- ObstructVision, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool ObstructVision
|
||||||
|
|
||||||
|
---
|
||||||
|
-- IsRagdolled, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool IsRagdolled
|
||||||
|
|
||||||
|
---
|
||||||
|
-- IsIncapacitated, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool IsIncapacitated
|
||||||
|
|
||||||
|
---
|
||||||
|
-- IsUnconscious, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool IsUnconscious
|
||||||
|
|
||||||
|
---
|
||||||
|
-- IsPet, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool IsPet
|
||||||
|
|
||||||
|
---
|
||||||
|
-- UseHullOxygen, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool UseHullOxygen
|
||||||
|
|
||||||
|
---
|
||||||
|
-- CanBeSelected, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool CanBeSelected
|
||||||
|
|
||||||
|
---
|
||||||
|
-- CanBeDragged, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool CanBeDragged
|
||||||
|
|
||||||
|
---
|
||||||
|
-- CanInventoryBeAccessed, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool CanInventoryBeAccessed
|
||||||
|
|
||||||
|
---
|
||||||
|
-- GodMode, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool GodMode
|
||||||
|
|
||||||
|
---
|
||||||
|
-- IsInFriendlySub, returns a bool.
|
||||||
|
-- @realm shared
|
||||||
|
-- @bool IsInFriendlySub
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Position, returns a Vector2.
|
||||||
|
-- @realm shared
|
||||||
|
-- @Vector2 Position
|
||||||
|
|
||||||
|
---
|
||||||
|
-- DrawPosition, returns a Vector2.
|
||||||
|
-- @realm shared
|
||||||
|
-- @Vector2 DrawPosition
|
||||||
|
|
||||||
|
---
|
||||||
|
-- CursorPosition, returns a Vector2.
|
||||||
|
-- @realm shared
|
||||||
|
-- @Vector2 CursorPosition
|
||||||
|
|
||||||
|
---
|
||||||
|
-- SmoothedCursorPosition, returns a Vector2.
|
||||||
|
-- @realm shared
|
||||||
|
-- @Vector2 SmoothedCursorPosition
|
||||||
|
|
||||||
|
---
|
||||||
|
-- CursorWorldPosition, returns a Vector2.
|
||||||
|
-- @realm shared
|
||||||
|
-- @Vector2 CursorWorldPosition
|
||||||
|
|
||||||
|
---
|
||||||
|
-- LowPassMultiplier, returns a number.
|
||||||
|
-- @realm shared
|
||||||
|
-- @number LowPassMultiplier
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Oxygen, returns a number.
|
||||||
|
-- @realm shared
|
||||||
|
-- @number Oxygen
|
||||||
|
|
||||||
|
---
|
||||||
|
-- OxygenAvailable, returns a number.
|
||||||
|
-- @realm shared
|
||||||
|
-- @number OxygenAvailable
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Stun, returns a number.
|
||||||
|
-- @realm shared
|
||||||
|
-- @number Stun
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Vitality, returns a number.
|
||||||
|
-- @realm shared
|
||||||
|
-- @number Vitality
|
||||||
|
|
||||||
|
---
|
||||||
|
-- MaxVitality, returns a number.
|
||||||
|
-- @realm shared
|
||||||
|
-- @number MaxVitality
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Health, returns a number.
|
||||||
|
-- @realm shared
|
||||||
|
-- @number Health
|
||||||
|
|
||||||
|
---
|
||||||
|
-- HealthPercentage, returns a number.
|
||||||
|
-- @realm shared
|
||||||
|
-- @number HealthPercentage
|
||||||
|
|
||||||
|
---
|
||||||
|
-- SpeechImpediment, returns a number.
|
||||||
|
-- @realm shared
|
||||||
|
-- @number SpeechImpediment
|
||||||
|
|
||||||
|
---
|
||||||
|
-- PressureTimer, returns a number.
|
||||||
|
-- @realm shared
|
||||||
|
-- @number PressureTimer
|
||||||
|
|
||||||
|
---
|
||||||
|
-- CurrentSpeed, returns a number.
|
||||||
|
-- @realm shared
|
||||||
|
-- @number CurrentSpeed
|
||||||
|
|
||||||
|
---
|
||||||
|
-- FocusedItem, returns a Item.
|
||||||
|
-- @realm shared
|
||||||
|
-- @Item FocusedItem
|
||||||
|
|
||||||
|
---
|
||||||
|
-- PickingItem, returns a Item.
|
||||||
|
-- @realm shared
|
||||||
|
-- @Item PickingItem
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Name, returns a string.
|
||||||
|
-- @realm shared
|
||||||
|
-- @string Name
|
||||||
|
|
||||||
|
---
|
||||||
|
-- DisplayName, returns a string.
|
||||||
|
-- @realm shared
|
||||||
|
-- @string DisplayName
|
||||||
|
|
||||||
|
---
|
||||||
|
-- LogName, returns a string.
|
||||||
|
-- @realm shared
|
||||||
|
-- @string LogName
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Inventory, returns a CharacterInventory.
|
||||||
|
-- @realm shared
|
||||||
|
-- @CharacterInventory Inventory
|
||||||
|
|
||||||
|
---
|
||||||
|
-- CauseOfDeath, returns a CauseOfDeath.
|
||||||
|
-- @realm shared
|
||||||
|
-- @CauseOfDeath CauseOfDeath
|
||||||
+11
-8
@@ -31,12 +31,15 @@ function Client:CheckPermission(permissions) end
|
|||||||
function Client.Unban(player, endpoint) end
|
function Client.Unban(player, endpoint) end
|
||||||
|
|
||||||
|
|
||||||
--- List of all connected clients.
|
|
||||||
-- @treturn table
|
|
||||||
-- @realm shared
|
|
||||||
Client.ClientList = {}
|
|
||||||
|
|
||||||
--- The Character that the client is currently controlling.
|
---
|
||||||
-- @treturn Character
|
-- List of all connected clients.
|
||||||
-- @realm shared
|
-- @realm shared
|
||||||
Character = {}
|
-- @Character Client.ClientList Table containing characters
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Character that the client is currently controlling.
|
||||||
|
-- @realm shared
|
||||||
|
-- @Character Character
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,13 @@ function Item:GetComponentString(componentName) end
|
|||||||
-- @realm server
|
-- @realm server
|
||||||
function Item:SendSignal(signalOrString, connectionOrConnectionName) end
|
function Item: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
|
||||||
|
|
||||||
--- List of all items.
|
--- List of all items.
|
||||||
-- @treturn table
|
-- @treturn table
|
||||||
-- @realm shared
|
-- @realm shared
|
||||||
|
|||||||
Reference in New Issue
Block a user