mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-11 04:56:49 +03:00
Doc fixes
This commit is contained in:
parent
9cf5164fe1
commit
80aca7572d
6 changed files with 16 additions and 13 deletions
|
@ -107,7 +107,7 @@ namespace Effects
|
||||||
@tparam float rot (default 0) specifies a speed with which it will rotate (0 = no rotation, negative = anticlockwise rotation, positive = clockwise rotation).
|
@tparam float rot (default 0) specifies a speed with which it will rotate (0 = no rotation, negative = anticlockwise rotation, positive = clockwise rotation).
|
||||||
@tparam Color startColor (default Color(255, 255, 255)) color at start of life
|
@tparam Color startColor (default Color(255, 255, 255)) color at start of life
|
||||||
@tparam Color endColor (default Color(255, 255, 255)) color to fade to - at the time of writing this fade will finish long before the end of the particle's life due to internal maths
|
@tparam Color endColor (default Color(255, 255, 255)) color to fade to - at the time of writing this fade will finish long before the end of the particle's life due to internal maths
|
||||||
@tparam BlendID blendMode (default TEN.Effects.BlendID.ALPHABLEND) How will we blend this with its surroundings?
|
@tparam Effects.BlendID blendMode (default TEN.Effects.BlendID.ALPHABLEND) How will we blend this with its surroundings?
|
||||||
@tparam int startSize (default 10) Size on spawn. A value of 15 is approximately the size of Lara's head.
|
@tparam int startSize (default 10) Size on spawn. A value of 15 is approximately the size of Lara's head.
|
||||||
@tparam int endSize (default 0) Size on death - the particle will linearly shrink or grow to this size during its lifespan
|
@tparam int endSize (default 0) Size on death - the particle will linearly shrink or grow to this size during its lifespan
|
||||||
@tparam float lifetime (default 2) Lifespan in seconds
|
@tparam float lifetime (default 2) Lifespan in seconds
|
||||||
|
|
|
@ -15,7 +15,7 @@ Represents the properties of an object as it appears in the inventory.
|
||||||
@function InventoryItem
|
@function InventoryItem
|
||||||
@tparam string nameKey key for the item's (localised) name.<br />
|
@tparam string nameKey key for the item's (localised) name.<br />
|
||||||
Corresponds to an entry in strings.lua.
|
Corresponds to an entry in strings.lua.
|
||||||
@tparam ObjID slot slot of inventory object to change
|
@tparam Objects.ObjID slot slot of inventory object to change
|
||||||
@tparam int yOffset y-axis offset (positive values move the item down).<br />
|
@tparam int yOffset y-axis offset (positive values move the item down).<br />
|
||||||
A value of about 100 will cause the item to display directly below its usual position.
|
A value of about 100 will cause the item to display directly below its usual position.
|
||||||
@tparam float scale item size (1 being standard size).<br />
|
@tparam float scale item size (1 being standard size).<br />
|
||||||
|
@ -24,7 +24,10 @@ and a value of 2 will cause the item to render at twice the size.
|
||||||
@tparam Rotation rot rotation about x, y, and z axes
|
@tparam Rotation rot rotation about x, y, and z axes
|
||||||
@tparam RotationAxis axis Axis to rotate about when the item is being looked at in the inventory.<br />
|
@tparam RotationAxis axis Axis to rotate about when the item is being looked at in the inventory.<br />
|
||||||
Note that this is entirely separate from the `rot` field described above.
|
Note that this is entirely separate from the `rot` field described above.
|
||||||
Must be RotationAxis.X, RotationAxis.Y or RotationAxis.Z.
|
Must one of the following:
|
||||||
|
X
|
||||||
|
Y
|
||||||
|
Z
|
||||||
e.g. `myItem.rotAxisWhenCurrent = RotationAxis.X`
|
e.g. `myItem.rotAxisWhenCurrent = RotationAxis.X`
|
||||||
@tparam int meshBits __Not currently implemented__ (will have no effect regardless of what you set it to)
|
@tparam int meshBits __Not currently implemented__ (will have no effect regardless of what you set it to)
|
||||||
@tparam ItemAction action is this usable, equippable, or examinable?<br/>
|
@tparam ItemAction action is this usable, equippable, or examinable?<br/>
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace InventoryHandler
|
||||||
//10 instead.
|
//10 instead.
|
||||||
//Has no effect if the player has an infinite number of that item.
|
//Has no effect if the player has an infinite number of that item.
|
||||||
//@function GiveItem
|
//@function GiveItem
|
||||||
//@tparam ObjID item the item to be added
|
//@tparam Objects.ObjID item the item to be added
|
||||||
//@int[opt] count the number of items to add (default: the amount you would get from a pickup)
|
//@int[opt] count the number of items to add (default: the amount you would get from a pickup)
|
||||||
static void InventoryAdd(GAME_OBJECT_ID slot, sol::optional<int> count)
|
static void InventoryAdd(GAME_OBJECT_ID slot, sol::optional<int> count)
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,7 @@ namespace InventoryHandler
|
||||||
//As in @{GiveItem}, omitting the count will remove the "default" amount of that item.
|
//As in @{GiveItem}, omitting the count will remove the "default" amount of that item.
|
||||||
//Has no effect if the player has an infinite number of the item.
|
//Has no effect if the player has an infinite number of the item.
|
||||||
//@function TakeItem
|
//@function TakeItem
|
||||||
//@tparam ObjID item the item to be removed
|
//@tparam Objects.ObjID item the item to be removed
|
||||||
//@int[opt] count the number of items to remove (default: the amount you would get from a pickup)
|
//@int[opt] count the number of items to remove (default: the amount you would get from a pickup)
|
||||||
static void InventoryRemove(GAME_OBJECT_ID slot, sol::optional<int> count)
|
static void InventoryRemove(GAME_OBJECT_ID slot, sol::optional<int> count)
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,7 @@ namespace InventoryHandler
|
||||||
|
|
||||||
///Get the amount the player holds of an item.
|
///Get the amount the player holds of an item.
|
||||||
//@function GetItemCount
|
//@function GetItemCount
|
||||||
//@tparam InvID item the ID item to check
|
//@tparam Objects.ObjID item the ID item to check
|
||||||
//@treturn int the amount of the item the player has in the inventory. -1 indicates an infinite amount of that item.
|
//@treturn int the amount of the item the player has in the inventory. -1 indicates an infinite amount of that item.
|
||||||
static int InventoryGetCount(GAME_OBJECT_ID slot)
|
static int InventoryGetCount(GAME_OBJECT_ID slot)
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ namespace InventoryHandler
|
||||||
///Set the amount of a certain item the player has in the inventory.
|
///Set the amount of a certain item the player has in the inventory.
|
||||||
//Similar to @{GiveItem} but replaces with the new amount instead of adding it.
|
//Similar to @{GiveItem} but replaces with the new amount instead of adding it.
|
||||||
//@function SetItemCount
|
//@function SetItemCount
|
||||||
//@tparam InvID item the ID of the item to be set.
|
//@tparam Objects.ObjID item the ID of the item to be set.
|
||||||
//@tparam int count the number of items the player will have. A value of -1 will give an infinite amount of that item.
|
//@tparam int count the number of items the player will have. A value of -1 will give an infinite amount of that item.
|
||||||
static void InventorySetCount(GAME_OBJECT_ID slot, int count)
|
static void InventorySetCount(GAME_OBJECT_ID slot, int count)
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,7 +81,7 @@ void AIObject::Register(sol::table & parent)
|
||||||
// For example, you could have a pair of AI_GUARD objects, and change one or the other two
|
// For example, you could have a pair of AI_GUARD objects, and change one or the other two
|
||||||
// AI_PATROL_1 based on whether the player has a certain item or not.
|
// AI_PATROL_1 based on whether the player has a certain item or not.
|
||||||
// @function AIObject:SetObjectID
|
// @function AIObject:SetObjectID
|
||||||
// @tparam ObjID ID the new ID
|
// @tparam Objects.ObjID ID the new ID
|
||||||
// @usage
|
// @usage
|
||||||
// aiObj = TEN.Objects.GetMoveableByName("ai_guard_sphinx_room")
|
// aiObj = TEN.Objects.GetMoveableByName("ai_guard_sphinx_room")
|
||||||
// aiObj:SetObjectID(TEN.Objects.ObjID.AI_PATROL1)
|
// aiObj:SetObjectID(TEN.Objects.ObjID.AI_PATROL1)
|
||||||
|
|
|
@ -74,7 +74,7 @@ bool operator==(Moveable const& first, Moveable const& second)
|
||||||
associated getters and setters. If you do not know what to set for these,
|
associated getters and setters. If you do not know what to set for these,
|
||||||
most can just be ignored (see usage).
|
most can just be ignored (see usage).
|
||||||
@function Moveable
|
@function Moveable
|
||||||
@tparam ObjID object ID
|
@tparam Objects.ObjID object ID
|
||||||
@tparam string name Lua name of the item
|
@tparam string name Lua name of the item
|
||||||
@tparam Vec3 position position in level
|
@tparam Vec3 position position in level
|
||||||
@tparam[opt] Rotation rotation rotation about x, y, and z axes (default Rotation(0, 0, 0))
|
@tparam[opt] Rotation rotation rotation about x, y, and z axes (default Rotation(0, 0, 0))
|
||||||
|
@ -168,7 +168,7 @@ void Moveable::Register(sol::table & parent)
|
||||||
|
|
||||||
/// Set effect to moveable
|
/// Set effect to moveable
|
||||||
// @function Moveable:SetEffect
|
// @function Moveable:SetEffect
|
||||||
// @tparam EffectID effect Type of effect to assign.
|
// @tparam Effects.EffectID effect Type of effect to assign.
|
||||||
// @tparam float timeout time (in seconds) after which effect turns off (optional).
|
// @tparam float timeout time (in seconds) after which effect turns off (optional).
|
||||||
ScriptReserved_SetEffect, &Moveable::SetEffect,
|
ScriptReserved_SetEffect, &Moveable::SetEffect,
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ void Moveable::Register(sol::table & parent)
|
||||||
|
|
||||||
/// Get current moveable effect
|
/// Get current moveable effect
|
||||||
// @function Moveable:GetEffect
|
// @function Moveable:GetEffect
|
||||||
// @treturn EffectID effect type currently assigned to moveable.
|
// @treturn Effects.EffectID effect type currently assigned to moveable.
|
||||||
ScriptReserved_GetEffect, & Moveable::GetEffect,
|
ScriptReserved_GetEffect, & Moveable::GetEffect,
|
||||||
|
|
||||||
/// Get the status of object.
|
/// Get the status of object.
|
||||||
|
@ -464,7 +464,7 @@ ScriptReserved_GetSlotHP, & Moveable::GetSlotHP,
|
||||||
|
|
||||||
/// Borrow animation from an object
|
/// Borrow animation from an object
|
||||||
// @function Moveable:AnimFromObject
|
// @function Moveable:AnimFromObject
|
||||||
// @tparam ObjID ObjectID to take animation and stateID from,
|
// @tparam Objects.ObjID ObjectID to take animation and stateID from,
|
||||||
// @tparam int animNumber animation from object
|
// @tparam int animNumber animation from object
|
||||||
// @tparam int stateID state from object
|
// @tparam int stateID state from object
|
||||||
ScriptReserved_AnimFromObject, &Moveable::AnimFromObject);
|
ScriptReserved_AnimFromObject, &Moveable::AnimFromObject);
|
||||||
|
|
|
@ -43,7 +43,7 @@ ObjectsHandler::ObjectsHandler(sol::state* lua, sol::table & parent) :
|
||||||
/***
|
/***
|
||||||
Get moveables by its slot.
|
Get moveables by its slot.
|
||||||
@function GetMoveablesBySlot
|
@function GetMoveablesBySlot
|
||||||
@tparam ObjID slot the unique slot of the Moveable, e.g. `Objects.ObjID.ANIMATING1`
|
@tparam Objects.ObjID slot the unique slot of the Moveable, e.g. `Objects.ObjID.ANIMATING1`
|
||||||
@treturn table table of Moveables referencing the given slot.
|
@treturn table table of Moveables referencing the given slot.
|
||||||
*/
|
*/
|
||||||
m_table_objects.set_function(ScriptReserved_GetMoveablesBySlot, &ObjectsHandler::GetMoveablesBySlot<Moveable>, this);
|
m_table_objects.set_function(ScriptReserved_GetMoveablesBySlot, &ObjectsHandler::GetMoveablesBySlot<Moveable>, this);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue