register bunch of components and fix enumerations in documentation

This commit is contained in:
Evil Factory
2021-11-26 22:56:29 -03:00
parent a5721295bc
commit 878dbb30bc
15 changed files with 174 additions and 77 deletions

View File

@@ -18,7 +18,6 @@ RegisterBarotrauma("InputType")
RegisterBarotrauma("Job")
RegisterBarotrauma("JobPrefab")
RegisterBarotrauma("Level")
RegisterBarotrauma("Items.Components.Steering")
RegisterBarotrauma("Networking.ServerLog+MessageType")
RegisterBarotrauma("WayPoint")
RegisterBarotrauma("Character")
@@ -72,7 +71,42 @@ RegisterBarotrauma("Items.Components.Reactor")
RegisterBarotrauma("Items.Components.RelayComponent")
RegisterBarotrauma("Items.Components.MemoryComponent")
RegisterBarotrauma("Items.Components.Engine")
RegisterBarotrauma("Items.Components.Growable")
RegisterBarotrauma("Items.Components.MeleeWeapon")
RegisterBarotrauma("Items.Components.IdCard")
RegisterBarotrauma("Items.Components.Steering")
RegisterBarotrauma("Items.Components.Wire")
RegisterBarotrauma("Items.Components.Turret")
RegisterBarotrauma("Items.Components.Sprayer")
RegisterBarotrauma("Items.Components.SonarTransducer")
RegisterBarotrauma("Items.Components.Powered")
RegisterBarotrauma("Items.Components.PowerTransfer")
RegisterBarotrauma("Items.Components.Planter")
RegisterBarotrauma("Items.Components.OxygenGenerator")
RegisterBarotrauma("Items.Components.OutpostTerminal")
RegisterBarotrauma("Items.Components.Ladder")
RegisterBarotrauma("Items.Components.ElectricalDischarger")
RegisterBarotrauma("Items.Components.Door")
RegisterBarotrauma("Items.Components.DockingPort")
RegisterBarotrauma("Items.Components.Deconstructor")
RegisterBarotrauma("Items.Components.Connection")
RegisterBarotrauma("Items.Components.ConnectionPanel")
RegisterBarotrauma("Items.Components.GeneticMaterial")
RegisterBarotrauma("Items.Components.GrowthSideExtension")
RegisterBarotrauma("Items.Components.ButtonTerminal")
RegisterBarotrauma("Items.Components.Propulsion")
RegisterBarotrauma("Items.Components.Pump")
RegisterBarotrauma("Items.Components.RangedWeapon")
RegisterBarotrauma("Items.Components.Terminal")
RegisterBarotrauma("Items.Components.Throwable")
RegisterBarotrauma("Items.Components.Wearable")
RegisterBarotrauma("Items.Components.SmokeDetector")
RegisterBarotrauma("Items.Components.Repairable")
RegisterBarotrauma("Items.Components.RepairTool")
RegisterBarotrauma("Items.Components.NameTag")
RegisterBarotrauma("Items.Components.LevelResource")
RegisterBarotrauma("Items.Components.NameTag")
RegisterBarotrauma("Items.Components.NameTag")
RegisterBarotrauma("AIController")
RegisterBarotrauma("EnemyAIController")

View File

@@ -54,6 +54,9 @@ namespace Barotrauma
if (type.StartsWith("Func"))
return "function";
if (type.StartsWith("IEnumerable"))
return "Enumerable";
return type;
}

View File

@@ -65,6 +65,7 @@ tparam_alias("JobPrefab", "JobPrefab")
tparam_alias("Job", "Job")
tparam_alias("Inventory", "Inventory")
tparam_alias("Camera", "Camera")
tparam_alias("Enumerable", "Enumerable")
tparam_alias("string", "string")

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

View File

@@ -71,7 +71,7 @@ function SpawnInventoryItems(inventory, itemData) end
--- GetAttackContexts
-- @realm shared
-- @treturn IEnumerable`1
-- @treturn Enumerable
function GetAttackContexts() end
--- GetVisibleHulls
@@ -131,7 +131,7 @@ function HasTalent(identifier) end
--- GetFriendlyCrew
-- @realm shared
-- @tparam Character character
-- @treturn IEnumerable`1
-- @treturn Enumerable
function Character.GetFriendlyCrew(character) end
--- HasTalents
@@ -363,10 +363,10 @@ function CanAccessInventory(inventory) end
-- @realm shared
-- @tparam Int32& itemIndex
-- @tparam Item& targetItem
-- @tparam IEnumerable`1 identifiers
-- @tparam Enumerable identifiers
-- @tparam bool ignoreBroken
-- @tparam IEnumerable`1 ignoredItems
-- @tparam IEnumerable`1 ignoredContainerIdentifiers
-- @tparam Enumerable ignoredItems
-- @tparam Enumerable ignoredContainerIdentifiers
-- @tparam function customPredicate
-- @tparam function customPriorityFunction
-- @tparam number maxItemDistance
@@ -559,7 +559,7 @@ function TrySeverLimbJoints(targetLimb, severLimbsProbability, damage, allowBehe
--- AddDamage
-- @realm shared
-- @tparam Vector2 worldPosition
-- @tparam IEnumerable`1 afflictions
-- @tparam Enumerable afflictions
-- @tparam number stun
-- @tparam bool playSound
-- @tparam number attackImpulse
@@ -571,7 +571,7 @@ function AddDamage(worldPosition, afflictions, stun, playSound, attackImpulse, a
--- AddDamage
-- @realm shared
-- @tparam Vector2 worldPosition
-- @tparam IEnumerable`1 afflictions
-- @tparam Enumerable afflictions
-- @tparam number stun
-- @tparam bool playSound
-- @tparam number attackImpulse
@@ -595,7 +595,7 @@ function AddEncounter(other) end
-- @realm shared
-- @tparam Vector2 worldPosition
-- @tparam Limb hitLimb
-- @tparam IEnumerable`1 afflictions
-- @tparam Enumerable afflictions
-- @tparam number stun
-- @tparam bool playSound
-- @tparam number attackImpulse
@@ -856,9 +856,9 @@ function GetHashCode() end
-- @bool IsInstigator
---
-- LastAttackers, Field of type IEnumerable`1
-- LastAttackers, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 LastAttackers
-- @Enumerable LastAttackers
---
-- LastAttacker, Field of type Character
@@ -1076,9 +1076,9 @@ function GetHashCode() end
-- @Character SelectedBy
---
-- HeldItems, Field of type IEnumerable`1
-- HeldItems, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 HeldItems
-- @Enumerable HeldItems
---
-- LowPassMultiplier, Field of type number

View File

@@ -20,7 +20,7 @@ function LoadHeadAttachments() end
--- AddEmpty
-- @realm shared
-- @tparam IEnumerable`1 elements
-- @tparam Enumerable elements
-- @tparam WearableType type
-- @tparam number commonness
-- @treturn table
@@ -28,7 +28,7 @@ function CharacterInfo.AddEmpty(elements, type, commonness) end
--- GetRandomElement
-- @realm shared
-- @tparam IEnumerable`1 elements
-- @tparam Enumerable elements
-- @treturn XElement
function GetRandomElement(elements) end
@@ -211,12 +211,12 @@ function ServerWrite(msg) end
--- GetUnlockedTalentsInTree
-- @realm shared
-- @treturn IEnumerable`1
-- @treturn Enumerable
function GetUnlockedTalentsInTree() end
--- GetEndocrineTalents
-- @realm shared
-- @treturn IEnumerable`1
-- @treturn Enumerable
function GetEndocrineTalents() end
--- CheckDisguiseStatus
@@ -267,18 +267,18 @@ function GetIdentifierUsingOriginalName() end
--- FilterByTypeAndHeadID
-- @realm shared
-- @tparam IEnumerable`1 elements
-- @tparam Enumerable elements
-- @tparam WearableType targetType
-- @tparam number headSpriteId
-- @treturn IEnumerable`1
-- @treturn Enumerable
function FilterByTypeAndHeadID(elements, targetType, headSpriteId) end
--- FilterElementsByGenderAndRace
-- @realm shared
-- @tparam IEnumerable`1 elements
-- @tparam Enumerable elements
-- @tparam Gender gender
-- @tparam Race race
-- @treturn IEnumerable`1
-- @treturn Enumerable
function FilterElementsByGenderAndRace(elements, gender, race) end
--- IsMatchingGender
@@ -498,9 +498,9 @@ function GetHashCode() end
-- @bool IsAttachmentsLoaded
---
-- Wearables, Field of type IEnumerable`1
-- Wearables, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 Wearables
-- @Enumerable Wearables
---
-- InventoryData, Field of type XElement

View File

@@ -64,7 +64,7 @@ function RemoveItem(item, tryEquipFromSameStack) end
-- @realm shared
-- @tparam Item item
-- @tparam Character user
-- @tparam IEnumerable`1 allowedSlots
-- @tparam Enumerable allowedSlots
-- @tparam bool createNetworkEvent
-- @treturn bool
function TryPutItemWithAutoEquipCheck(item, user, allowedSlots, createNetworkEvent) end
@@ -73,7 +73,7 @@ function TryPutItemWithAutoEquipCheck(item, user, allowedSlots, createNetworkEve
-- @realm shared
-- @tparam Item item
-- @tparam Character user
-- @tparam IEnumerable`1 allowedSlots
-- @tparam Enumerable allowedSlots
-- @tparam bool createNetworkEvent
-- @tparam bool ignoreCondition
-- @treturn bool
@@ -137,7 +137,7 @@ function GetItemAt(index) end
--- GetItemsAt
-- @realm shared
-- @tparam number index
-- @treturn IEnumerable`1
-- @treturn Enumerable
function GetItemsAt(index) end
--- FindIndex
@@ -292,14 +292,14 @@ function GetHashCode() end
-- @bool AccessibleWhenAlive
---
-- AllItems, Field of type IEnumerable`1
-- AllItems, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 AllItems
-- @Enumerable AllItems
---
-- AllItemsMod, Field of type IEnumerable`1
-- AllItemsMod, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 AllItemsMod
-- @Enumerable AllItemsMod
---
-- Capacity, Field of type number

View File

@@ -10,7 +10,7 @@ Barotrauma source code: [Entity.cs](https://github.com/evilfactory/Barotrauma-lu
--- GetEntities
-- @realm shared
-- @treturn IEnumerable`1
-- @treturn Enumerable
function Entity.GetEntities() end
--- FindFreeID

View File

@@ -77,7 +77,7 @@ function EnforceMissionOrder(missionIdentifiers) end
--- GetSessionCrewCharacters
-- @realm shared
-- @treturn IEnumerable`1
-- @treturn Enumerable
function GameSession.GetSessionCrewCharacters() end
--- EndRound
@@ -131,9 +131,9 @@ function Equals(obj) end
function GetHashCode() end
---
-- Missions, Field of type IEnumerable`1
-- Missions, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 Missions
-- @Enumerable Missions
---
-- IsRunning, Field of type bool

View File

@@ -46,7 +46,7 @@ function GetItemAt(index) end
--- GetItemsAt
-- @realm shared
-- @tparam number index
-- @treturn IEnumerable`1
-- @treturn Enumerable
function GetItemsAt(index) end
--- FindIndex
@@ -124,7 +124,7 @@ function HowManyCanBePut(itemPrefab, i, condition) end
-- @realm shared
-- @tparam Item item
-- @tparam Character user
-- @tparam IEnumerable`1 allowedSlots
-- @tparam Enumerable allowedSlots
-- @tparam bool createNetworkEvent
-- @tparam bool ignoreCondition
-- @treturn bool
@@ -235,14 +235,14 @@ function Equals(obj) end
function GetHashCode() end
---
-- AllItems, Field of type IEnumerable`1
-- AllItems, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 AllItems
-- @Enumerable AllItems
---
-- AllItemsMod, Field of type IEnumerable`1
-- AllItemsMod, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 AllItemsMod
-- @Enumerable AllItemsMod
---
-- Capacity, Field of type number

View File

@@ -271,7 +271,7 @@ function GetComponent() end
--- GetComponents
-- @realm shared
-- @treturn IEnumerable`1
-- @treturn Enumerable
function GetComponents() end
--- GetQualityModifier
@@ -381,12 +381,12 @@ function ReplaceTag(tag, newTag) end
--- GetTags
-- @realm shared
-- @treturn IEnumerable`1
-- @treturn Enumerable
function GetTags() end
--- HasTag
-- @realm shared
-- @tparam IEnumerable`1 allowedTags
-- @tparam Enumerable allowedTags
-- @treturn bool
function HasTag(allowedTags) end
@@ -879,9 +879,9 @@ function GetHashCode() end
-- @string ConfigFile
---
-- AllowedSlots, Field of type IEnumerable`1
-- AllowedSlots, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 AllowedSlots
-- @Enumerable AllowedSlots
---
-- Connections, Field of type table
@@ -889,9 +889,9 @@ function GetHashCode() end
-- @table Connections
---
-- ContainedItems, Field of type IEnumerable`1
-- ContainedItems, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 ContainedItems
-- @Enumerable ContainedItems
---
-- OwnInventory, Field of type ItemInventory
@@ -904,14 +904,14 @@ function GetHashCode() end
-- @bool DisplaySideBySideWhenLinked
---
-- Repairables, Field of type IEnumerable`1
-- Repairables, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 Repairables
-- @Enumerable Repairables
---
-- Components, Field of type IEnumerable`1
-- Components, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 Components
-- @Enumerable Components
---
-- Linkable, Field of type bool
@@ -939,9 +939,9 @@ function GetHashCode() end
-- @ItemPrefab PendingItemSwap
---
-- AllPropertyObjects, Field of type IEnumerable`1
-- AllPropertyObjects, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 AllPropertyObjects
-- @Enumerable AllPropertyObjects
---
-- OrderedToBeIgnored, Field of type bool

View File

@@ -49,7 +49,7 @@ function IsFull(takeStacksIntoAccount) end
-- @realm shared
-- @tparam Item item
-- @tparam Character user
-- @tparam IEnumerable`1 allowedSlots
-- @tparam Enumerable allowedSlots
-- @tparam bool createNetworkEvent
-- @tparam bool ignoreCondition
-- @treturn bool
@@ -115,7 +115,7 @@ function GetItemAt(index) end
--- GetItemsAt
-- @realm shared
-- @tparam number index
-- @treturn IEnumerable`1
-- @treturn Enumerable
function GetItemsAt(index) end
--- FindIndex
@@ -240,14 +240,14 @@ function GetHashCode() end
-- @ItemContainer Container
---
-- AllItems, Field of type IEnumerable`1
-- AllItems, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 AllItems
-- @Enumerable AllItems
---
-- AllItemsMod, Field of type IEnumerable`1
-- AllItemsMod, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 AllItemsMod
-- @Enumerable AllItemsMod
---
-- Capacity, Field of type number

View File

@@ -48,7 +48,7 @@ function ItemPrefab.LoadFromFile(file) end
--- LoadAll
-- @realm shared
-- @tparam IEnumerable`1 files
-- @tparam Enumerable files
function ItemPrefab.LoadAll(files) end
--- InitFabricationRecipes
@@ -125,15 +125,15 @@ function IsContainerPreferred(item, identifiersOrTags, isPreferencesDefined, isS
--- IsContainerPreferred
-- @realm shared
-- @tparam IEnumerable`1 preferences
-- @tparam Enumerable preferences
-- @tparam ItemContainer c
-- @treturn bool
function ItemPrefab.IsContainerPreferred(preferences, c) end
--- IsContainerPreferred
-- @realm shared
-- @tparam IEnumerable`1 preferences
-- @tparam IEnumerable`1 ids
-- @tparam Enumerable preferences
-- @tparam Enumerable ids
-- @treturn bool
function ItemPrefab.IsContainerPreferred(preferences, ids) end
@@ -195,7 +195,7 @@ function NameMatches(name, comparisonType) end
--- NameMatches
-- @realm shared
-- @tparam IEnumerable`1 allowedNames
-- @tparam Enumerable allowedNames
-- @tparam StringComparison comparisonType
-- @treturn bool
function NameMatches(allowedNames, comparisonType) end
@@ -478,9 +478,9 @@ function GetHashCode() end
-- @bool AllowDroppingOnSwap
---
-- AllowDroppingOnSwapWith, Field of type IEnumerable`1
-- AllowDroppingOnSwapWith, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 AllowDroppingOnSwapWith
-- @Enumerable AllowDroppingOnSwapWith
---
-- Size, Field of type Vector2

View File

@@ -28,7 +28,7 @@ function JobPrefab.Random(sync) end
--- LoadAll
-- @realm shared
-- @tparam IEnumerable`1 files
-- @tparam Enumerable files
function JobPrefab.LoadAll(files) end
--- LoadFromFile

View File

@@ -35,7 +35,7 @@ function Submarine.Load(info, unloadPrevious, linkedRemap) end
--- RepositionEntities
-- @realm shared
-- @tparam Vector2 moveAmount
-- @tparam IEnumerable`1 entities
-- @tparam Enumerable entities
function Submarine.RepositionEntities(moveAmount, entities) end
--- SaveToXElement
@@ -181,7 +181,7 @@ function Submarine.RectsOverlap(rect1, rect2, inclusive) end
-- @realm shared
-- @tparam Vector2 rayStart
-- @tparam Vector2 rayEnd
-- @tparam IEnumerable`1 ignoredBodies
-- @tparam Enumerable ignoredBodies
-- @tparam Nullable`1 collisionCategory
-- @tparam bool ignoreSensors
-- @tparam Predicate`1 customPredicate
@@ -199,12 +199,12 @@ function Submarine.LastPickedBodyDist(body) end
-- @realm shared
-- @tparam Vector2 rayStart
-- @tparam Vector2 rayEnd
-- @tparam IEnumerable`1 ignoredBodies
-- @tparam Enumerable ignoredBodies
-- @tparam Nullable`1 collisionCategory
-- @tparam bool ignoreSensors
-- @tparam Predicate`1 customPredicate
-- @tparam bool allowInsideFixture
-- @treturn IEnumerable`1
-- @treturn Enumerable
function Submarine.PickBodies(rayStart, rayEnd, ignoredBodies, collisionCategory, ignoreSensors, customPredicate, allowInsideFixture) end
--- CheckVisibility
@@ -331,8 +331,8 @@ function GetCargoContainers() end
--- GetEntities
-- @realm shared
-- @tparam bool includingConnectedSubs
-- @tparam IEnumerable`1 list
-- @treturn IEnumerable`1
-- @tparam Enumerable list
-- @treturn Enumerable
function GetEntities(includingConnectedSubs, list) end
--- IsEntityFoundOnThisSub
@@ -385,14 +385,14 @@ function GetHashCode() end
-- @Submarine Submarine.MainSub
---
-- Submarine.VisibleEntities, Field of type IEnumerable`1
-- Submarine.VisibleEntities, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 Submarine.VisibleEntities
-- @Enumerable Submarine.VisibleEntities
---
-- DockedTo, Field of type IEnumerable`1
-- DockedTo, Field of type Enumerable
-- @realm shared
-- @IEnumerable`1 DockedTo
-- @Enumerable DockedTo
---
-- Submarine.LastPickedPosition, Field of type Vector2