add LimbType, fix broken links in docs and improve docs in general

This commit is contained in:
Evil Factory
2022-01-29 21:00:22 -03:00
parent aec4d5482e
commit 28b08becd1
12 changed files with 1082 additions and 3 deletions

View File

@@ -0,0 +1,576 @@
-- 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
--- 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
--- 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
--- 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
--- GetLimb
-- @realm shared
-- @tparam LimbType limbType
-- @tparam bool excludeSevered
-- @treturn Limb
function GetLimb(limbType, excludeSevered) 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
---
-- 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

View File

@@ -0,0 +1,335 @@
-- 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
--- GetAfflictionOfType
-- @realm shared
-- @tparam string 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
--- ReduceAffliction
-- @realm shared
-- @tparam Limb targetLimb
-- @tparam string afflictionIdentifier
-- @tparam number amount
-- @tparam Nullable`1 treatmentAction
function ReduceAffliction(targetLimb, afflictionIdentifier, 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
---
-- 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
---
-- Character, Field of type Character
-- @realm shared
-- @Character Character
---
-- Unkillable, Field of type bool
-- @realm shared
-- @bool Unkillable
---
-- DefaultFaceTint, Field of type Color
-- @realm shared
-- @Color DefaultFaceTint
---
-- CharacterHealth.InsufficientOxygenThreshold, Field of type number
-- @realm shared
-- @number CharacterHealth.InsufficientOxygenThreshold
---
-- CharacterHealth.LowOxygenThreshold, Field of type number
-- @realm shared
-- @number CharacterHealth.LowOxygenThreshold

View File

@@ -37,6 +37,14 @@ function CheckPermission(permissions) end
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