update docs

This commit is contained in:
Evil Factory
2022-04-19 22:54:34 -03:00
parent 7a440e009b
commit 928428cabd
29 changed files with 1209 additions and 991 deletions
+1
View File
@@ -67,6 +67,7 @@ tparam_alias("CharacterInventory", "CharacterInventory")
tparam_alias("ItemInventory", "ItemInventory") tparam_alias("ItemInventory", "ItemInventory")
tparam_alias("Camera", "Camera") tparam_alias("Camera", "Camera")
tparam_alias("Enumerable", "Enumerable") tparam_alias("Enumerable", "Enumerable")
tparam_alias("Identifier", "Identifier")
tparam_alias("string", "string") tparam_alias("string", "string")
+1 -1
View File
@@ -1,7 +1,7 @@
-- luacheck: ignore 111 -- luacheck: ignore 111
--[[-- --[[--
Barotrauma Character class with some additional functions and fields 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) Barotrauma source code: [Client.cs](https://github.com/evilfactory/Barotrauma-lua-attempt/blob/master/Barotrauma/BarotraumaShared/SharedSource/Networking/Client.cs)
]] ]]
+4 -4
View File
@@ -98,9 +98,9 @@ function CalculateDamagePerSecond(currentVitalityDecrease) end
--- GetResistance --- GetResistance
-- @realm shared -- @realm shared
-- @tparam AfflictionPrefab affliction -- @tparam Identifier afflictionId
-- @treturn number -- @treturn number
function GetResistance(affliction) end function GetResistance(afflictionId) end
--- GetSpeedMultiplier --- GetSpeedMultiplier
-- @realm shared -- @realm shared
@@ -201,9 +201,9 @@ function GetHashCode() end
-- @number NonClampedStrength -- @number NonClampedStrength
--- ---
-- Identifier, Field of type string -- Identifier, Field of type Identifier
-- @realm shared -- @realm shared
-- @string Identifier -- @Identifier Identifier
--- ---
-- Probability, Field of type number -- Probability, Field of type number
+91 -95
View File
@@ -11,20 +11,21 @@ local AfflictionPrefab = {}
-- @realm shared -- @realm shared
function Dispose() end function Dispose() end
--- LoadAll --- LoadAllEffects
-- @realm shared -- @realm shared
-- @tparam Enumerable files function AfflictionPrefab.LoadAllEffects() end
function AfflictionPrefab.LoadAll(files) end
--- LoadFromFile --- ClearAllEffects
-- @realm shared -- @realm shared
-- @tparam ContentFile file function AfflictionPrefab.ClearAllEffects() end
function AfflictionPrefab.LoadFromFile(file) end
--- RemoveByFile --- LoadEffects
-- @realm shared -- @realm shared
-- @tparam string filePath function LoadEffects() end
function AfflictionPrefab.RemoveByFile(filePath) end
--- ClearEffects
-- @realm shared
function ClearEffects() end
--- ToString --- ToString
-- @realm shared -- @realm shared
@@ -66,36 +67,56 @@ function Equals(obj) end
-- @treturn number -- @treturn number
function GetHashCode() end 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 -- AfflictionPrefab.List, Field of type Enumerable
-- @realm shared -- @realm shared
-- @Enumerable AfflictionPrefab.List -- @Enumerable AfflictionPrefab.List
---
-- FilePath, Field of type string
-- @realm shared
-- @string FilePath
---
-- UIntIdentifier, Field of type number
-- @realm shared
-- @number UIntIdentifier
---
-- Identifier, Field of type string
-- @realm shared
-- @string Identifier
---
-- OriginalName, Field of type string
-- @realm shared
-- @string OriginalName
---
-- ContentPackage, Field of type ContentPackage
-- @realm shared
-- @ContentPackage ContentPackage
--- ---
-- Effects, Field of type Enumerable -- Effects, Field of type Enumerable
-- @realm shared -- @realm shared
@@ -112,14 +133,24 @@ function GetHashCode() end
-- @Enumerable TreatmentSuitability -- @Enumerable TreatmentSuitability
--- ---
-- AfflictionPrefab.ListArray, Field of type AfflictionPrefab[] -- UintIdentifier, Field of type number
-- @realm shared -- @realm shared
-- @AfflictionPrefab[] AfflictionPrefab.ListArray -- @number UintIdentifier
--- ---
-- AfflictionType, Field of type string -- ContentPackage, Field of type ContentPackage
-- @realm shared -- @realm shared
-- @string AfflictionType -- @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 -- LimbSpecific, Field of type bool
@@ -132,19 +163,19 @@ function GetHashCode() end
-- @LimbType IndicatorLimb -- @LimbType IndicatorLimb
--- ---
-- Name, Field of type string -- Name, Field of type LocalizedString
-- @realm shared -- @realm shared
-- @string Name -- @LocalizedString Name
--- ---
-- Description, Field of type string -- Description, Field of type LocalizedString
-- @realm shared -- @realm shared
-- @string Description -- @LocalizedString Description
--- ---
-- TranslationOverride, Field of type string -- TranslationIdentifier, Field of type Identifier
-- @realm shared -- @realm shared
-- @string TranslationOverride -- @Identifier TranslationIdentifier
--- ---
-- IsBuff, Field of type bool -- IsBuff, Field of type bool
@@ -167,14 +198,14 @@ function GetHashCode() end
-- @number BaseHealCost -- @number BaseHealCost
--- ---
-- CauseOfDeathDescription, Field of type string -- CauseOfDeathDescription, Field of type LocalizedString
-- @realm shared -- @realm shared
-- @string CauseOfDeathDescription -- @LocalizedString CauseOfDeathDescription
--- ---
-- SelfCauseOfDeathDescription, Field of type string -- SelfCauseOfDeathDescription, Field of type LocalizedString
-- @realm shared -- @realm shared
-- @string SelfCauseOfDeathDescription -- @LocalizedString SelfCauseOfDeathDescription
--- ---
-- ActivationThreshold, Field of type number -- ActivationThreshold, Field of type number
@@ -227,9 +258,9 @@ function GetHashCode() end
-- @number DamageOverlayAlpha -- @number DamageOverlayAlpha
--- ---
-- AchievementOnRemoved, Field of type string -- AchievementOnRemoved, Field of type Identifier
-- @realm shared -- @realm shared
-- @string AchievementOnRemoved -- @Identifier AchievementOnRemoved
--- ---
-- Icon, Field of type Sprite -- Icon, Field of type Sprite
@@ -251,53 +282,18 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @bool AfflictionOverlayAlphaIsLinear -- @bool AfflictionOverlayAlphaIsLinear
---
-- 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.Prefabs, Field of type PrefabCollection`1 -- AfflictionPrefab.Prefabs, Field of type PrefabCollection`1
-- @realm shared -- @realm shared
-- @PrefabCollection`1 AfflictionPrefab.Prefabs -- @PrefabCollection`1 AfflictionPrefab.Prefabs
---
-- Identifier, Field of type Identifier
-- @realm shared
-- @Identifier Identifier
---
-- ContentFile, Field of type ContentFile
-- @realm shared
-- @ContentFile ContentFile
+12 -7
View File
@@ -93,6 +93,13 @@ function ApplyTestPose() end
-- @tparam RagdollParams ragdollParams -- @tparam RagdollParams ragdollParams
function Recreate(ragdollParams) end function Recreate(ragdollParams) end
--- GetLimb
-- @realm shared
-- @tparam LimbType limbType
-- @tparam bool excludeSevered
-- @treturn Limb
function GetLimb(limbType, excludeSevered) end
--- GetMouthPosition --- GetMouthPosition
-- @realm shared -- @realm shared
-- @treturn Nullable`1 -- @treturn Nullable`1
@@ -223,6 +230,11 @@ function Update(deltaTime, cam) end
-- @realm shared -- @realm shared
function ForceRefreshFloorY() end function ForceRefreshFloorY() end
--- GetSurfaceY
-- @realm shared
-- @treturn number
function GetSurfaceY() end
--- SetPosition --- SetPosition
-- @realm shared -- @realm shared
-- @tparam Vector2 simPosition -- @tparam Vector2 simPosition
@@ -236,13 +248,6 @@ function SetPosition(simPosition, lerp, ignorePlatforms, forceMainLimbToCollider
-- @realm shared -- @realm shared
function Hang() end function Hang() end
--- GetLimb
-- @realm shared
-- @tparam LimbType limbType
-- @tparam bool excludeSevered
-- @treturn Limb
function GetLimb(limbType, excludeSevered) end
--- GetType --- GetType
-- @realm shared -- @realm shared
-- @treturn Type -- @treturn Type
+246 -171
View File
@@ -44,6 +44,79 @@ function TeleportTo(worldPos) end
-- @table Character.CharacterList -- @table Character.CharacterList
--- TrySeverLimbJoints
-- @realm shared
-- @tparam Limb targetLimb
-- @tparam number severLimbsProbability
-- @tparam number damage
-- @tparam bool allowBeheading
-- @tparam Character attacker
function TrySeverLimbJoints(targetLimb, severLimbsProbability, damage, allowBeheading, attacker) end
--- AddDamage
-- @realm shared
-- @tparam Vector2 worldPosition
-- @tparam Enumerable afflictions
-- @tparam number stun
-- @tparam bool playSound
-- @tparam number attackImpulse
-- @tparam Character attacker
-- @tparam number damageMultiplier
-- @treturn AttackResult
function AddDamage(worldPosition, afflictions, stun, playSound, attackImpulse, attacker, damageMultiplier) end
--- AddDamage
-- @realm shared
-- @tparam Vector2 worldPosition
-- @tparam Enumerable afflictions
-- @tparam number stun
-- @tparam bool playSound
-- @tparam number attackImpulse
-- @tparam Limb& hitLimb
-- @tparam Character attacker
-- @tparam number damageMultiplier
-- @treturn AttackResult
function AddDamage(worldPosition, afflictions, stun, playSound, attackImpulse, hitLimb, attacker, damageMultiplier) end
--- RecordKill
-- @realm shared
-- @tparam Character target
function RecordKill(target) end
--- AddEncounter
-- @realm shared
-- @tparam Character other
function AddEncounter(other) end
--- DamageLimb
-- @realm shared
-- @tparam Vector2 worldPosition
-- @tparam Limb hitLimb
-- @tparam Enumerable afflictions
-- @tparam number stun
-- @tparam bool playSound
-- @tparam number attackImpulse
-- @tparam Character attacker
-- @tparam number damageMultiplier
-- @tparam bool allowStacking
-- @tparam number penetration
-- @tparam bool shouldImplode
-- @treturn AttackResult
function DamageLimb(worldPosition, hitLimb, afflictions, stun, playSound, attackImpulse, attacker, damageMultiplier, allowStacking, penetration, shouldImplode) end
--- TryAdjustAttackerSkill
-- @realm shared
-- @tparam Character attacker
-- @tparam number healthChange
function TryAdjustAttackerSkill(attacker, healthChange) end
--- SetStun
-- @realm shared
-- @tparam number newStun
-- @tparam bool allowStunDecrease
-- @tparam bool isNetworkMessage
function SetStun(newStun, allowStunDecrease, isNetworkMessage) end
--- ApplyStatusEffects --- ApplyStatusEffects
-- @realm shared -- @realm shared
-- @tparam function actionType -- @tparam function actionType
@@ -84,7 +157,7 @@ function SaveInventory() end
--- SpawnInventoryItems --- SpawnInventoryItems
-- @realm shared -- @realm shared
-- @tparam Inventory inventory -- @tparam Inventory inventory
-- @tparam XElement itemData -- @tparam ContentXElement itemData
function SpawnInventoryItems(inventory, itemData) end function SpawnInventoryItems(inventory, itemData) end
--- GetAttackContexts --- GetAttackContexts
@@ -121,7 +194,7 @@ function LoadTalents() end
--- GiveTalent --- GiveTalent
-- @realm shared -- @realm shared
-- @tparam string talentIdentifier -- @tparam Identifier talentIdentifier
-- @tparam bool addingFirstTime -- @tparam bool addingFirstTime
-- @treturn bool -- @treturn bool
function GiveTalent(talentIdentifier, addingFirstTime) end function GiveTalent(talentIdentifier, addingFirstTime) end
@@ -142,7 +215,7 @@ function GiveTalent(talentPrefab, addingFirstTime) end
--- HasTalent --- HasTalent
-- @realm shared -- @realm shared
-- @tparam string identifier -- @tparam Identifier identifier
-- @treturn bool -- @treturn bool
function HasTalent(identifier) end function HasTalent(identifier) end
@@ -175,7 +248,7 @@ function CheckTalents(abilityEffectType) end
--- HasRecipeForItem --- HasRecipeForItem
-- @realm shared -- @realm shared
-- @tparam string recipeIdentifier -- @tparam Identifier recipeIdentifier
-- @treturn bool -- @treturn bool
function HasRecipeForItem(recipeIdentifier) end function HasRecipeForItem(recipeIdentifier) end
@@ -184,11 +257,6 @@ function HasRecipeForItem(recipeIdentifier) end
-- @tparam number amount -- @tparam number amount
function GiveMoney(amount) end function GiveMoney(amount) end
--- SetMoney
-- @realm shared
-- @tparam number amount
function SetMoney(amount) end
--- GetStatValue --- GetStatValue
-- @realm shared -- @realm shared
-- @tparam StatTypes statType -- @tparam StatTypes statType
@@ -205,12 +273,6 @@ function OnWearablesChanged() end
-- @tparam number value -- @tparam number value
function ChangeStat(statType, value) end function ChangeStat(statType, value) end
--- GetSkillStatType
-- @realm shared
-- @tparam string skillIdentifier
-- @treturn StatTypes
function Character.GetSkillStatType(skillIdentifier) end
--- AddAbilityFlag --- AddAbilityFlag
-- @realm shared -- @realm shared
-- @tparam AbilityFlags abilityFlag -- @tparam AbilityFlags abilityFlag
@@ -235,7 +297,7 @@ function GetAbilityResistance(affliction) end
--- ChangeAbilityResistance --- ChangeAbilityResistance
-- @realm shared -- @realm shared
-- @tparam string resistanceId -- @tparam Identifier resistanceId
-- @tparam number value -- @tparam number value
function ChangeAbilityResistance(resistanceId, value) end function ChangeAbilityResistance(resistanceId, value) end
@@ -256,6 +318,43 @@ function Character.IsFriendly(me, other) end
-- @realm shared -- @realm shared
function ResetNetState() end function ResetNetState() end
--- ClearInput
-- @realm shared
-- @tparam InputType inputType
function ClearInput(inputType) end
--- ClearInputs
-- @realm shared
function ClearInputs() end
--- ToString
-- @realm shared
-- @treturn string
function ToString() end
--- GiveJobItems
-- @realm shared
-- @tparam WayPoint spawnPoint
function GiveJobItems(spawnPoint) end
--- GiveIdCardTags
-- @realm shared
-- @tparam WayPoint spawnPoint
-- @tparam bool createNetworkEvent
function GiveIdCardTags(spawnPoint, createNetworkEvent) end
--- GetSkillLevel
-- @realm shared
-- @tparam string skillIdentifier
-- @treturn number
function GetSkillLevel(skillIdentifier) end
--- GetSkillLevel
-- @realm shared
-- @tparam Identifier skillIdentifier
-- @treturn number
function GetSkillLevel(skillIdentifier) end
--- GetTargetMovement --- GetTargetMovement
-- @realm shared -- @realm shared
-- @treturn Vector2 -- @treturn Vector2
@@ -370,6 +469,14 @@ function HasEquippedItem(item, slotType, predicate) end
-- @treturn bool -- @treturn bool
function HasEquippedItem(tagOrIdentifier, allowBroken, slotType) end function HasEquippedItem(tagOrIdentifier, allowBroken, slotType) end
--- HasEquippedItem
-- @realm shared
-- @tparam Identifier tagOrIdentifier
-- @tparam bool allowBroken
-- @tparam Nullable`1 slotType
-- @treturn bool
function HasEquippedItem(tagOrIdentifier, allowBroken, slotType) end
--- GetEquippedItem --- GetEquippedItem
-- @realm shared -- @realm shared
-- @tparam string tagOrIdentifier -- @tparam string tagOrIdentifier
@@ -431,7 +538,7 @@ function CanInteractWith(item, distanceToItem, checkLinked) end
--- SetCustomInteract --- SetCustomInteract
-- @realm shared -- @realm shared
-- @tparam function onCustomInteract -- @tparam function onCustomInteract
-- @tparam string hudText -- @tparam LocalizedString hudText
function SetCustomInteract(onCustomInteract, hudText) end function SetCustomInteract(onCustomInteract, hudText) end
--- SelectCharacter --- SelectCharacter
@@ -502,32 +609,26 @@ function CanHearCharacter(speaker) end
--- SetOrder --- SetOrder
-- @realm shared -- @realm shared
-- @tparam Order order -- @tparam Order order
-- @tparam string orderOption -- @tparam bool isNewOrder
-- @tparam number priority
-- @tparam Character orderGiver
-- @tparam bool speak -- @tparam bool speak
-- @tparam bool force -- @tparam bool force
function SetOrder(order, orderOption, priority, orderGiver, speak, force) end function SetOrder(order, isNewOrder, speak, force) end
--- SetOrder
-- @realm shared
-- @tparam OrderInfo orderInfo
-- @tparam Character orderGiver
-- @tparam bool speak
-- @tparam bool force
function SetOrder(orderInfo, orderGiver, speak, force) end
--- GetCurrentOrderWithTopPriority --- GetCurrentOrderWithTopPriority
-- @realm shared -- @realm shared
-- @treturn Nullable`1 -- @treturn Order
function GetCurrentOrderWithTopPriority() end function GetCurrentOrderWithTopPriority() end
--- GetCurrentOrder --- GetCurrentOrder
-- @realm shared -- @realm shared
-- @tparam Order order -- @tparam Order order
-- @tparam string option -- @treturn Order
-- @treturn Nullable`1 function GetCurrentOrder(order) end
function GetCurrentOrder(order, option) end
--- DisableLine
-- @realm shared
-- @tparam Identifier identifier
function DisableLine(identifier) end
--- DisableLine --- DisableLine
-- @realm shared -- @realm shared
@@ -539,7 +640,7 @@ function DisableLine(identifier) end
-- @tparam string message -- @tparam string message
-- @tparam Nullable`1 messageType -- @tparam Nullable`1 messageType
-- @tparam number delay -- @tparam number delay
-- @tparam string identifier -- @tparam Identifier identifier
-- @tparam number minDurationBetweenSimilar -- @tparam number minDurationBetweenSimilar
function Speak(message, messageType, delay, identifier, minDurationBetweenSimilar) end function Speak(message, messageType, delay, identifier, minDurationBetweenSimilar) end
@@ -578,79 +679,6 @@ function AddDamage(attacker, worldPosition, attack, deltaTime, playSound) end
-- @treturn AttackResult -- @treturn AttackResult
function ApplyAttack(attacker, worldPosition, attack, deltaTime, playSound, targetLimb, penetration) end function ApplyAttack(attacker, worldPosition, attack, deltaTime, playSound, targetLimb, penetration) end
--- TrySeverLimbJoints
-- @realm shared
-- @tparam Limb targetLimb
-- @tparam number severLimbsProbability
-- @tparam number damage
-- @tparam bool allowBeheading
-- @tparam Character attacker
function TrySeverLimbJoints(targetLimb, severLimbsProbability, damage, allowBeheading, attacker) end
--- AddDamage
-- @realm shared
-- @tparam Vector2 worldPosition
-- @tparam Enumerable afflictions
-- @tparam number stun
-- @tparam bool playSound
-- @tparam number attackImpulse
-- @tparam Character attacker
-- @tparam number damageMultiplier
-- @treturn AttackResult
function AddDamage(worldPosition, afflictions, stun, playSound, attackImpulse, attacker, damageMultiplier) end
--- AddDamage
-- @realm shared
-- @tparam Vector2 worldPosition
-- @tparam Enumerable afflictions
-- @tparam number stun
-- @tparam bool playSound
-- @tparam number attackImpulse
-- @tparam Limb& hitLimb
-- @tparam Character attacker
-- @tparam number damageMultiplier
-- @treturn AttackResult
function AddDamage(worldPosition, afflictions, stun, playSound, attackImpulse, hitLimb, attacker, damageMultiplier) end
--- RecordKill
-- @realm shared
-- @tparam Character target
function RecordKill(target) end
--- AddEncounter
-- @realm shared
-- @tparam Character other
function AddEncounter(other) end
--- DamageLimb
-- @realm shared
-- @tparam Vector2 worldPosition
-- @tparam Limb hitLimb
-- @tparam Enumerable afflictions
-- @tparam number stun
-- @tparam bool playSound
-- @tparam number attackImpulse
-- @tparam Character attacker
-- @tparam number damageMultiplier
-- @tparam bool allowStacking
-- @tparam number penetration
-- @tparam bool shouldImplode
-- @treturn AttackResult
function DamageLimb(worldPosition, hitLimb, afflictions, stun, playSound, attackImpulse, attacker, damageMultiplier, allowStacking, penetration, shouldImplode) end
--- TryAdjustAttackerSkill
-- @realm shared
-- @tparam Character attacker
-- @tparam number healthChange
function TryAdjustAttackerSkill(attacker, healthChange) end
--- SetStun
-- @realm shared
-- @tparam number newStun
-- @tparam bool allowStunDecrease
-- @tparam bool isNetworkMessage
function SetStun(newStun, allowStunDecrease, isNetworkMessage) end
--- Create --- Create
-- @realm shared -- @realm shared
-- @tparam string speciesName -- @tparam string speciesName
@@ -665,6 +693,34 @@ function SetStun(newStun, allowStunDecrease, isNetworkMessage) end
-- @treturn Character -- @treturn Character
function Character.Create(speciesName, position, seed, characterInfo, id, isRemotePlayer, hasAi, createNetworkEvent, ragdoll) end function Character.Create(speciesName, position, seed, characterInfo, id, isRemotePlayer, hasAi, createNetworkEvent, ragdoll) end
--- Create
-- @realm shared
-- @tparam Identifier speciesName
-- @tparam Vector2 position
-- @tparam string seed
-- @tparam CharacterInfo characterInfo
-- @tparam number id
-- @tparam bool isRemotePlayer
-- @tparam bool hasAi
-- @tparam bool createNetworkEvent
-- @tparam RagdollParams ragdoll
-- @treturn Character
function Character.Create(speciesName, position, seed, characterInfo, id, isRemotePlayer, hasAi, createNetworkEvent, ragdoll) end
--- Create
-- @realm shared
-- @tparam CharacterPrefab prefab
-- @tparam Vector2 position
-- @tparam string seed
-- @tparam CharacterInfo characterInfo
-- @tparam number id
-- @tparam bool isRemotePlayer
-- @tparam bool hasAi
-- @tparam bool createNetworkEvent
-- @tparam RagdollParams ragdoll
-- @treturn Character
function Character.Create(prefab, position, seed, characterInfo, id, isRemotePlayer, hasAi, createNetworkEvent, ragdoll) end
--- ReloadHead --- ReloadHead
-- @realm shared -- @realm shared
-- @tparam Nullable`1 headId -- @tparam Nullable`1 headId
@@ -697,56 +753,36 @@ function IsKeyDown(inputType) end
-- @tparam bool held -- @tparam bool held
function SetInput(inputType, hit, held) end function SetInput(inputType, hit, held) end
--- ClearInput
-- @realm shared
-- @tparam InputType inputType
function ClearInput(inputType) end
--- ClearInputs
-- @realm shared
function ClearInputs() end
--- ToString
-- @realm shared
-- @treturn string
function ToString() end
--- GiveJobItems
-- @realm shared
-- @tparam WayPoint spawnPoint
function GiveJobItems(spawnPoint) end
--- GiveIdCardTags
-- @realm shared
-- @tparam WayPoint spawnPoint
-- @tparam bool createNetworkEvent
function GiveIdCardTags(spawnPoint, createNetworkEvent) end
--- GetSkillLevel
-- @realm shared
-- @tparam string skillIdentifier
-- @treturn number
function GetSkillLevel(skillIdentifier) end
--- GetPositionUpdateInterval --- GetPositionUpdateInterval
-- @realm shared -- @realm shared
-- @tparam Client recipient -- @tparam Client recipient
-- @treturn number -- @treturn number
function GetPositionUpdateInterval(recipient) end function GetPositionUpdateInterval(recipient) end
--- ServerRead --- ServerReadInput
-- @realm shared -- @realm shared
-- @tparam ClientNetObject type
-- @tparam IReadMessage msg -- @tparam IReadMessage msg
-- @tparam Client c -- @tparam Client c
function ServerRead(type, msg, c) end function ServerReadInput(msg, c) end
--- ServerWrite --- ServerEventRead
-- @realm shared
-- @tparam IReadMessage msg
-- @tparam Client c
function ServerEventRead(msg, c) end
--- ServerWritePosition
-- @realm shared -- @realm shared
-- @tparam IWriteMessage msg -- @tparam IWriteMessage msg
-- @tparam Client c -- @tparam Client c
-- @tparam Object[] extraData function ServerWritePosition(msg, c) end
function ServerWrite(msg, c, extraData) end
--- ServerEventWrite
-- @realm shared
-- @tparam IWriteMessage msg
-- @tparam Client c
-- @tparam IData extraData
function ServerEventWrite(msg, c, extraData) end
--- WriteSpawnData --- WriteSpawnData
-- @realm shared -- @realm shared
@@ -755,6 +791,10 @@ function ServerWrite(msg, c, extraData) end
-- @tparam bool restrictMessageSize -- @tparam bool restrictMessageSize
function WriteSpawnData(msg, entityId, restrictMessageSize) end function WriteSpawnData(msg, entityId, restrictMessageSize) end
--- ThrowIfAccessingWalletsInSingleplayer
-- @realm shared
function Character.ThrowIfAccessingWalletsInSingleplayer() end
--- SetOriginalTeam --- SetOriginalTeam
-- @realm shared -- @realm shared
-- @tparam CharacterTeamType newTeam -- @tparam CharacterTeamType newTeam
@@ -803,6 +843,11 @@ function Equals(obj) end
-- @treturn number -- @treturn number
function GetHashCode() end function GetHashCode() end
---
-- Character.Controlled, Field of type Character
-- @realm shared
-- @Character Character.Controlled
--- ---
-- Enabled, Field of type bool -- Enabled, Field of type bool
-- @realm shared -- @realm shared
@@ -858,6 +903,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @CharacterTeamType TeamID -- @CharacterTeamType TeamID
---
-- Wallet, Field of type Wallet
-- @realm shared
-- @Wallet Wallet
--- ---
-- IsOnPlayerTeam, Field of type bool -- IsOnPlayerTeam, Field of type bool
-- @realm shared -- @realm shared
@@ -894,14 +944,14 @@ function GetHashCode() end
-- @table ItemSelectedDurations -- @table ItemSelectedDurations
--- ---
-- SpeciesName, Field of type string -- SpeciesName, Field of type Identifier
-- @realm shared -- @realm shared
-- @string SpeciesName -- @Identifier SpeciesName
--- ---
-- Group, Field of type string -- Group, Field of type Identifier
-- @realm shared -- @realm shared
-- @string Group -- @Identifier Group
--- ---
-- IsHumanoid, Field of type bool -- IsHumanoid, Field of type bool
@@ -913,6 +963,16 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @bool IsHusk -- @bool IsHusk
---
-- IsMale, Field of type bool
-- @realm shared
-- @bool IsMale
---
-- IsFemale, Field of type bool
-- @realm shared
-- @bool IsFemale
--- ---
-- BloodDecalName, Field of type string -- BloodDecalName, Field of type string
-- @realm shared -- @realm shared
@@ -958,16 +1018,6 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @bool IsHuman -- @bool IsHuman
---
-- IsMale, Field of type bool
-- @realm shared
-- @bool IsMale
---
-- IsFemale, Field of type bool
-- @realm shared
-- @bool IsFemale
--- ---
-- CurrentOrders, Field of type table -- CurrentOrders, Field of type table
-- @realm shared -- @realm shared
@@ -994,9 +1044,9 @@ function GetHashCode() end
-- @CharacterInfo Info -- @CharacterInfo Info
--- ---
-- VariantOf, Field of type string -- VariantOf, Field of type Identifier
-- @realm shared -- @realm shared
-- @string VariantOf -- @Identifier VariantOf
--- ---
-- Name, Field of type string -- Name, Field of type string
@@ -1033,6 +1083,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @CharacterInventory Inventory -- @CharacterInventory Inventory
---
-- CustomInteractHUDText, Field of type LocalizedString
-- @realm shared
-- @LocalizedString CustomInteractHUDText
--- ---
-- AllowCustomInteract, Field of type bool -- AllowCustomInteract, Field of type bool
-- @realm shared -- @realm shared
@@ -1458,6 +1513,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number SpawnTime -- @number SpawnTime
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
--- ---
-- OwnerClientEndPoint, Field of type string -- OwnerClientEndPoint, Field of type string
-- @realm shared -- @realm shared
@@ -1499,9 +1559,9 @@ function GetHashCode() end
-- @table Properties -- @table Properties
--- ---
-- Prefab, Field of type HumanPrefab -- HumanPrefab, Field of type HumanPrefab
-- @realm shared -- @realm shared
-- @HumanPrefab Prefab -- @HumanPrefab HumanPrefab
--- ---
-- Latchers, Field of type HashSet`1 -- Latchers, Field of type HashSet`1
@@ -1543,26 +1603,26 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number InvisibleTimer -- @number InvisibleTimer
---
-- Prefab, Field of type CharacterPrefab
-- @realm shared
-- @CharacterPrefab Prefab
--- ---
-- Params, Field of type CharacterParams -- Params, Field of type CharacterParams
-- @realm shared -- @realm shared
-- @CharacterParams Params -- @CharacterParams Params
--- ---
-- TraitorCurrentObjective, Field of type string -- TraitorCurrentObjective, Field of type LocalizedString
-- @realm shared -- @realm shared
-- @string TraitorCurrentObjective -- @LocalizedString TraitorCurrentObjective
--- ---
-- ResetInteract, Field of type bool -- ResetInteract, Field of type bool
-- @realm shared -- @realm shared
-- @bool ResetInteract -- @bool ResetInteract
---
-- customInteractHUDText, Field of type string
-- @realm shared
-- @string customInteractHUDText
--- ---
-- ActiveConversation, Field of type ConversationAction -- ActiveConversation, Field of type ConversationAction
-- @realm shared -- @realm shared
@@ -1608,6 +1668,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @InteractionType CampaignInteractionType -- @InteractionType CampaignInteractionType
---
-- MerchantIdentifier, Field of type Identifier
-- @realm shared
-- @Identifier MerchantIdentifier
--- ---
-- OnDeath, Field of type OnDeathHandler -- OnDeath, Field of type OnDeathHandler
-- @realm shared -- @realm shared
@@ -1639,9 +1704,9 @@ function GetHashCode() end
-- @bool isSynced -- @bool isSynced
--- ---
-- Character.Controlled, Field of type Character -- Character.CharacterUpdateInterval, Field of type number
-- @realm shared -- @realm shared
-- @Character Character.Controlled -- @number Character.CharacterUpdateInterval
--- ---
-- Character.KnockbackCooldown, Field of type number -- Character.KnockbackCooldown, Field of type number
@@ -1653,3 +1718,13 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number ID -- @number ID
---
-- CreationStackTrace, Field of type string
-- @realm shared
-- @string CreationStackTrace
---
-- CreationIndex, Field of type number
-- @realm shared
-- @number CreationIndex
+32 -5
View File
@@ -25,9 +25,16 @@ function GetAllAfflictions(limbHealthFilter) end
-- @treturn Affliction -- @treturn Affliction
function GetAffliction(identifier, allowLimbAfflictions) end function GetAffliction(identifier, allowLimbAfflictions) end
--- GetAffliction
-- @realm shared
-- @tparam Identifier identifier
-- @tparam bool allowLimbAfflictions
-- @treturn Affliction
function GetAffliction(identifier, allowLimbAfflictions) end
--- GetAfflictionOfType --- GetAfflictionOfType
-- @realm shared -- @realm shared
-- @tparam string afflictionType -- @tparam Identifier afflictionType
-- @tparam bool allowLimbAfflictions -- @tparam bool allowLimbAfflictions
-- @treturn Affliction -- @treturn Affliction
function GetAfflictionOfType(afflictionType, allowLimbAfflictions) end function GetAfflictionOfType(afflictionType, allowLimbAfflictions) end
@@ -92,13 +99,33 @@ function GetStatValue(statType) end
-- @treturn bool -- @treturn bool
function HasFlag(flagType) end function HasFlag(flagType) end
--- ReduceAffliction --- ReduceAllAfflictionsOnAllLimbs
-- @realm shared -- @realm shared
-- @tparam Limb targetLimb
-- @tparam string afflictionIdentifier
-- @tparam number amount -- @tparam number amount
-- @tparam Nullable`1 treatmentAction -- @tparam Nullable`1 treatmentAction
function ReduceAffliction(targetLimb, afflictionIdentifier, amount, treatmentAction) end 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 --- ApplyDamage
-- @realm shared -- @realm shared
+159 -228
View File
@@ -10,95 +10,6 @@ Barotrauma source code: [CharacterInfo.cs](https://github.com/evilfactory/Barotr
local CharacterInfo = {} local CharacterInfo = {}
--- RecreateHead
-- @realm shared
-- @tparam HeadInfo headInfo
function RecreateHead(headInfo) end
--- RecreateHead
-- @realm shared
-- @tparam number headID
-- @tparam Race race
-- @tparam Gender gender
-- @tparam number hairIndex
-- @tparam number beardIndex
-- @tparam number moustacheIndex
-- @tparam number faceAttachmentIndex
function RecreateHead(headID, race, gender, hairIndex, beardIndex, moustacheIndex, faceAttachmentIndex) 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 XElement
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 string skillIdentifier
-- @tparam number increase
-- @tparam bool gainedFromAbility
function IncreaseSkillLevel(skillIdentifier, increase, gainedFromAbility) end
--- SetSkillLevel
-- @realm shared
-- @tparam string 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 --- GetExperienceRequiredToLevelUp
-- @realm shared -- @realm shared
-- @treturn number -- @treturn number
@@ -127,7 +38,7 @@ function Save(parentElement) end
--- SaveOrders --- SaveOrders
-- @realm shared -- @realm shared
-- @tparam XElement parentElement -- @tparam XElement parentElement
-- @tparam OrderInfo[] orders -- @tparam Order[] orders
function CharacterInfo.SaveOrders(parentElement, orders) end function CharacterInfo.SaveOrders(parentElement, orders) end
--- SaveOrderData --- SaveOrderData
@@ -162,6 +73,10 @@ function CharacterInfo.LoadOrders(ordersElement) end
-- @tparam XElement healthData -- @tparam XElement healthData
function CharacterInfo.ApplyHealthData(character, healthData) end function CharacterInfo.ApplyHealthData(character, healthData) end
--- ReloadHeadAttachments
-- @realm shared
function ReloadHeadAttachments() end
--- ClearCurrentOrders --- ClearCurrentOrders
-- @realm shared -- @realm shared
function ClearCurrentOrders() end function ClearCurrentOrders() end
@@ -197,7 +112,7 @@ function GetSavedStatValue(statType) end
--- GetSavedStatValue --- GetSavedStatValue
-- @realm shared -- @realm shared
-- @tparam StatTypes statType -- @tparam StatTypes statType
-- @tparam string statIdentifier -- @tparam Identifier statIdentifier
-- @treturn number -- @treturn number
function GetSavedStatValue(statType, statIdentifier) end function GetSavedStatValue(statType, statIdentifier) end
@@ -211,18 +126,6 @@ function GetSavedStatValue(statType, statIdentifier) end
-- @tparam bool setValue -- @tparam bool setValue
function ChangeSavedStatValue(statType, value, statIdentifier, removeOnDeath, maxValue, setValue) end function ChangeSavedStatValue(statType, value, statIdentifier, removeOnDeath, maxValue, setValue) end
--- Create
-- @realm shared
-- @tparam string speciesName
-- @tparam string name
-- @tparam JobPrefab jobPrefab
-- @tparam string ragdollFileName
-- @tparam number variant
-- @tparam RandSync randSync
-- @tparam string npcIdentifier
-- @treturn CharacterInfo
function CharacterInfo.Create(speciesName, name, jobPrefab, ragdollFileName, variant, randSync, npcIdentifier) end
--- ServerWrite --- ServerWrite
-- @realm shared -- @realm shared
-- @tparam IWriteMessage msg -- @tparam IWriteMessage msg
@@ -250,6 +153,20 @@ function CheckDisguiseStatus(handleBuff, idCard) end
-- @treturn number -- @treturn number
function GetManualOrderPriority(order) end 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 --- GetRandomName
-- @realm shared -- @realm shared
-- @tparam RandSync randSync -- @tparam RandSync randSync
@@ -259,26 +176,9 @@ function GetRandomName(randSync) end
--- SelectRandomColor --- SelectRandomColor
-- @realm shared -- @realm shared
-- @tparam ImmutableArray`1& array -- @tparam ImmutableArray`1& array
-- @tparam RandSync randSync
-- @treturn Color -- @treturn Color
function CharacterInfo.SelectRandomColor(array) end function CharacterInfo.SelectRandomColor(array, randSync) end
--- GetRandomGender
-- @realm shared
-- @tparam RandSync randSync
-- @treturn Gender
function GetRandomGender(randSync) end
--- GetRandomRace
-- @realm shared
-- @tparam RandSync randSync
-- @treturn Race
function GetRandomRace(randSync) end
--- GetRandomHeadID
-- @realm shared
-- @tparam RandSync randSync
-- @treturn number
function GetRandomHeadID(randSync) end
--- GetIdentifier --- GetIdentifier
-- @realm shared -- @realm shared
@@ -290,35 +190,106 @@ function GetIdentifier() end
-- @treturn number -- @treturn number
function GetIdentifierUsingOriginalName() end function GetIdentifierUsingOriginalName() end
--- FilterByTypeAndHeadID --- FilterElements
-- @realm shared -- @realm shared
-- @tparam Enumerable elements -- @tparam Enumerable elements
-- @tparam WearableType targetType -- @tparam ImmutableHashSet`1 tags
-- @tparam number headSpriteId -- @tparam Nullable`1 targetType
-- @treturn Enumerable -- @treturn Enumerable
function FilterByTypeAndHeadID(elements, targetType, headSpriteId) end function FilterElements(elements, tags, targetType) end
--- FilterElementsByGenderAndRace --- 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 -- @realm shared
-- @tparam Enumerable elements -- @tparam Enumerable elements
-- @tparam Gender gender -- @tparam WearableType type
-- @tparam Race race -- @tparam number commonness
-- @treturn Enumerable -- @treturn table
function FilterElementsByGenderAndRace(elements, gender, race) end function CharacterInfo.AddEmpty(elements, type, commonness) end
--- IsMatchingGender --- GetRandomElement
-- @realm shared -- @realm shared
-- @tparam Gender gender -- @tparam Enumerable elements
-- @tparam Gender myGender -- @treturn ContentXElement
-- @treturn bool function GetRandomElement(elements) end
function CharacterInfo.IsMatchingGender(gender, myGender) end
--- IsMatchingRace --- IsValidIndex
-- @realm shared -- @realm shared
-- @tparam Race race -- @tparam number index
-- @tparam Race myRace -- @tparam table list
-- @treturn bool -- @treturn bool
function CharacterInfo.IsMatchingRace(race, myRace) end 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
--- GetType --- GetType
-- @realm shared -- @realm shared
@@ -347,9 +318,19 @@ function GetHashCode() end
-- @HeadInfo Head -- @HeadInfo Head
--- ---
-- Heads, Field of type table -- IsMale, Field of type bool
-- @realm shared -- @realm shared
-- @table Heads -- @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 -- HasNickname, Field of type bool
@@ -367,9 +348,9 @@ function GetHashCode() end
-- @string DisplayName -- @string DisplayName
--- ---
-- SpeciesName, Field of type string -- SpeciesName, Field of type Identifier
-- @realm shared -- @realm shared
-- @string SpeciesName -- @Identifier SpeciesName
--- ---
-- ExperiencePoints, Field of type number -- ExperiencePoints, Field of type number
@@ -402,9 +383,14 @@ function GetHashCode() end
-- @table AttachmentSprites -- @table AttachmentSprites
--- ---
-- CharacterConfigElement, Field of type XElement -- CharacterConfigElement, Field of type ContentXElement
-- @realm shared -- @realm shared
-- @XElement CharacterConfigElement -- @ContentXElement CharacterConfigElement
---
-- PersonalityTrait, Field of type NPCPersonalityTrait
-- @realm shared
-- @NPCPersonalityTrait PersonalityTrait
--- ---
-- CharacterInfo.HighestManualOrderPriority, Field of type number -- CharacterInfo.HighestManualOrderPriority, Field of type number
@@ -421,81 +407,6 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @table SpriteTags -- @table SpriteTags
---
-- PersonalityTrait, Field of type NPCPersonalityTrait
-- @realm shared
-- @NPCPersonalityTrait PersonalityTrait
---
-- HeadSpriteId, Field of type number
-- @realm shared
-- @number HeadSpriteId
---
-- Gender, Field of type Gender
-- @realm shared
-- @Gender Gender
---
-- Race, Field of type Race
-- @realm shared
-- @Race Race
---
-- HairIndex, Field of type number
-- @realm shared
-- @number HairIndex
---
-- BeardIndex, Field of type number
-- @realm shared
-- @number BeardIndex
---
-- MoustacheIndex, Field of type number
-- @realm shared
-- @number MoustacheIndex
---
-- FaceAttachmentIndex, Field of type number
-- @realm shared
-- @number FaceAttachmentIndex
---
-- HairColor, Field of type Color
-- @realm shared
-- @Color HairColor
---
-- FacialHairColor, Field of type Color
-- @realm shared
-- @Color FacialHairColor
---
-- SkinColor, Field of type Color
-- @realm shared
-- @Color SkinColor
---
-- HairElement, Field of type XElement
-- @realm shared
-- @XElement HairElement
---
-- BeardElement, Field of type XElement
-- @realm shared
-- @XElement BeardElement
---
-- MoustacheElement, Field of type XElement
-- @realm shared
-- @XElement MoustacheElement
---
-- FaceAttachment, Field of type XElement
-- @realm shared
-- @XElement FaceAttachment
--- ---
-- Ragdoll, Field of type RagdollParams -- Ragdoll, Field of type RagdollParams
-- @realm shared -- @realm shared
@@ -506,6 +417,26 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @bool IsAttachmentsLoaded -- @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 -- Wearables, Field of type Enumerable
-- @realm shared -- @realm shared
@@ -592,14 +523,9 @@ function GetHashCode() end
-- @number ID -- @number ID
--- ---
-- HasGenders, Field of type bool -- HasSpecifierTags, Field of type bool
-- @realm shared -- @realm shared
-- @bool HasGenders -- @bool HasSpecifierTags
---
-- HasRaces, Field of type bool
-- @realm shared
-- @bool HasRaces
--- ---
-- HairColors, Field of type ImmutableArray`1 -- HairColors, Field of type ImmutableArray`1
@@ -626,6 +552,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @table SavedStatValues -- @table SavedStatValues
---
-- CharacterInfo.MaxAdditionalTalentPoints, Field of type number
-- @realm shared
-- @number CharacterInfo.MaxAdditionalTalentPoints
--- ---
-- CharacterInfo.MaxCurrentOrders, Field of type number -- CharacterInfo.MaxCurrentOrders, Field of type number
-- @realm shared -- @realm shared
+19 -9
View File
@@ -98,19 +98,18 @@ function CheckIfAnySlotAvailable(item, inWrongSlot) end
-- @treturn bool -- @treturn bool
function TryPutItem(item, index, allowSwapping, allowCombine, user, createNetworkEvent, ignoreCondition) end function TryPutItem(item, index, allowSwapping, allowCombine, user, createNetworkEvent, ignoreCondition) end
--- ServerRead --- ServerEventRead
-- @realm shared -- @realm shared
-- @tparam ClientNetObject type
-- @tparam IReadMessage msg -- @tparam IReadMessage msg
-- @tparam Client c -- @tparam Client c
function ServerRead(type, msg, c) end function ServerEventRead(msg, c) end
--- ServerWrite --- ServerEventWrite
-- @realm shared -- @realm shared
-- @tparam IWriteMessage msg -- @tparam IWriteMessage msg
-- @tparam Client c -- @tparam Client c
-- @tparam Object[] extraData -- @tparam IData extraData
function ServerWrite(msg, c, extraData) end function ServerEventWrite(msg, c, extraData) end
--- Contains --- Contains
-- @realm shared -- @realm shared
@@ -226,14 +225,14 @@ function FindAllItems(predicate, recursive, list) end
--- FindItemByTag --- FindItemByTag
-- @realm shared -- @realm shared
-- @tparam string tag -- @tparam Identifier tag
-- @tparam bool recursive -- @tparam bool recursive
-- @treturn Item -- @treturn Item
function FindItemByTag(tag, recursive) end function FindItemByTag(tag, recursive) end
--- FindItemByIdentifier --- FindItemByIdentifier
-- @realm shared -- @realm shared
-- @tparam string identifier -- @tparam Identifier identifier
-- @tparam bool recursive -- @tparam bool recursive
-- @treturn Item -- @treturn Item
function FindItemByIdentifier(identifier, recursive) end function FindItemByIdentifier(identifier, recursive) end
@@ -250,10 +249,16 @@ function ForceToSlot(item, index) end
-- @tparam number index -- @tparam number index
function ForceRemoveFromSlot(item, index) end function ForceRemoveFromSlot(item, index) end
--- SharedRead
-- @realm shared
-- @tparam IReadMessage msg
-- @tparam List`1[]& newItemIds
function SharedRead(msg, newItemIds) end
--- SharedWrite --- SharedWrite
-- @realm shared -- @realm shared
-- @tparam IWriteMessage msg -- @tparam IWriteMessage msg
-- @tparam Object[] extraData -- @tparam IData extraData
function SharedWrite(msg, extraData) end function SharedWrite(msg, extraData) end
--- DeleteAllItems --- DeleteAllItems
@@ -291,6 +296,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @bool AccessibleWhenAlive -- @bool AccessibleWhenAlive
---
-- AccessibleByOwner, Field of type bool
-- @realm shared
-- @bool AccessibleByOwner
--- ---
-- AllItems, Field of type Enumerable -- AllItems, Field of type Enumerable
-- @realm shared -- @realm shared
+12 -12
View File
@@ -1,7 +1,7 @@
-- luacheck: ignore 111 -- luacheck: ignore 111
--[[-- --[[--
Barotrauma Character class with some additional functions and fields 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) Barotrauma source code: [Client.cs](https://github.com/evilfactory/Barotrauma-lua-attempt/blob/master/Barotrauma/BarotraumaShared/SharedSource/Networking/Client.cs)
]] ]]
@@ -215,6 +215,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @bool Muted -- @bool Muted
---
-- HasPermissions, Field of type bool
-- @realm shared
-- @bool HasPermissions
--- ---
-- VoipQueue, Field of type VoipQueue -- VoipQueue, Field of type VoipQueue
-- @realm shared -- @realm shared
@@ -381,9 +386,9 @@ function GetHashCode() end
-- @table JobPreferences -- @table JobPreferences
--- ---
-- AssignedJob, Field of type Pair`2 -- AssignedJob, Field of type JobVariant
-- @realm shared -- @realm shared
-- @Pair`2 AssignedJob -- @JobVariant AssignedJob
--- ---
-- DeleteDisconnectedTimer, Field of type number -- DeleteDisconnectedTimer, Field of type number
@@ -431,9 +436,9 @@ function GetHashCode() end
-- @number OwnerSteamID -- @number OwnerSteamID
--- ---
-- Language, Field of type string -- Language, Field of type LanguageIdentifier
-- @realm shared -- @realm shared
-- @string Language -- @LanguageIdentifier Language
--- ---
-- Ping, Field of type number -- Ping, Field of type number
@@ -441,9 +446,9 @@ function GetHashCode() end
-- @number Ping -- @number Ping
--- ---
-- PreferredJob, Field of type string -- PreferredJob, Field of type Identifier
-- @realm shared -- @realm shared
-- @string PreferredJob -- @Identifier PreferredJob
--- ---
-- TeamID, Field of type CharacterTeamType -- TeamID, Field of type CharacterTeamType
@@ -460,11 +465,6 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number CharacterID -- @number CharacterID
---
-- HasPermissions, Field of type bool
-- @realm shared
-- @bool HasPermissions
--- ---
-- HasSpawned, Field of type bool -- HasSpawned, Field of type bool
-- @realm shared -- @realm shared
+39 -25
View File
@@ -11,32 +11,31 @@ Barotrauma source code: [EntitySpawner.cs](https://github.com/evilfactory/Barotr
--- CreateNetworkEvent --- CreateNetworkEvent
-- @realm shared -- @realm shared
-- @tparam Entity entity -- @tparam SpawnOrRemove spawnOrRemove
-- @tparam bool remove function CreateNetworkEvent(spawnOrRemove) end
function CreateNetworkEvent(entity, remove) end
--- ServerWrite --- ServerEventWrite
-- @realm shared -- @realm shared
-- @tparam IWriteMessage message -- @tparam IWriteMessage message
-- @tparam Client client -- @tparam Client client
-- @tparam Object[] extraData -- @tparam IData extraData
function ServerWrite(message, client, extraData) end function ServerEventWrite(message, client, extraData) end
--- ToString --- ToString
-- @realm shared -- @realm shared
-- @treturn string -- @treturn string
function ToString() end function ToString() end
--- AddToSpawnQueue --- AddItemToSpawnQueue
-- @realm shared -- @realm shared
-- @tparam ItemPrefab itemPrefab -- @tparam ItemPrefab itemPrefab
-- @tparam Vector2 worldPosition -- @tparam Vector2 worldPosition
-- @tparam Nullable`1 condition -- @tparam Nullable`1 condition
-- @tparam Nullable`1 quality -- @tparam Nullable`1 quality
-- @tparam function onSpawned -- @tparam function onSpawned
function AddToSpawnQueue(itemPrefab, worldPosition, condition, quality, onSpawned) end function AddItemToSpawnQueue(itemPrefab, worldPosition, condition, quality, onSpawned) end
--- AddToSpawnQueue --- AddItemToSpawnQueue
-- @realm shared -- @realm shared
-- @tparam ItemPrefab itemPrefab -- @tparam ItemPrefab itemPrefab
-- @tparam Vector2 position -- @tparam Vector2 position
@@ -44,9 +43,9 @@ function AddToSpawnQueue(itemPrefab, worldPosition, condition, quality, onSpawne
-- @tparam Nullable`1 condition -- @tparam Nullable`1 condition
-- @tparam Nullable`1 quality -- @tparam Nullable`1 quality
-- @tparam function onSpawned -- @tparam function onSpawned
function AddToSpawnQueue(itemPrefab, position, sub, condition, quality, onSpawned) end function AddItemToSpawnQueue(itemPrefab, position, sub, condition, quality, onSpawned) end
--- AddToSpawnQueue --- AddItemToSpawnQueue
-- @realm shared -- @realm shared
-- @tparam ItemPrefab itemPrefab -- @tparam ItemPrefab itemPrefab
-- @tparam Inventory inventory -- @tparam Inventory inventory
@@ -56,40 +55,40 @@ function AddToSpawnQueue(itemPrefab, position, sub, condition, quality, onSpawne
-- @tparam bool spawnIfInventoryFull -- @tparam bool spawnIfInventoryFull
-- @tparam bool ignoreLimbSlots -- @tparam bool ignoreLimbSlots
-- @tparam InvSlotType slot -- @tparam InvSlotType slot
function AddToSpawnQueue(itemPrefab, inventory, condition, quality, onSpawned, spawnIfInventoryFull, ignoreLimbSlots, slot) end function AddItemToSpawnQueue(itemPrefab, inventory, condition, quality, onSpawned, spawnIfInventoryFull, ignoreLimbSlots, slot) end
--- AddToSpawnQueue --- AddCharacterToSpawnQueue
-- @realm shared -- @realm shared
-- @tparam string speciesName -- @tparam Identifier speciesName
-- @tparam Vector2 worldPosition -- @tparam Vector2 worldPosition
-- @tparam function onSpawn -- @tparam function onSpawn
function AddToSpawnQueue(speciesName, worldPosition, onSpawn) end function AddCharacterToSpawnQueue(speciesName, worldPosition, onSpawn) end
--- AddToSpawnQueue --- AddCharacterToSpawnQueue
-- @realm shared -- @realm shared
-- @tparam string speciesName -- @tparam Identifier speciesName
-- @tparam Vector2 position -- @tparam Vector2 position
-- @tparam Submarine sub -- @tparam Submarine sub
-- @tparam function onSpawn -- @tparam function onSpawn
function AddToSpawnQueue(speciesName, position, sub, onSpawn) end function AddCharacterToSpawnQueue(speciesName, position, sub, onSpawn) end
--- AddToSpawnQueue --- AddCharacterToSpawnQueue
-- @realm shared -- @realm shared
-- @tparam string speciesName -- @tparam Identifier speciesName
-- @tparam Vector2 worldPosition -- @tparam Vector2 worldPosition
-- @tparam CharacterInfo characterInfo -- @tparam CharacterInfo characterInfo
-- @tparam function onSpawn -- @tparam function onSpawn
function AddToSpawnQueue(speciesName, worldPosition, characterInfo, onSpawn) end function AddCharacterToSpawnQueue(speciesName, worldPosition, characterInfo, onSpawn) end
--- AddToRemoveQueue --- AddEntityToRemoveQueue
-- @realm shared -- @realm shared
-- @tparam Entity entity -- @tparam Entity entity
function AddToRemoveQueue(entity) end function AddEntityToRemoveQueue(entity) end
--- AddToRemoveQueue --- AddItemToRemoveQueue
-- @realm shared -- @realm shared
-- @tparam Item item -- @tparam Item item
function AddToRemoveQueue(item) end function AddItemToRemoveQueue(item) end
--- IsInSpawnQueue --- IsInSpawnQueue
-- @realm shared -- @realm shared
@@ -192,8 +191,23 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number SpawnTime -- @number SpawnTime
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
--- ---
-- ID, Field of type number -- ID, Field of type number
-- @realm shared -- @realm shared
-- @number ID -- @number ID
---
-- CreationStackTrace, Field of type string
-- @realm shared
-- @string CreationStackTrace
---
-- CreationIndex, Field of type number
-- @realm shared
-- @number CreationIndex
+15
View File
@@ -119,11 +119,26 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number SpawnTime -- @number SpawnTime
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
--- ---
-- ID, Field of type number -- ID, Field of type number
-- @realm shared -- @realm shared
-- @number ID -- @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 -- Entity.Spawner, Field of type EntitySpawner
-- @realm shared -- @realm shared
+5
View File
@@ -51,3 +51,8 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number GameTime -- @number GameTime
---
-- IsEditor, Field of type bool
-- @realm shared
-- @bool IsEditor
+15 -7
View File
@@ -15,13 +15,15 @@ function LoadPreviousSave() end
-- @realm shared -- @realm shared
-- @tparam SubmarineInfo newSubmarine -- @tparam SubmarineInfo newSubmarine
-- @tparam number cost -- @tparam number cost
-- @tparam Client client
-- @treturn SubmarineInfo -- @treturn SubmarineInfo
function SwitchSubmarine(newSubmarine, cost) end function SwitchSubmarine(newSubmarine, cost, client) end
--- PurchaseSubmarine --- PurchaseSubmarine
-- @realm shared -- @realm shared
-- @tparam SubmarineInfo newSubmarine -- @tparam SubmarineInfo newSubmarine
function PurchaseSubmarine(newSubmarine) end -- @tparam Client client
function PurchaseSubmarine(newSubmarine, client) end
--- IsSubmarineOwned --- IsSubmarineOwned
-- @realm shared -- @realm shared
@@ -78,8 +80,9 @@ function EnforceMissionOrder(missionIdentifiers) end
--- GetSessionCrewCharacters --- GetSessionCrewCharacters
-- @realm shared -- @realm shared
-- @treturn Enumerable -- @tparam CharacterType type
function GameSession.GetSessionCrewCharacters() end -- @treturn ImmutableHashSet`1
function GameSession.GetSessionCrewCharacters(type) end
--- EndRound --- EndRound
-- @realm shared -- @realm shared
@@ -105,10 +108,10 @@ function ReviveCharacter(character) end
--- IsCompatibleWithEnabledContentPackages --- IsCompatibleWithEnabledContentPackages
-- @realm shared -- @realm shared
-- @tparam IList`1 contentPackagePaths -- @tparam IList`1 contentPackageNames
-- @tparam String& errorMsg -- @tparam LocalizedString& errorMsg
-- @treturn bool -- @treturn bool
function GameSession.IsCompatibleWithEnabledContentPackages(contentPackagePaths, errorMsg) end function GameSession.IsCompatibleWithEnabledContentPackages(contentPackageNames, errorMsg) end
--- Save --- Save
-- @realm shared -- @realm shared
@@ -141,6 +144,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @Enumerable Missions -- @Enumerable Missions
---
-- Casualties, Field of type Enumerable
-- @realm shared
-- @Enumerable Casualties
--- ---
-- IsRunning, Field of type bool -- IsRunning, Field of type bool
-- @realm shared -- @realm shared
+56 -48
View File
@@ -7,11 +7,21 @@ Barotrauma.Hull
-- @pragma nostrip -- @pragma nostrip
local Hull = {} local Hull = {}
--- DirtySections --- IncreaseSectionColorOrStrength
-- @realm shared -- @realm shared
-- @tparam table sections -- @tparam BackgroundSection section
-- @tparam number dirtyVal -- @tparam Nullable`1 color
function DirtySections(sections, dirtyVal) end -- @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 --- CleanSection
-- @realm shared -- @realm shared
@@ -22,7 +32,7 @@ function CleanSection(section, cleanVal, updateRequired) end
--- Load --- Load
-- @realm shared -- @realm shared
-- @tparam XElement element -- @tparam ContentXElement element
-- @tparam Submarine submarine -- @tparam Submarine submarine
-- @tparam IdRemap idRemap -- @tparam IdRemap idRemap
-- @treturn Hull -- @treturn Hull
@@ -40,19 +50,18 @@ function Save(parentElement) end
-- @treturn bool -- @treturn bool
function IsMouseOn(position) end function IsMouseOn(position) end
--- ServerWrite --- ServerEventWrite
-- @realm shared -- @realm shared
-- @tparam IWriteMessage message -- @tparam IWriteMessage msg
-- @tparam Client c -- @tparam Client c
-- @tparam Object[] extraData -- @tparam IData extraData
function ServerWrite(message, c, extraData) end function ServerEventWrite(msg, c, extraData) end
--- ServerRead --- ServerEventRead
-- @realm shared -- @realm shared
-- @tparam ClientNetObject type
-- @tparam IReadMessage msg -- @tparam IReadMessage msg
-- @tparam Client c -- @tparam Client c
function ServerRead(type, msg, c) end function ServerEventRead(msg, c) end
--- GetBorders --- GetBorders
-- @realm shared -- @realm shared
@@ -241,11 +250,6 @@ function GetBackgroundSection(worldPosition) end
-- @treturn Enumerable -- @treturn Enumerable
function GetBackgroundSectionsViaContaining(rectArea) end function GetBackgroundSectionsViaContaining(rectArea) end
--- RefreshSubmergedSections
-- @realm shared
-- @tparam Rectangle waterArea
function RefreshSubmergedSections(waterArea) end
--- DoesSectionMatch --- DoesSectionMatch
-- @realm shared -- @realm shared
-- @tparam number index -- @tparam number index
@@ -253,21 +257,10 @@ function RefreshSubmergedSections(waterArea) end
-- @treturn bool -- @treturn bool
function DoesSectionMatch(index, row) end function DoesSectionMatch(index, row) end
--- IncreaseSectionColorOrStrength --- AddLinked
-- @realm shared -- @realm shared
-- @tparam BackgroundSection section -- @tparam MapEntity entity
-- @tparam Nullable`1 color function AddLinked(entity) end
-- @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
--- ResolveLinks --- ResolveLinks
-- @realm shared -- @realm shared
@@ -276,13 +269,13 @@ function ResolveLinks(childRemap) end
--- HasUpgrade --- HasUpgrade
-- @realm shared -- @realm shared
-- @tparam string identifier -- @tparam Identifier identifier
-- @treturn bool -- @treturn bool
function HasUpgrade(identifier) end function HasUpgrade(identifier) end
--- GetUpgrade --- GetUpgrade
-- @realm shared -- @realm shared
-- @tparam string identifier -- @tparam Identifier identifier
-- @treturn Upgrade -- @treturn Upgrade
function GetUpgrade(identifier) end function GetUpgrade(identifier) end
@@ -352,11 +345,6 @@ function Equals(obj) end
-- @treturn number -- @treturn number
function GetHashCode() end function GetHashCode() end
---
-- Hull.EntityGrids, Field of type table
-- @realm shared
-- @table Hull.EntityGrids
--- ---
-- SerializableProperties, Field of type table -- SerializableProperties, Field of type table
-- @realm shared -- @realm shared
@@ -368,9 +356,9 @@ function GetHashCode() end
-- @string Name -- @string Name
--- ---
-- DisplayName, Field of type string -- DisplayName, Field of type LocalizedString
-- @realm shared -- @realm shared
-- @string DisplayName -- @LocalizedString DisplayName
--- ---
-- OutpostModuleTags, Field of type Enumerable -- OutpostModuleTags, Field of type Enumerable
@@ -538,9 +526,9 @@ function GetHashCode() end
-- @bool DrawOverWater -- @bool DrawOverWater
--- ---
-- AllowedLinks, Field of type table -- AllowedLinks, Field of type Enumerable
-- @realm shared -- @realm shared
-- @table AllowedLinks -- @Enumerable AllowedLinks
--- ---
-- ResizeHorizontal, Field of type bool -- ResizeHorizontal, Field of type bool
@@ -657,6 +645,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number SpawnTime -- @number SpawnTime
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
--- ---
-- properties, Field of type table -- properties, Field of type table
-- @realm shared -- @realm shared
@@ -688,9 +681,14 @@ function GetHashCode() end
-- @number yBackgroundMax -- @number yBackgroundMax
--- ---
-- Hull.hullList, Field of type table -- Hull.HullList, Field of type table
-- @realm shared -- @realm shared
-- @table Hull.hullList -- @table Hull.HullList
---
-- Hull.EntityGrids, Field of type table
-- @realm shared
-- @table Hull.EntityGrids
--- ---
-- Hull.ShowHulls, Field of type bool -- Hull.ShowHulls, Field of type bool
@@ -763,9 +761,9 @@ function GetHashCode() end
-- @number Hull.MaxDecalsPerHull -- @number Hull.MaxDecalsPerHull
--- ---
-- prefab, Field of type MapEntityPrefab -- Prefab, Field of type MapEntityPrefab
-- @realm shared -- @realm shared
-- @MapEntityPrefab prefab -- @MapEntityPrefab Prefab
--- ---
-- unresolvedLinkedToID, Field of type table -- unresolvedLinkedToID, Field of type table
@@ -773,9 +771,9 @@ function GetHashCode() end
-- @table unresolvedLinkedToID -- @table unresolvedLinkedToID
--- ---
-- disallowedUpgrades, Field of type HashSet`1 -- DisallowedUpgradeSet, Field of type HashSet`1
-- @realm shared -- @realm shared
-- @HashSet`1 disallowedUpgrades -- @HashSet`1 DisallowedUpgradeSet
--- ---
-- linkedTo, Field of type table -- linkedTo, Field of type table
@@ -807,3 +805,13 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number ID -- @number ID
---
-- CreationStackTrace, Field of type string
-- @realm shared
-- @string CreationStackTrace
---
-- CreationIndex, Field of type number
-- @realm shared
-- @number CreationIndex
+14 -9
View File
@@ -7,19 +7,18 @@ Barotrauma.Inventory
-- @pragma nostrip -- @pragma nostrip
local Inventory = {} local Inventory = {}
--- ServerRead --- ServerEventRead
-- @realm shared -- @realm shared
-- @tparam ClientNetObject type
-- @tparam IReadMessage msg -- @tparam IReadMessage msg
-- @tparam Client c -- @tparam Client c
function ServerRead(type, msg, c) end function ServerEventRead(msg, c) end
--- ServerWrite --- ServerEventWrite
-- @realm shared -- @realm shared
-- @tparam IWriteMessage msg -- @tparam IWriteMessage msg
-- @tparam Client c -- @tparam Client c
-- @tparam Object[] extraData -- @tparam IData extraData
function ServerWrite(msg, c, extraData) end function ServerEventWrite(msg, c, extraData) end
--- Contains --- Contains
-- @realm shared -- @realm shared
@@ -174,14 +173,14 @@ function FindAllItems(predicate, recursive, list) end
--- FindItemByTag --- FindItemByTag
-- @realm shared -- @realm shared
-- @tparam string tag -- @tparam Identifier tag
-- @tparam bool recursive -- @tparam bool recursive
-- @treturn Item -- @treturn Item
function FindItemByTag(tag, recursive) end function FindItemByTag(tag, recursive) end
--- FindItemByIdentifier --- FindItemByIdentifier
-- @realm shared -- @realm shared
-- @tparam string identifier -- @tparam Identifier identifier
-- @tparam bool recursive -- @tparam bool recursive
-- @treturn Item -- @treturn Item
function FindItemByIdentifier(identifier, recursive) end function FindItemByIdentifier(identifier, recursive) end
@@ -203,10 +202,16 @@ function ForceToSlot(item, index) end
-- @tparam number index -- @tparam number index
function ForceRemoveFromSlot(item, index) end function ForceRemoveFromSlot(item, index) end
--- SharedRead
-- @realm shared
-- @tparam IReadMessage msg
-- @tparam List`1[]& newItemIds
function SharedRead(msg, newItemIds) end
--- SharedWrite --- SharedWrite
-- @realm shared -- @realm shared
-- @tparam IWriteMessage msg -- @tparam IWriteMessage msg
-- @tparam Object[] extraData -- @tparam IData extraData
function SharedWrite(msg, extraData) end function SharedWrite(msg, extraData) end
--- DeleteAllItems --- DeleteAllItems
+130 -82
View File
@@ -46,6 +46,54 @@ function SendSignal(signalOrString, connectionOrConnectionName) end
-- @Vector2 WorldPosition -- @Vector2 WorldPosition
--- ApplyStatusEffects
-- @realm shared
-- @tparam function type
-- @tparam number deltaTime
-- @tparam Character character
-- @tparam Limb limb
-- @tparam Entity useTarget
-- @tparam bool isNetworkEvent
-- @tparam Nullable`1 worldPosition
function ApplyStatusEffects(type, deltaTime, character, limb, useTarget, isNetworkEvent, worldPosition) end
--- ApplyStatusEffect
-- @realm shared
-- @tparam StatusEffect effect
-- @tparam function type
-- @tparam number deltaTime
-- @tparam Character character
-- @tparam Limb limb
-- @tparam Entity useTarget
-- @tparam bool isNetworkEvent
-- @tparam bool checkCondition
-- @tparam Nullable`1 worldPosition
function ApplyStatusEffect(effect, type, deltaTime, character, limb, useTarget, isNetworkEvent, checkCondition, worldPosition) end
--- AddDamage
-- @realm shared
-- @tparam Character attacker
-- @tparam Vector2 worldPosition
-- @tparam Attack attack
-- @tparam number deltaTime
-- @tparam bool playSound
-- @treturn AttackResult
function AddDamage(attacker, worldPosition, attack, deltaTime, playSound) end
--- SendPendingNetworkUpdates
-- @realm shared
function SendPendingNetworkUpdates() end
--- CreateStatusEvent
-- @realm shared
function CreateStatusEvent() end
--- Update
-- @realm shared
-- @tparam number deltaTime
-- @tparam Camera cam
function Update(deltaTime, cam) end
--- UpdateTransform --- UpdateTransform
-- @realm shared -- @realm shared
function UpdateTransform() end function UpdateTransform() end
@@ -63,26 +111,28 @@ function FlipY(relativeToSub) end
--- GetConnectedComponents --- GetConnectedComponents
-- @realm shared -- @realm shared
-- @tparam bool recursive -- @tparam bool recursive
-- @tparam bool allowTraversingBackwards
-- @treturn table -- @treturn table
function GetConnectedComponents(recursive) end function GetConnectedComponents(recursive, allowTraversingBackwards) end
--- GetConnectedComponentsRecursive --- GetConnectedComponentsRecursive
-- @realm shared -- @realm shared
-- @tparam Connection c -- @tparam Connection c
-- @tparam bool ignoreInactiveRelays -- @tparam bool ignoreInactiveRelays
-- @tparam bool allowTraversingBackwards
-- @treturn table -- @treturn table
function GetConnectedComponentsRecursive(c, ignoreInactiveRelays) end function GetConnectedComponentsRecursive(c, ignoreInactiveRelays, allowTraversingBackwards) end
--- FindController --- FindController
-- @realm shared -- @realm shared
-- @tparam String[] tags -- @tparam Nullable`1 tags
-- @treturn Controller -- @treturn Controller
function FindController(tags) end function FindController(tags) end
--- TryFindController --- TryFindController
-- @realm shared -- @realm shared
-- @tparam Controller& controller -- @tparam Controller& controller
-- @tparam String[] tags -- @tparam Nullable`1 tags
-- @treturn bool -- @treturn bool
function TryFindController(controller, tags) end function TryFindController(controller, tags) end
@@ -168,7 +218,8 @@ function Combine(item, user) end
-- @realm shared -- @realm shared
-- @tparam Character dropper -- @tparam Character dropper
-- @tparam bool createNetworkEvent -- @tparam bool createNetworkEvent
function Drop(dropper, createNetworkEvent) end -- @tparam bool setTransform
function Drop(dropper, createNetworkEvent, setTransform) end
--- Equip --- Equip
-- @realm shared -- @realm shared
@@ -187,7 +238,7 @@ function GetProperties() end
--- Load --- Load
-- @realm shared -- @realm shared
-- @tparam XElement element -- @tparam ContentXElement element
-- @tparam Submarine submarine -- @tparam Submarine submarine
-- @tparam IdRemap idRemap -- @tparam IdRemap idRemap
-- @treturn Item -- @treturn Item
@@ -195,7 +246,7 @@ function Item.Load(element, submarine, idRemap) end
--- Load --- Load
-- @realm shared -- @realm shared
-- @tparam XElement element -- @tparam ContentXElement element
-- @tparam Submarine submarine -- @tparam Submarine submarine
-- @tparam bool createNetworkEvent -- @tparam bool createNetworkEvent
-- @tparam IdRemap idRemap -- @tparam IdRemap idRemap
@@ -229,11 +280,6 @@ function Remove() end
-- @tparam ItemPrefab prefab -- @tparam ItemPrefab prefab
function Item.RemoveByPrefab(prefab) end function Item.RemoveByPrefab(prefab) end
--- AddToRemoveQueue
-- @realm shared
-- @tparam Item item
function Item.AddToRemoveQueue(item) end
--- GetComponentString --- GetComponentString
-- @realm shared -- @realm shared
-- @tparam string component -- @tparam string component
@@ -357,11 +403,11 @@ function FindHull() end
-- @treturn Item -- @treturn Item
function GetRootContainer() end function GetRootContainer() end
--- IsThisOrAnyContainerIgnoredByAI --- HasAccess
-- @realm shared -- @realm shared
-- @tparam Character character -- @tparam Character character
-- @treturn bool -- @treturn bool
function IsThisOrAnyContainerIgnoredByAI(character) end function HasAccess(character) end
--- IsOwnedBy --- IsOwnedBy
-- @realm shared -- @realm shared
@@ -389,18 +435,35 @@ function SetContainedItemPositions() end
-- @tparam string tag -- @tparam string tag
function AddTag(tag) end function AddTag(tag) end
--- AddTag
-- @realm shared
-- @tparam Identifier tag
function AddTag(tag) end
--- HasTag --- HasTag
-- @realm shared -- @realm shared
-- @tparam string tag -- @tparam string tag
-- @treturn bool -- @treturn bool
function HasTag(tag) end function HasTag(tag) end
--- HasTag
-- @realm shared
-- @tparam Identifier tag
-- @treturn bool
function HasTag(tag) end
--- ReplaceTag --- ReplaceTag
-- @realm shared -- @realm shared
-- @tparam string tag -- @tparam string tag
-- @tparam string newTag -- @tparam string newTag
function ReplaceTag(tag, newTag) end function ReplaceTag(tag, newTag) end
--- ReplaceTag
-- @realm shared
-- @tparam Identifier tag
-- @tparam Identifier newTag
function ReplaceTag(tag, newTag) end
--- GetTags --- GetTags
-- @realm shared -- @realm shared
-- @treturn Enumerable -- @treturn Enumerable
@@ -412,63 +475,18 @@ function GetTags() end
-- @treturn bool -- @treturn bool
function HasTag(allowedTags) end function HasTag(allowedTags) end
--- ApplyStatusEffects --- ServerEventWrite
-- @realm shared
-- @tparam function type
-- @tparam number deltaTime
-- @tparam Character character
-- @tparam Limb limb
-- @tparam Entity useTarget
-- @tparam bool isNetworkEvent
-- @tparam Nullable`1 worldPosition
function ApplyStatusEffects(type, deltaTime, character, limb, useTarget, isNetworkEvent, worldPosition) end
--- ApplyStatusEffect
-- @realm shared
-- @tparam StatusEffect effect
-- @tparam function type
-- @tparam number deltaTime
-- @tparam Character character
-- @tparam Limb limb
-- @tparam Entity useTarget
-- @tparam bool isNetworkEvent
-- @tparam bool checkCondition
-- @tparam Nullable`1 worldPosition
function ApplyStatusEffect(effect, type, deltaTime, character, limb, useTarget, isNetworkEvent, checkCondition, worldPosition) end
--- AddDamage
-- @realm shared
-- @tparam Character attacker
-- @tparam Vector2 worldPosition
-- @tparam Attack attack
-- @tparam number deltaTime
-- @tparam bool playSound
-- @treturn AttackResult
function AddDamage(attacker, worldPosition, attack, deltaTime, playSound) end
--- SendPendingNetworkUpdates
-- @realm shared
function SendPendingNetworkUpdates() end
--- Update
-- @realm shared
-- @tparam number deltaTime
-- @tparam Camera cam
function Update(deltaTime, cam) end
--- ServerWrite
-- @realm shared -- @realm shared
-- @tparam IWriteMessage msg -- @tparam IWriteMessage msg
-- @tparam Client c -- @tparam Client c
-- @tparam Object[] extraData -- @tparam IData extraData
function ServerWrite(msg, c, extraData) end function ServerEventWrite(msg, c, extraData) end
--- ServerRead --- ServerEventRead
-- @realm shared -- @realm shared
-- @tparam ClientNetObject type
-- @tparam IReadMessage msg -- @tparam IReadMessage msg
-- @tparam Client c -- @tparam Client c
function ServerRead(type, msg, c) end function ServerEventRead(msg, c) end
--- WriteSpawnData --- WriteSpawnData
-- @realm shared -- @realm shared
@@ -476,7 +494,8 @@ function ServerRead(type, msg, c) end
-- @tparam number entityID -- @tparam number entityID
-- @tparam number originalInventoryID -- @tparam number originalInventoryID
-- @tparam Byte originalItemContainerIndex -- @tparam Byte originalItemContainerIndex
function WriteSpawnData(msg, entityID, originalInventoryID, originalItemContainerIndex) end -- @tparam number originalSlotIndex
function WriteSpawnData(msg, entityID, originalInventoryID, originalItemContainerIndex, originalSlotIndex) end
--- GetPositionUpdateInterval --- GetPositionUpdateInterval
-- @realm shared -- @realm shared
@@ -488,8 +507,7 @@ function GetPositionUpdateInterval(recipient) end
-- @realm shared -- @realm shared
-- @tparam IWriteMessage msg -- @tparam IWriteMessage msg
-- @tparam Client c -- @tparam Client c
-- @tparam Object[] extraData function ServerWritePosition(msg, c) end
function ServerWritePosition(msg, c, extraData) end
--- CreateServerEvent --- CreateServerEvent
-- @realm shared -- @realm shared
@@ -499,7 +517,7 @@ function CreateServerEvent(ic) end
--- CreateServerEvent --- CreateServerEvent
-- @realm shared -- @realm shared
-- @tparam T ic -- @tparam T ic
-- @tparam Object[] extraData -- @tparam IEventData extraData
function CreateServerEvent(ic, extraData) end function CreateServerEvent(ic, extraData) end
--- CreateServerEventString --- CreateServerEventString
@@ -521,6 +539,11 @@ function CreateServerEventString(component, extraData) end
-- @treturn bool -- @treturn bool
function IsInteractable(character) end function IsInteractable(character) end
--- AddLinked
-- @realm shared
-- @tparam MapEntity entity
function AddLinked(entity) end
--- ResolveLinks --- ResolveLinks
-- @realm shared -- @realm shared
-- @tparam IdRemap childRemap -- @tparam IdRemap childRemap
@@ -534,13 +557,13 @@ function IsMouseOn(position) end
--- HasUpgrade --- HasUpgrade
-- @realm shared -- @realm shared
-- @tparam string identifier -- @tparam Identifier identifier
-- @treturn bool -- @treturn bool
function HasUpgrade(identifier) end function HasUpgrade(identifier) end
--- GetUpgrade --- GetUpgrade
-- @realm shared -- @realm shared
-- @tparam string identifier -- @tparam Identifier identifier
-- @treturn Upgrade -- @treturn Upgrade
function GetUpgrade(identifier) end function GetUpgrade(identifier) end
@@ -741,9 +764,9 @@ function GetHashCode() end
-- @Color ContainerColor -- @Color ContainerColor
--- ---
-- ContainerIdentifier, Field of type string -- ContainerIdentifier, Field of type Identifier
-- @realm shared -- @realm shared
-- @string ContainerIdentifier -- @Identifier ContainerIdentifier
--- ---
-- SonarLabel, Field of type string -- SonarLabel, Field of type string
@@ -896,9 +919,9 @@ function GetHashCode() end
-- @table LastSentSignalRecipients -- @table LastSentSignalRecipients
--- ---
-- ConfigFile, Field of type string -- ConfigFilePath, Field of type ContentPath
-- @realm shared -- @realm shared
-- @string ConfigFile -- @ContentPath ConfigFilePath
--- ---
-- AllowedSlots, Field of type Enumerable -- AllowedSlots, Field of type Enumerable
@@ -970,6 +993,16 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @bool OrderedToBeIgnored -- @bool OrderedToBeIgnored
---
-- HasBallastFloraInHull, Field of type bool
-- @realm shared
-- @bool HasBallastFloraInHull
---
-- IsClaimedByBallastFlora, Field of type bool
-- @realm shared
-- @bool IsClaimedByBallastFlora
--- ---
-- DisallowedUpgrades, Field of type string -- DisallowedUpgrades, Field of type string
-- @realm shared -- @realm shared
@@ -1011,9 +1044,9 @@ function GetHashCode() end
-- @bool DrawOverWater -- @bool DrawOverWater
--- ---
-- AllowedLinks, Field of type table -- AllowedLinks, Field of type Enumerable
-- @realm shared -- @realm shared
-- @table AllowedLinks -- @Enumerable AllowedLinks
--- ---
-- ResizeHorizontal, Field of type bool -- ResizeHorizontal, Field of type bool
@@ -1105,6 +1138,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number SpawnTime -- @number SpawnTime
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
--- ---
-- PreviousParentInventory, Field of type Inventory -- PreviousParentInventory, Field of type Inventory
-- @realm shared -- @realm shared
@@ -1151,14 +1189,14 @@ function GetHashCode() end
-- @bool Item.ShowLinks -- @bool Item.ShowLinks
--- ---
-- Item.connectionPairs, Field of type ValueTuple`2[] -- Item.connectionPairs, Field of type ImmutableArray`1
-- @realm shared -- @realm shared
-- @ValueTuple`2[] Item.connectionPairs -- @ImmutableArray`1 Item.connectionPairs
--- ---
-- prefab, Field of type MapEntityPrefab -- Prefab, Field of type MapEntityPrefab
-- @realm shared -- @realm shared
-- @MapEntityPrefab prefab -- @MapEntityPrefab Prefab
--- ---
-- unresolvedLinkedToID, Field of type table -- unresolvedLinkedToID, Field of type table
@@ -1166,9 +1204,9 @@ function GetHashCode() end
-- @table unresolvedLinkedToID -- @table unresolvedLinkedToID
--- ---
-- disallowedUpgrades, Field of type HashSet`1 -- DisallowedUpgradeSet, Field of type HashSet`1
-- @realm shared -- @realm shared
-- @HashSet`1 disallowedUpgrades -- @HashSet`1 DisallowedUpgradeSet
--- ---
-- linkedTo, Field of type table -- linkedTo, Field of type table
@@ -1200,3 +1238,13 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number ID -- @number ID
---
-- CreationStackTrace, Field of type string
-- @realm shared
-- @string CreationStackTrace
---
-- CreationIndex, Field of type number
-- @realm shared
-- @number CreationIndex
+14 -9
View File
@@ -76,19 +76,18 @@ function CreateNetworkEvent() end
-- @tparam Item item -- @tparam Item item
function RemoveItem(item) end function RemoveItem(item) end
--- ServerRead --- ServerEventRead
-- @realm shared -- @realm shared
-- @tparam ClientNetObject type
-- @tparam IReadMessage msg -- @tparam IReadMessage msg
-- @tparam Client c -- @tparam Client c
function ServerRead(type, msg, c) end function ServerEventRead(msg, c) end
--- ServerWrite --- ServerEventWrite
-- @realm shared -- @realm shared
-- @tparam IWriteMessage msg -- @tparam IWriteMessage msg
-- @tparam Client c -- @tparam Client c
-- @tparam Object[] extraData -- @tparam IData extraData
function ServerWrite(msg, c, extraData) end function ServerEventWrite(msg, c, extraData) end
--- Contains --- Contains
-- @realm shared -- @realm shared
@@ -179,14 +178,14 @@ function FindAllItems(predicate, recursive, list) end
--- FindItemByTag --- FindItemByTag
-- @realm shared -- @realm shared
-- @tparam string tag -- @tparam Identifier tag
-- @tparam bool recursive -- @tparam bool recursive
-- @treturn Item -- @treturn Item
function FindItemByTag(tag, recursive) end function FindItemByTag(tag, recursive) end
--- FindItemByIdentifier --- FindItemByIdentifier
-- @realm shared -- @realm shared
-- @tparam string identifier -- @tparam Identifier identifier
-- @tparam bool recursive -- @tparam bool recursive
-- @treturn Item -- @treturn Item
function FindItemByIdentifier(identifier, recursive) end function FindItemByIdentifier(identifier, recursive) end
@@ -203,10 +202,16 @@ function ForceToSlot(item, index) end
-- @tparam number index -- @tparam number index
function ForceRemoveFromSlot(item, index) end function ForceRemoveFromSlot(item, index) end
--- SharedRead
-- @realm shared
-- @tparam IReadMessage msg
-- @tparam List`1[]& newItemIds
function SharedRead(msg, newItemIds) end
--- SharedWrite --- SharedWrite
-- @realm shared -- @realm shared
-- @tparam IWriteMessage msg -- @tparam IWriteMessage msg
-- @tparam Object[] extraData -- @tparam IData extraData
function SharedWrite(msg, extraData) end function SharedWrite(msg, extraData) end
--- DeleteAllItems --- DeleteAllItems
+161 -178
View File
@@ -36,56 +36,36 @@ function ItemPrefab.GetItemPrefab(itemNameOrId) end
-- @string Identifier -- @string Identifier
--- RemoveByFile
-- @realm shared
-- @tparam string filePath
function ItemPrefab.RemoveByFile(filePath) end
--- LoadFromFile
-- @realm shared
-- @tparam ContentFile file
function ItemPrefab.LoadFromFile(file) end
--- LoadAll
-- @realm shared
-- @tparam Enumerable files
function ItemPrefab.LoadAll(files) end
--- InitFabricationRecipes
-- @realm shared
function ItemPrefab.InitFabricationRecipes() end
--- GenerateLegacyIdentifier --- GenerateLegacyIdentifier
-- @realm shared -- @realm shared
-- @tparam string name -- @tparam string name
-- @treturn string -- @treturn Identifier
function ItemPrefab.GenerateLegacyIdentifier(name) end function ItemPrefab.GenerateLegacyIdentifier(name) end
--- GetTreatmentSuitability --- GetTreatmentSuitability
-- @realm shared -- @realm shared
-- @tparam string treatmentIdentifier -- @tparam Identifier treatmentIdentifier
-- @treturn number -- @treturn number
function GetTreatmentSuitability(treatmentIdentifier) end function GetTreatmentSuitability(treatmentIdentifier) end
--- GetPriceInfo --- GetPriceInfo
-- @realm shared -- @realm shared
-- @tparam Location location -- @tparam StoreInfo store
-- @treturn PriceInfo -- @treturn PriceInfo
function GetPriceInfo(location) end function GetPriceInfo(store) end
--- CanBeBoughtAtLocation --- CanBeBoughtFrom
-- @realm shared -- @realm shared
-- @tparam Location location -- @tparam StoreInfo store
-- @tparam PriceInfo& priceInfo -- @tparam PriceInfo& priceInfo
-- @treturn bool -- @treturn bool
function CanBeBoughtAtLocation(location, priceInfo) end function CanBeBoughtFrom(store, priceInfo) end
--- Find --- CanBeBoughtFrom
-- @realm shared -- @realm shared
-- @tparam string name -- @tparam Location location
-- @tparam string identifier -- @treturn bool
-- @treturn ItemPrefab function CanBeBoughtFrom(location) end
function ItemPrefab.Find(name, identifier) end
--- GetMinPrice --- GetMinPrice
-- @realm shared -- @realm shared
@@ -105,6 +85,13 @@ function GetBuyPricesUnder(maxCost) end
-- @treturn ImmutableDictionary`2 -- @treturn ImmutableDictionary`2
function GetSellPricesOver(minCost, sellingImportant) end function GetSellPricesOver(minCost, sellingImportant) end
--- Find
-- @realm shared
-- @tparam string name
-- @tparam Identifier identifier
-- @treturn ItemPrefab
function ItemPrefab.Find(name, identifier) end
--- IsContainerPreferred --- IsContainerPreferred
-- @realm shared -- @realm shared
-- @tparam Item item -- @tparam Item item
@@ -118,7 +105,7 @@ function IsContainerPreferred(item, targetContainer, isPreferencesDefined, isSec
--- IsContainerPreferred --- IsContainerPreferred
-- @realm shared -- @realm shared
-- @tparam Item item -- @tparam Item item
-- @tparam String[] identifiersOrTags -- @tparam Identifier[] identifiersOrTags
-- @tparam Boolean& isPreferencesDefined -- @tparam Boolean& isPreferencesDefined
-- @tparam Boolean& isSecondary -- @tparam Boolean& isSecondary
-- @treturn bool -- @treturn bool
@@ -138,6 +125,15 @@ function ItemPrefab.IsContainerPreferred(preferences, c) end
-- @treturn bool -- @treturn bool
function ItemPrefab.IsContainerPreferred(preferences, ids) end function ItemPrefab.IsContainerPreferred(preferences, ids) end
--- Dispose
-- @realm shared
function Dispose() end
--- InheritFrom
-- @realm shared
-- @tparam ItemPrefab parent
function InheritFrom(parent) end
--- ToString --- ToString
-- @realm shared -- @realm shared
-- @treturn string -- @treturn string
@@ -149,24 +145,6 @@ function ToString() end
-- @treturn ItemPrefab -- @treturn ItemPrefab
function ItemPrefab.GetItemPrefab(itemNameOrId) end function ItemPrefab.GetItemPrefab(itemNameOrId) end
--- AddToSpawnQueue
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam Vector2 position
-- @tparam Object spawned
function ItemPrefab.AddToSpawnQueue(itemPrefab, position, spawned) end
--- AddToSpawnQueue
-- @realm shared
-- @tparam ItemPrefab itemPrefab
-- @tparam Inventory inventory
-- @tparam Object spawned
function ItemPrefab.AddToSpawnQueue(itemPrefab, inventory, spawned) end
--- Dispose
-- @realm shared
function Dispose() end
--- GetItemNameTextId --- GetItemNameTextId
-- @realm shared -- @realm shared
-- @treturn string -- @treturn string
@@ -179,7 +157,7 @@ function GetHullNameTextId() end
--- GetAllowedUpgrades --- GetAllowedUpgrades
-- @realm shared -- @realm shared
-- @treturn String[] -- @treturn Enumerable
function GetAllowedUpgrades() end function GetAllowedUpgrades() end
--- HasSubCategory --- HasSubCategory
@@ -229,24 +207,49 @@ function Equals(obj) end
function GetHashCode() end function GetHashCode() end
--- ---
-- Name, Field of type string -- Size, Field of type Vector2
-- @realm shared -- @realm shared
-- @string Name -- @Vector2 Size
--- ---
-- ConfigElement, Field of type XElement -- DefaultPrice, Field of type PriceInfo
-- @realm shared -- @realm shared
-- @XElement ConfigElement -- @PriceInfo DefaultPrice
--- ---
-- DeconstructItems, Field of type table -- CanBeBought, Field of type bool
-- @realm shared -- @realm shared
-- @table DeconstructItems -- @bool CanBeBought
--- ---
-- FabricationRecipes, Field of type table -- CanBeSold, Field of type bool
-- @realm shared -- @realm shared
-- @table FabricationRecipes -- @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 -- DeconstructTime, Field of type number
@@ -258,6 +261,86 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @bool AllowDeconstruct -- @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 -- InteractDistance, Field of type number
-- @realm shared -- @realm shared
@@ -433,26 +516,6 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @bool ShowContentsInTooltip -- @bool ShowContentsInTooltip
---
-- PreferredContainers, Field of type table
-- @realm shared
-- @table PreferredContainers
---
-- SwappableItem, Field of type SwappableItem
-- @realm shared
-- @SwappableItem SwappableItem
---
-- LevelCommonness, Field of type table
-- @realm shared
-- @table LevelCommonness
---
-- LevelQuantity, Field of type table
-- @realm shared
-- @table LevelQuantity
--- ---
-- CanFlipX, Field of type bool -- CanFlipX, Field of type bool
-- @realm shared -- @realm shared
@@ -468,16 +531,6 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @bool IsDangerous -- @bool IsDangerous
---
-- CanSpriteFlipX, Field of type bool
-- @realm shared
-- @bool CanSpriteFlipX
---
-- CanSpriteFlipY, Field of type bool
-- @realm shared
-- @bool CanSpriteFlipY
--- ---
-- MaxStackSize, Field of type number -- MaxStackSize, Field of type number
-- @realm shared -- @realm shared
@@ -489,39 +542,14 @@ function GetHashCode() end
-- @bool AllowDroppingOnSwap -- @bool AllowDroppingOnSwap
--- ---
-- AllowDroppingOnSwapWith, Field of type Enumerable -- AllowDroppingOnSwapWith, Field of type ImmutableHashSet`1
-- @realm shared -- @realm shared
-- @Enumerable AllowDroppingOnSwapWith -- @ImmutableHashSet`1 AllowDroppingOnSwapWith
--- ---
-- Size, Field of type Vector2 -- VariantOf, Field of type Identifier
-- @realm shared -- @realm shared
-- @Vector2 Size -- @Identifier VariantOf
---
-- CanBeBought, Field of type bool
-- @realm shared
-- @bool CanBeBought
---
-- CanBeSold, Field of type bool
-- @realm shared
-- @bool CanBeSold
---
-- RandomDeconstructionOutput, Field of type bool
-- @realm shared
-- @bool RandomDeconstructionOutput
---
-- RandomDeconstructionOutputAmount, Field of type number
-- @realm shared
-- @number RandomDeconstructionOutputAmount
---
-- UIntIdentifier, Field of type number
-- @realm shared
-- @number UIntIdentifier
--- ---
-- ResizeHorizontal, Field of type bool -- ResizeHorizontal, Field of type bool
@@ -534,34 +562,9 @@ function GetHashCode() end
-- @bool ResizeVertical -- @bool ResizeVertical
--- ---
-- OriginalName, Field of type string -- Description, Field of type LocalizedString
-- @realm shared -- @realm shared
-- @string OriginalName -- @LocalizedString Description
---
-- Identifier, Field of type string
-- @realm shared
-- @string Identifier
---
-- FilePath, Field of type string
-- @realm shared
-- @string FilePath
---
-- ContentPackage, Field of type ContentPackage
-- @realm shared
-- @ContentPackage ContentPackage
---
-- Tags, Field of type HashSet`1
-- @realm shared
-- @HashSet`1 Tags
---
-- Description, Field of type string
-- @realm shared
-- @string Description
--- ---
-- AllowedUpgrades, Field of type string -- AllowedUpgrades, Field of type string
@@ -583,16 +586,6 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @bool Linkable -- @bool Linkable
---
-- AllowedLinks, Field of type table
-- @realm shared
-- @table AllowedLinks
---
-- Category, Field of type MapEntityCategory
-- @realm shared
-- @MapEntityCategory Category
--- ---
-- SpriteColor, Field of type Color -- SpriteColor, Field of type Color
-- @realm shared -- @realm shared
@@ -604,34 +597,19 @@ function GetHashCode() end
-- @number Scale -- @number Scale
--- ---
-- Aliases, Field of type HashSet`1 -- UintIdentifier, Field of type number
-- @realm shared -- @realm shared
-- @HashSet`1 Aliases -- @number UintIdentifier
--- ---
-- DefaultPrice, Field of type PriceInfo -- ContentPackage, Field of type ContentPackage
-- @realm shared -- @realm shared
-- @PriceInfo DefaultPrice -- @ContentPackage ContentPackage
--- ---
-- Triggers, Field of type table -- FilePath, Field of type ContentPath
-- @realm shared -- @realm shared
-- @table Triggers -- @ContentPath FilePath
---
-- IsOverride, Field of type bool
-- @realm shared
-- @bool IsOverride
---
-- VariantOf, Field of type ItemPrefab
-- @realm shared
-- @ItemPrefab VariantOf
---
-- AllowAsExtraCargo, Field of type Nullable`1
-- @realm shared
-- @Nullable`1 AllowAsExtraCargo
--- ---
-- ItemPrefab.Prefabs, Field of type PrefabCollection`1 -- ItemPrefab.Prefabs, Field of type PrefabCollection`1
@@ -639,7 +617,12 @@ function GetHashCode() end
-- @PrefabCollection`1 ItemPrefab.Prefabs -- @PrefabCollection`1 ItemPrefab.Prefabs
--- ---
-- sprite, Field of type Sprite -- Identifier, Field of type Identifier
-- @realm shared -- @realm shared
-- @Sprite sprite -- @Identifier Identifier
---
-- ContentFile, Field of type ContentFile
-- @realm shared
-- @ContentFile ContentFile
+6 -6
View File
@@ -19,13 +19,13 @@ function Job.Random(randSync) end
--- GetSkillLevel --- GetSkillLevel
-- @realm shared -- @realm shared
-- @tparam string skillIdentifier -- @tparam Identifier skillIdentifier
-- @treturn number -- @treturn number
function GetSkillLevel(skillIdentifier) end function GetSkillLevel(skillIdentifier) end
--- IncreaseSkillLevel --- IncreaseSkillLevel
-- @realm shared -- @realm shared
-- @tparam string skillIdentifier -- @tparam Identifier skillIdentifier
-- @tparam number increase -- @tparam number increase
-- @tparam bool increasePastMax -- @tparam bool increasePastMax
function IncreaseSkillLevel(skillIdentifier, increase, increasePastMax) end function IncreaseSkillLevel(skillIdentifier, increase, increasePastMax) end
@@ -64,14 +64,14 @@ function Equals(obj) end
function GetHashCode() end function GetHashCode() end
--- ---
-- Name, Field of type string -- Name, Field of type LocalizedString
-- @realm shared -- @realm shared
-- @string Name -- @LocalizedString Name
--- ---
-- Description, Field of type string -- Description, Field of type LocalizedString
-- @realm shared -- @realm shared
-- @string Description -- @LocalizedString Description
--- ---
-- Prefab, Field of type JobPrefab -- Prefab, Field of type JobPrefab
+43 -53
View File
@@ -26,21 +26,6 @@ function JobPrefab.Get(identifier) end
-- @treturn JobPrefab -- @treturn JobPrefab
function JobPrefab.Random(sync) end function JobPrefab.Random(sync) end
--- LoadAll
-- @realm shared
-- @tparam Enumerable files
function JobPrefab.LoadAll(files) end
--- LoadFromFile
-- @realm shared
-- @tparam ContentFile file
function JobPrefab.LoadFromFile(file) end
--- RemoveByFile
-- @realm shared
-- @tparam string filePath
function JobPrefab.RemoveByFile(filePath) end
--- GetType --- GetType
-- @realm shared -- @realm shared
-- @treturn Type -- @treturn Type
@@ -72,36 +57,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @Color UIColor -- @Color UIColor
---
-- Identifier, Field of type string
-- @realm shared
-- @string Identifier
---
-- Name, Field of type string
-- @realm shared
-- @string Name
--- ---
-- IdleBehavior, Field of type BehaviorType -- IdleBehavior, Field of type BehaviorType
-- @realm shared -- @realm shared
-- @BehaviorType IdleBehavior -- @BehaviorType IdleBehavior
---
-- OriginalName, Field of type string
-- @realm shared
-- @string OriginalName
---
-- ContentPackage, Field of type ContentPackage
-- @realm shared
-- @ContentPackage ContentPackage
---
-- Description, Field of type string
-- @realm shared
-- @string Description
--- ---
-- OnlyJobSpecificDialog, Field of type bool -- OnlyJobSpecificDialog, Field of type bool
-- @realm shared -- @realm shared
@@ -158,34 +118,44 @@ function GetHashCode() end
-- @SkillPrefab PrimarySkill -- @SkillPrefab PrimarySkill
--- ---
-- FilePath, Field of type string -- Element, Field of type ContentXElement
-- @realm shared -- @realm shared
-- @string FilePath -- @ContentXElement Element
--- ---
-- Element, Field of type XElement -- ClothingElement, Field of type ContentXElement
-- @realm shared -- @realm shared
-- @XElement Element -- @ContentXElement ClothingElement
---
-- ClothingElement, Field of type XElement
-- @realm shared
-- @XElement ClothingElement
--- ---
-- Variants, Field of type number -- Variants, Field of type number
-- @realm shared -- @realm shared
-- @number Variants -- @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 -- ItemSets, Field of type table
-- @realm shared -- @realm shared
-- @table ItemSets -- @table ItemSets
--- ---
-- PreviewItems, Field of type table -- PreviewItems, Field of type ImmutableDictionary`2
-- @realm shared -- @realm shared
-- @table PreviewItems -- @ImmutableDictionary`2 PreviewItems
--- ---
-- Skills, Field of type table -- Skills, Field of type table
@@ -202,6 +172,16 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @table AppropriateOrders -- @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 -- Icon, Field of type Sprite
-- @realm shared -- @realm shared
@@ -218,7 +198,17 @@ function GetHashCode() end
-- @PrefabCollection`1 JobPrefab.Prefabs -- @PrefabCollection`1 JobPrefab.Prefabs
--- ---
-- JobPrefab.NoJobElement, Field of type XElement -- JobPrefab.NoJobElement, Field of type ContentXElement
-- @realm shared -- @realm shared
-- @XElement JobPrefab.NoJobElement -- @ContentXElement JobPrefab.NoJobElement
---
-- Identifier, Field of type Identifier
-- @realm shared
-- @Identifier Identifier
---
-- ContentFile, Field of type ContentFile
-- @realm shared
-- @ContentFile ContentFile
+18 -3
View File
@@ -154,12 +154,12 @@ function DebugSetEndLocation(newEndLocation) end
-- @realm shared -- @realm shared
function Remove() end function Remove() end
--- ServerWrite --- ServerEventWrite
-- @realm shared -- @realm shared
-- @tparam IWriteMessage msg -- @tparam IWriteMessage msg
-- @tparam Client c -- @tparam Client c
-- @tparam Object[] extraData -- @tparam IData extraData
function ServerWrite(msg, c, extraData) end function ServerEventWrite(msg, c, extraData) end
--- Generate --- Generate
-- @realm shared -- @realm shared
@@ -477,6 +477,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number SpawnTime -- @number SpawnTime
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
--- ---
-- AbyssIslands, Field of type table -- AbyssIslands, Field of type table
-- @realm shared -- @realm shared
@@ -542,3 +547,13 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number ID -- @number ID
---
-- CreationStackTrace, Field of type string
-- @realm shared
-- @string CreationStackTrace
---
-- CreationIndex, Field of type number
-- @realm shared
-- @number CreationIndex
+7 -2
View File
@@ -116,9 +116,9 @@ function GetHashCode() end
-- @number SelectedModeIndex -- @number SelectedModeIndex
--- ---
-- SelectedModeIdentifier, Field of type string -- SelectedModeIdentifier, Field of type Identifier
-- @realm shared -- @realm shared
-- @string SelectedModeIdentifier -- @Identifier SelectedModeIdentifier
--- ---
-- SelectedMode, Field of type GameModePreset -- SelectedMode, Field of type GameModePreset
@@ -155,6 +155,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @Camera Cam -- @Camera Cam
---
-- IsEditor, Field of type bool
-- @realm shared
-- @bool IsEditor
--- ---
-- RadiationEnabled, Field of type bool -- RadiationEnabled, Field of type bool
-- @realm shared -- @realm shared
+25 -4
View File
@@ -80,12 +80,18 @@ function EnableObstructedWaypoints(otherSub) end
-- @realm shared -- @realm shared
function RefreshOutdoorNodes() end function RefreshOutdoorNodes() end
--- ServerWrite --- ServerWritePosition
-- @realm shared -- @realm shared
-- @tparam IWriteMessage msg -- @tparam IWriteMessage msg
-- @tparam Client c -- @tparam Client c
-- @tparam Object[] extraData function ServerWritePosition(msg, c) end
function ServerWrite(msg, c, extraData) end
--- ServerEventWrite
-- @realm shared
-- @tparam IWriteMessage msg
-- @tparam Client c
-- @tparam IData extraData
function ServerEventWrite(msg, c, extraData) end
--- ToString --- ToString
-- @realm shared -- @realm shared
@@ -99,7 +105,7 @@ function CalculateBasePrice() end
--- AttemptBallastFloraInfection --- AttemptBallastFloraInfection
-- @realm shared -- @realm shared
-- @tparam string identifier -- @tparam Identifier identifier
-- @tparam number deltaTime -- @tparam number deltaTime
-- @tparam number probability -- @tparam number probability
function AttemptBallastFloraInfection(identifier, deltaTime, probability) end function AttemptBallastFloraInfection(identifier, deltaTime, probability) end
@@ -555,6 +561,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number SpawnTime -- @number SpawnTime
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
--- ---
-- TeamID, Field of type CharacterTeamType -- TeamID, Field of type CharacterTeamType
-- @realm shared -- @realm shared
@@ -600,3 +611,13 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number ID -- @number ID
---
-- CreationStackTrace, Field of type string
-- @realm shared
-- @string CreationStackTrace
---
-- CreationIndex, Field of type number
-- @realm shared
-- @number CreationIndex
+9 -9
View File
@@ -72,6 +72,11 @@ function SaveAs(filePath, previewImage) end
-- @tparam SubmarineInfo subInfo -- @tparam SubmarineInfo subInfo
function SubmarineInfo.AddToSavedSubs(subInfo) end function SubmarineInfo.AddToSavedSubs(subInfo) end
--- RemoveSavedSub
-- @realm shared
-- @tparam string filePath
function SubmarineInfo.RemoveSavedSub(filePath) end
--- RefreshSavedSub --- RefreshSavedSub
-- @realm shared -- @realm shared
-- @tparam string filePath -- @tparam string filePath
@@ -131,14 +136,14 @@ function GetHashCode() end
-- @string Name -- @string Name
--- ---
-- DisplayName, Field of type string -- DisplayName, Field of type LocalizedString
-- @realm shared -- @realm shared
-- @string DisplayName -- @LocalizedString DisplayName
--- ---
-- Description, Field of type string -- Description, Field of type LocalizedString
-- @realm shared -- @realm shared
-- @string Description -- @LocalizedString Description
--- ---
-- Price, Field of type number -- Price, Field of type number
@@ -300,8 +305,3 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @table OutpostNPCs -- @table OutpostNPCs
---
-- SubmarineInfo.SavePath, Field of type string
-- @realm shared
-- @string SubmarineInfo.SavePath
+29 -9
View File
@@ -55,7 +55,7 @@ function InitializeLinks() end
--- Load --- Load
-- @realm shared -- @realm shared
-- @tparam XElement element -- @tparam ContentXElement element
-- @tparam Submarine submarine -- @tparam Submarine submarine
-- @tparam IdRemap idRemap -- @tparam IdRemap idRemap
-- @treturn WayPoint -- @treturn WayPoint
@@ -75,6 +75,11 @@ function ShallowRemove() end
-- @realm shared -- @realm shared
function Remove() end function Remove() end
--- AddLinked
-- @realm shared
-- @tparam MapEntity entity
function AddLinked(entity) end
--- ResolveLinks --- ResolveLinks
-- @realm shared -- @realm shared
-- @tparam IdRemap childRemap -- @tparam IdRemap childRemap
@@ -93,13 +98,13 @@ function IsMouseOn(position) end
--- HasUpgrade --- HasUpgrade
-- @realm shared -- @realm shared
-- @tparam string identifier -- @tparam Identifier identifier
-- @treturn bool -- @treturn bool
function HasUpgrade(identifier) end function HasUpgrade(identifier) end
--- GetUpgrade --- GetUpgrade
-- @realm shared -- @realm shared
-- @tparam string identifier -- @tparam Identifier identifier
-- @treturn Upgrade -- @treturn Upgrade
function GetUpgrade(identifier) end function GetUpgrade(identifier) end
@@ -276,9 +281,9 @@ function GetHashCode() end
-- @bool Linkable -- @bool Linkable
--- ---
-- AllowedLinks, Field of type table -- AllowedLinks, Field of type Enumerable
-- @realm shared -- @realm shared
-- @table AllowedLinks -- @Enumerable AllowedLinks
--- ---
-- ResizeHorizontal, Field of type bool -- ResizeHorizontal, Field of type bool
@@ -395,6 +400,11 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number SpawnTime -- @number SpawnTime
---
-- ErrorLine, Field of type string
-- @realm shared
-- @string ErrorLine
--- ---
-- Ladders, Field of type Ladder -- Ladders, Field of type Ladder
-- @realm shared -- @realm shared
@@ -441,9 +451,9 @@ function GetHashCode() end
-- @number WayPoint.LadderWaypointInterval -- @number WayPoint.LadderWaypointInterval
--- ---
-- prefab, Field of type MapEntityPrefab -- Prefab, Field of type MapEntityPrefab
-- @realm shared -- @realm shared
-- @MapEntityPrefab prefab -- @MapEntityPrefab Prefab
--- ---
-- unresolvedLinkedToID, Field of type table -- unresolvedLinkedToID, Field of type table
@@ -451,9 +461,9 @@ function GetHashCode() end
-- @table unresolvedLinkedToID -- @table unresolvedLinkedToID
--- ---
-- disallowedUpgrades, Field of type HashSet`1 -- DisallowedUpgradeSet, Field of type HashSet`1
-- @realm shared -- @realm shared
-- @HashSet`1 disallowedUpgrades -- @HashSet`1 DisallowedUpgradeSet
--- ---
-- linkedTo, Field of type table -- linkedTo, Field of type table
@@ -485,3 +495,13 @@ function GetHashCode() end
-- @realm shared -- @realm shared
-- @number ID -- @number ID
---
-- CreationStackTrace, Field of type string
-- @realm shared
-- @string CreationStackTrace
---
-- CreationIndex, Field of type number
-- @realm shared
-- @number CreationIndex
+3 -2
View File
@@ -67,12 +67,12 @@ local prefab = ItemPrefab.GetItemPrefab("screwdriver")
local firstPlayerCharacter = Client.ClientList[1].Character local firstPlayerCharacter = Client.ClientList[1].Character
-- Spawn on the world -- Spawn on the world
Entity.Spawner.AddToSpawnQueue(prefab, firstPlayerCharacter.WorldPosition, nil, nil, function(item) Entity.Spawner.AddItemToSpawnQueue(prefab, firstPlayerCharacter.WorldPosition, nil, nil, function(item)
print(item.Name .. " Has been spawned.") print(item.Name .. " Has been spawned.")
end) end)
-- Spawn inside an inventory -- Spawn inside an inventory
Entity.Spawner.AddToSpawnQueue(prefab, firstPlayerCharacter.Inventory, nil, nil, function(item) Entity.Spawner.AddItemToSpawnQueue(prefab, firstPlayerCharacter.Inventory, nil, nil, function(item)
print(item.Name .. " Has been spawned.") print(item.Name .. " Has been spawned.")
end) end)
``` ```
@@ -104,5 +104,6 @@ print(char.CharacterHealth.GetAffliction("burn", char.AnimController.Limbs[1]))
``` ```
local chatMessage = ChatMessage.Create("Sender name", "text here", ChatMessageType.MessageBox, nil, nil) local chatMessage = ChatMessage.Create("Sender name", "text here", ChatMessageType.MessageBox, nil, nil)
chatMessage.Color = Color(255, 255, 0, 255)
Game.SendDirectChatMessage(chatMessage, ChatMessageType.MessageBox) Game.SendDirectChatMessage(chatMessage, ChatMessageType.MessageBox)
``` ```
+13
View File
@@ -10,6 +10,19 @@ When creating a new Lua mod, you will need to create a new folder on the **Mods*
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. 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.
## 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:
```lua
-- this variable will be accessible to any other script, so you can use it to get the mod's path.
MyModGlobal = {}
MyModGlobal.Path = table.pack(...)[1]
dofile(MyModGlobal.Path .. "/Lua/yourscript.lua")
```
## Learning the libraries ## 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. 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.
@@ -1,21 +1,30 @@
# Installing Lua For Barotrauma Manually # 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.
## Adding Lua For Barotrauma to an existing server ## 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> 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> 2 - Extract the zip file<br>
3 - Copy the following files inside the extracted zip:<br> 3 - Copy the following files inside the extracted zip:<br>
- **DedicatedServer.deps.json** - **DedicatedServer.deps.json**
- **DedicatedServer.dll** - **DedicatedServer.dll**
- **DedicatedServer.pdb** - **DedicatedServer.pdb**
- **0Harmony.dll** - **0Harmony.dll**
- **MoonSharp.Interpreter.dll** - **MoonSharp.Interpreter.dll**
- **MonoMod.Common.dll** - **MonoMod.Common.dll**
- **Mono.Cecil.dll** - **Mono.Cecil.dll**
- **Mono.Cecil.Mdb.dll** - **Mono.Cecil.Mdb.dll**
- **Mono.Cecil.Pdb.dll** - **Mono.Cecil.Pdb.dll**
- **Mono.Cecil.Rocks.dll** - **Mono.Cecil.Rocks.dll**
- file that starts with **mscordaccore_amd64_amd64_** - **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 **mscordaccoreamd64amd64_**
- and the **Lua/** folder - and the **Lua/** folder
4 - Paste them to your existing server, and let it replace the files<br> 4 - Paste them to your existing server, and let it replace the files<br>
@@ -24,16 +33,24 @@
Same as above, but instead you need to copy/replace the following files: Same as above, but instead you need to copy/replace the following files:
- **Barotrauma.deps.json** - **Barotrauma.deps.json**
- **Barotrauma.dll** - **Barotrauma.dll**
- **0Harmony.dll** - **Barotrauma.pdb**
- **MoonSharp.Interpreter.dll** - **0Harmony.dll**
- **MoonSharp.Interpreter.dll**
- **MonoMod.Common.dll** - **MonoMod.Common.dll**
- **Mono.Cecil.dll** - **Mono.Cecil.dll**
- **Mono.Cecil.Mdb.dll** - **Mono.Cecil.Mdb.dll**
- **Mono.Cecil.Pdb.dll** - **Mono.Cecil.Pdb.dll**
- **Mono.Cecil.Rocks.dll** - **Mono.Cecil.Rocks.dll**
- file that starts with **mscordaccore_amd64_amd64_** - **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 **mscordaccoreamd64amd64_**
- and the **Lua/** folder - and the **Lua/** folder
@@ -53,7 +70,7 @@ Same as above, but instead you need to copy/replace the following files:
![](https://cdn.discordapp.com/attachments/799752463619325968/833133217300742154/unknown.png) ![](https://cdn.discordapp.com/attachments/799752463619325968/833133217300742154/unknown.png)
6 - Optional: Copy config_player.xml 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> 7 - Done! Now run DedicatedServer.exe to run the modded server or run Barotrauma.exe to run the modded client.<br>
@@ -64,4 +81,4 @@ Sometimes you will get steam initialization errors, most of the time it's becaus
## Checking if everything is working ## Checking if everything is working
If the commands `reloadlua` or `cl_reloadlua` work, it means you successfully installed the mod. If the commands `reloadlua` or `cl_reloadlua` work without errors, it means you successfully installed the mod.