mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-10 20:46:47 +03:00
Rename ItemInfo functions newItem and newItemTemporary to new and newTemporary for consistency.
This commit is contained in:
parent
a1d5deed99
commit
dda1d7143b
2 changed files with 21 additions and 21 deletions
|
@ -49,13 +49,13 @@ GameScriptItemInfo::~GameScriptItemInfo() {
|
|||
|
||||
/*** If you create items with this you NEED to give a position, room,
|
||||
and object number, and then call InitialiseItem before it will work.
|
||||
@function ItemInfo.newItem
|
||||
@function ItemInfo.new
|
||||
*/
|
||||
|
||||
/*** Like above, but the returned variable controls the
|
||||
lifetime of the object (it will be destroyed when the variable goes
|
||||
out of scope).
|
||||
@function ItemInfo.newItemTemporary
|
||||
@function ItemInfo.newTemporary
|
||||
*/
|
||||
template <bool temp> std::unique_ptr<GameScriptItemInfo> CreateEmpty()
|
||||
{
|
||||
|
@ -68,7 +68,7 @@ template <bool temp> std::unique_ptr<GameScriptItemInfo> CreateEmpty()
|
|||
associated getters and setters. If you do not know what to set for these,
|
||||
most can just be set to zero (see usage). See also the overload which
|
||||
takes no arguments.
|
||||
@function ItemInfo.newItem
|
||||
@function ItemInfo.new
|
||||
@tparam ObjID object ID
|
||||
@tparam string name Lua name of the item
|
||||
@tparam Position position position in level
|
||||
|
@ -88,7 +88,7 @@ takes no arguments.
|
|||
@tparam bool hitStatus hit status of object
|
||||
@return reference to new ItemInfo object
|
||||
@usage
|
||||
local item = ItemInfo.newItem(
|
||||
local item = ItemInfo.new(
|
||||
ObjID.PISTOLS_ITEM, -- object id
|
||||
"test", -- name
|
||||
Position.new(18907, 0, 21201),
|
||||
|
@ -112,7 +112,7 @@ takes no arguments.
|
|||
/*** Like the above, but the returned variable controls the
|
||||
lifetime of the object (it will be destroyed when the variable goes
|
||||
out of scope).
|
||||
@function ItemInfo.newItemTemporary
|
||||
@function ItemInfo.newTemporary
|
||||
@param see_above same as above function
|
||||
*/
|
||||
|
||||
|
@ -166,8 +166,8 @@ template <bool temp> static std::unique_ptr<GameScriptItemInfo> Create(
|
|||
void GameScriptItemInfo::Register(sol::state* state)
|
||||
{
|
||||
state->new_usertype<GameScriptItemInfo>(LUA_CLASS_NAME,
|
||||
"newItem", sol::overload(Create<false>, CreateEmpty<false>),
|
||||
"newItemTemporary", sol::overload(Create<true>, CreateEmpty<true>),
|
||||
"new", sol::overload(Create<false>, CreateEmpty<false>),
|
||||
"newTemporary", sol::overload(Create<true>, CreateEmpty<true>),
|
||||
sol::meta_function::index, index_error,
|
||||
sol::meta_function::new_index, newindex_error,
|
||||
|
||||
|
|
|
@ -153,23 +153,23 @@ pickups, and Lara herself.</p>
|
|||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" ><a href="#ItemInfo.newItem">ItemInfo.newItem ()</a></td>
|
||||
<td class="name" ><a href="#ItemInfo.new">ItemInfo.new ()</a></td>
|
||||
<td class="summary">If you create items with this you NEED to give a position, room,
|
||||
and object number, and then call InitialiseItem before it will work.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#ItemInfo.newItemTemporary">ItemInfo.newItemTemporary ()</a></td>
|
||||
<td class="name" ><a href="#ItemInfo.newTemporary">ItemInfo.newTemporary ()</a></td>
|
||||
<td class="summary">Like above, but the returned variable controls the
|
||||
lifetime of the object (it will be destroyed when the variable goes
|
||||
out of scope).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#ItemInfo.newItem">ItemInfo.newItem (object, name, position, rotation, room, currentAnimState, requiredAnimState, goalAnimState, animNumber, frameNumber, hp, OCB, itemFlags, AIBits, status, active, hitStatus)</a></td>
|
||||
<td class="name" ><a href="#ItemInfo.new">ItemInfo.new (object, name, position, rotation, room, currentAnimState, requiredAnimState, goalAnimState, animNumber, frameNumber, hp, OCB, itemFlags, AIBits, status, active, hitStatus)</a></td>
|
||||
<td class="summary">For more information on each parameter, see the
|
||||
associated getters and setters.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#ItemInfo.newItemTemporary">ItemInfo.newItemTemporary (see_above)</a></td>
|
||||
<td class="name" ><a href="#ItemInfo.newTemporary">ItemInfo.newTemporary (see_above)</a></td>
|
||||
<td class="summary">Like the above, but the returned variable controls the
|
||||
lifetime of the object (it will be destroyed when the variable goes
|
||||
out of scope).</td>
|
||||
|
@ -454,8 +454,8 @@ the WadTool animation editor.
|
|||
Methods
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "ItemInfo.newItem"></a>
|
||||
<strong>ItemInfo.newItem ()</strong>
|
||||
<a name = "ItemInfo.new"></a>
|
||||
<strong>ItemInfo.new ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
If you create items with this you NEED to give a position, room,
|
||||
|
@ -469,8 +469,8 @@ and object number, and then call InitialiseItem before it will work.
|
|||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "ItemInfo.newItemTemporary"></a>
|
||||
<strong>ItemInfo.newItemTemporary ()</strong>
|
||||
<a name = "ItemInfo.newTemporary"></a>
|
||||
<strong>ItemInfo.newTemporary ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Like above, but the returned variable controls the
|
||||
|
@ -485,8 +485,8 @@ out of scope).
|
|||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "ItemInfo.newItem"></a>
|
||||
<strong>ItemInfo.newItem (object, name, position, rotation, room, currentAnimState, requiredAnimState, goalAnimState, animNumber, frameNumber, hp, OCB, itemFlags, AIBits, status, active, hitStatus)</strong>
|
||||
<a name = "ItemInfo.new"></a>
|
||||
<strong>ItemInfo.new (object, name, position, rotation, room, currentAnimState, requiredAnimState, goalAnimState, animNumber, frameNumber, hp, OCB, itemFlags, AIBits, status, active, hitStatus)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
For more information on each parameter, see the
|
||||
|
@ -577,7 +577,7 @@ takes no arguments.
|
|||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example"><span class="keyword">local</span> item = ItemInfo.newItem(
|
||||
<pre class="example"><span class="keyword">local</span> item = ItemInfo.new(
|
||||
ObjID.PISTOLS_ITEM, <span class="comment">-- object id
|
||||
</span> <span class="string">"test"</span>, <span class="comment">-- name
|
||||
</span> Position.new(<span class="number">18907</span>, <span class="number">0</span>, <span class="number">21201</span>),
|
||||
|
@ -600,8 +600,8 @@ takes no arguments.
|
|||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "ItemInfo.newItemTemporary"></a>
|
||||
<strong>ItemInfo.newItemTemporary (see_above)</strong>
|
||||
<a name = "ItemInfo.newTemporary"></a>
|
||||
<strong>ItemInfo.newTemporary (see_above)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Like the above, but the returned variable controls the
|
||||
|
@ -671,7 +671,7 @@ Use this if you called new with no arguments
|
|||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||
<i style="float:right;">Last updated 2021-08-21 00:29:08 </i>
|
||||
<i style="float:right;">Last updated 2021-08-21 00:32:39 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue