Update Lara docs and dummy title level

This commit is contained in:
Lwmte 2025-03-13 20:03:32 +01:00
parent c49619d80e
commit ed342f089d
2 changed files with 30 additions and 32 deletions

Binary file not shown.

View file

@ -24,7 +24,7 @@ using namespace TEN::Entities::Generic;
/// Set player poison.
// @function LaraObject:SetPoison
// @tparam[opt] int Poison; maximum value is 128 (default 0)
// @tparam[opt] int poison Poison strength. Maximum value is 128 (default 0)
// @usage
// Lara:SetPoison(10)
void LaraObject::SetPoison(sol::optional<int> potency)
@ -41,9 +41,9 @@ void LaraObject::SetPoison(sol::optional<int> potency)
}
}
/// Get poison potency of Lara
/// Get poison potency of Lara.
// @function LaraObject:GetPoison
// @treturn int current poison potency
// @treturn int Current poison potency.
// @usage
// local poisonPotency = Lara:GetPoison()
int LaraObject::GetPoison() const
@ -52,9 +52,9 @@ int LaraObject::GetPoison() const
return lara->Status.Poison;
}
/// Set air value of Lara
/// Set air value of Lara.
// @function LaraObject:SetAir
// @tparam int Air value to give Lara. Maximum value is 1800.
// @tparam int air Air value to give Lara. Maximum value is 1800.
// @usage
// Lara:SetAir(100)
void LaraObject::SetAir(sol::optional<int> air)
@ -67,9 +67,9 @@ void LaraObject::SetAir(sol::optional<int> air)
lara->Status.Air = LARA_AIR_MAX;
}
/// Get air value of Lara
/// Get air value of Lara.
// @function LaraObject:GetAir
// @treturn int current air value
// @treturn int Current air value.
// @usage
// local currentAir = Lara:GetAir()
int LaraObject::GetAir() const
@ -78,9 +78,9 @@ int LaraObject::GetAir() const
return lara->Status.Air;
}
/// Set wetness value of Lara (causes dripping)
/// Set wetness value of Lara (causes dripping).
// @function LaraObject:SetWet
// @tparam int Wetness value. Maximum 255
// @tparam int wetness Wetness value. Maximum value is 255.
// @usage
// Lara:SetWet(100)
void LaraObject::SetWet(sol::optional<int> wetness)
@ -92,9 +92,9 @@ void LaraObject::SetWet(sol::optional<int> wetness)
i = value;
}
/// Get wetness value of Lara
/// Get wetness value of Lara.
// @function LaraObject:GetWet
// @treturn int current wetness value
// @treturn int Current wetness value.
// @usage
// local dripAmount = Lara:GetWet()
int LaraObject::GetWet() const
@ -103,9 +103,9 @@ int LaraObject::GetWet() const
return lara->Effect.DripNodes[0];
}
/// Set sprint energy value of Lara
/// Set sprint energy value of Lara.
// @function LaraObject:SetStamina
// @tparam int stamina to give to Lara; maximum value is 120.
// @tparam int stamina Stamina to give to Lara. Maximum value is 120.
// @usage
// Lara:SetStamina(120)
void LaraObject::SetStamina(sol::optional<int> value)
@ -118,7 +118,7 @@ void LaraObject::SetStamina(sol::optional<int> value)
lara->Status.Stamina = LARA_STAMINA_MAX;
}
/// Get stamina value of Lara
/// Get stamina value of Lara.
// @function LaraObject:GetStamina
// @treturn int current sprint value
// @usage
@ -129,17 +129,17 @@ int LaraObject::GetStamina() const
return lara->Status.Stamina;
}
/// Get the moveable's airborne status
/// Get the moveable's airborne status.
// @function Moveable:GetAirborne
// @treturn (bool) true if Lara state must react to aerial forces.
// @treturn bool True if Lara state must react to aerial forces.
bool LaraObject::GetAirborne() const
{
return _moveable->Animation.IsAirborne;
}
/// Set the moveable's airborne status
/// Set the moveable's airborne status.
// @function Moveable:SetAirborne
// @tparam (bool) New airborn status for Lara.
// @tparam bool airborne New airborne status for Lara.
void LaraObject::SetAirborne(bool newAirborne)
{
_moveable->Animation.IsAirborne = newAirborne;
@ -174,36 +174,34 @@ void LaraObject::ThrowAwayTorch()
}
}
//todo make these into enums - Squidshire 18/11/2022
/// Get actual hand status of Lara
/// Get actual hand status of Lara.
// @function LaraObject:GetHandStatus
// @usage
// local handStatus = Lara:GetHandStatus()
// @treturn int hand status 0=HandsFree, 1=Busy(climbing,etc), 2=WeaponDraw, 3=WeaponUndraw, 4=WeaponInHand.
// @treturn Objects.HandStatus Current hand status.
HandStatus LaraObject::GetHandStatus() const
{
auto* lara = GetLaraInfo(_moveable);
return HandStatus{ lara->Control.HandStatus };
}
/// Get actual weapon type of Lara
/// Get actual weapon type of Lara.
// @function LaraObject:GetWeaponType
// @usage
// local weaponType = Lara:GetWeaponType()
// @treturn Flow.WeaponType current weapon type.
// @treturn Objects.WeaponType Current weapon type.
LaraWeaponType LaraObject::GetWeaponType() const
{
auto* lara = GetLaraInfo(_moveable);
return LaraWeaponType{ lara->Control.Weapon.GunType };
}
/// Set Lara weapon type
/// Set Lara weapon type.
// @function LaraObject:SetWeaponType
// @usage
// Lara:SetWeaponType(WeaponType.PISTOLS, false)
// @tparam Flow.WeaponType weaponType
// @tparam bool activate if `true`, also draw the weapons or set torch lit. If `false`, keep weapons holstered or leave torch unlit.
// @tparam Objects.WeaponType weaponType New weapon type to set.
// @tparam bool activate If `true`, also draw the weapons or set torch lit. If `false`, keep weapons holstered or leave torch unlit.
void LaraObject::SetWeaponType(LaraWeaponType weaponType, bool activate)
{
auto* lara = GetLaraInfo(_moveable);
@ -231,7 +229,7 @@ void LaraObject::SetWeaponType(LaraWeaponType weaponType, bool activate)
/// Get player weapon ammo type.
// @function LaraObject:GetAmmoType
// @treturn Flow.AmmoType player weapon ammo type
// @treturn Objects.AmmoType Player weapon ammo type.
// @usage
// local CurrentAmmoType = Lara:GetAmmoType()
int LaraObject::GetAmmoType() const
@ -322,9 +320,9 @@ int LaraObject::GetAmmoType() const
return (int)*ammoType;
}
/// Get current weapon's ammo count
/// Get current weapon's ammo count.
// @function LaraObject:GetAmmoCount
// @treturn int current ammo count (-1 if infinite)
// @treturn int Current ammo count (-1 if infinite).
// @usage
// local equippedWeaponAmmoLeft = Lara:GetAmmoCount()
int LaraObject::GetAmmoCount() const
@ -334,9 +332,9 @@ int LaraObject::GetAmmoCount() const
return (ammo.HasInfinite()) ? -1 : (int)ammo.GetCount();
}
/// Get current vehicle, if it exists
/// Get current vehicle, if it exists.
// @function LaraObject:GetVehicle
// @treturn Objects.Moveable current vehicle (nil if no vehicle present)
// @treturn Objects.Moveable current vehicle (nil if no vehicle present).
// @usage
// local vehicle = Lara:GetVehicle()
std::unique_ptr<Moveable> LaraObject::GetVehicle() const