diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-10-21 18:51:57 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-10-21 18:51:57 +0200 |
commit | ea88dde4be225d19c12bea4a581aa21f17237070 (patch) | |
tree | 3787863e03a7222b1c3fde0c37c2d85ae8821326 /doc/client_lua_api.txt | |
parent | f1ff05bf5932a7825509dbe896e60183a96a6d36 (diff) | |
download | dragonfireclient-ea88dde4be225d19c12bea4a581aa21f17237070.tar.xz |
Added Strip, AutoRefill, indexing for InventoryActions and Wield Index starts at 1 now
Diffstat (limited to 'doc/client_lua_api.txt')
-rw-r--r-- | doc/client_lua_api.txt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/client_lua_api.txt b/doc/client_lua_api.txt index 50c33940e..2daac87fe 100644 --- a/doc/client_lua_api.txt +++ b/doc/client_lua_api.txt @@ -1184,9 +1184,9 @@ Methods: * `get_name()` * returns player name * `get_wield_index()` - * returns the index of the wielded item + * returns the index of the wielded item (starts at 1) * `set_wield_index()` - * sets the index + * sets the index (starts at 1) * `get_wielded_item()` * returns the itemstack the player is holding * `is_attached()` @@ -1717,6 +1717,7 @@ A reference to a C++ InventoryAction. You can move, drop and craft items in all * `InventoryAction(type)`: * creates a new InventoryAction * type is on of "move", "drop", or "craft", else returns nil + * indexing starts at 1 * `apply()`: * applies the InventoryAction (InventoryActions can be applied multible times) * `from(inventorylocation, listname, stack)` @@ -1736,13 +1737,13 @@ A reference to a C++ InventoryAction. You can move, drop and craft items in all #### example `local move_act = InventoryAction("move") - move_act:from("current_player", "main", 0) - move_act:to("current_player", "craft", 0) + move_act:from("current_player", "main", 1) + move_act:to("current_player", "craft", 1) move_act:set_count(1) local craft_act = InventoryAction("craft") craft_act:craft("current_player") local drop_act = InventoryAction("drop") - drop_act:from("current_player", "craft", 0) + drop_act:from("current_player", "craft_result",10) move_act:apply() craft_act:apply() drop_act:apply() |