Update docs

This commit is contained in:
Lwmte 2024-04-24 00:32:32 +02:00
parent 46d1987816
commit 809d54d811
2 changed files with 78 additions and 0 deletions

View file

@ -3,6 +3,8 @@ Version 1.5
* Fixed original issue with classic switch off trigger wrongly activating some trigger actions.
Lua API changes:
* Added Inventory.GetChosenItem(), Inventory.SetChosenItem() and Inventory.ClearChosenItem() functions.
Version 1.4
===========

View file

@ -124,6 +124,18 @@
<td class="name" ><a href="#SetItemCount">SetItemCount(objectID, count)</a></td>
<td class="summary">Set the amount of an item in the player's inventory.</td>
</tr>
<tr>
<td class="name" ><a href="#GetChosenItem">GetChosenItem()</a></td>
<td class="summary">Get last selected item in the player's inventory.</td>
</tr>
<tr>
<td class="name" ><a href="#SetChosenItem">SetChosenItem(objectID)</a></td>
<td class="summary">Set last selected item in the player's inventory.</td>
</tr>
<tr>
<td class="name" ><a href="#ClearChosenItem">ClearChosenItem()</a></td>
<td class="summary">Clear last selected item in the player's inventory.</td>
</tr>
</table>
<br/>
@ -245,6 +257,70 @@
</dd>
<dt>
<a name = "GetChosenItem"></a>
<strong>GetChosenItem()</strong>
</dt>
<dd>
Get last selected item in the player's inventory.
This value will be valid only for a single frame after exiting inventory, after which Lara says "No".
Therefore, this function must be preferably used either in OnLoop events or callbacks.
If you have used this function and you want to avoid "No" sound, you should use ClearChosenItem function.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
Last selected item in the inventory.
</ol>
</dd>
<dt>
<a name = "SetChosenItem"></a>
<strong>SetChosenItem(objectID)</strong>
</dt>
<dd>
Set last selected item in the player's inventory.
You will be able to select only objects which already exist in inventory.
Will only be valid for the next frame. If not processed by the game, Lara will say "No".
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">objectID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
Object ID of the item to select from inventory.
</li>
</ul>
</dd>
<dt>
<a name = "ClearChosenItem"></a>
<strong>ClearChosenItem()</strong>
</dt>
<dd>
Clear last selected item in the player's inventory.
This function is needed to avoid Lara saying "No" after selecting particular item in inventory.
</dd>
</dl>