diff options
Diffstat (limited to 'Server')
-rw-r--r-- | Server/Plugins/APIDump/APIDesc.lua | 66 |
1 files changed, 55 insertions, 11 deletions
diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index 8adda34a7..69e7cd75b 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -6223,7 +6223,7 @@ These ItemGrids are available in the API and can be manipulated by the plugins, Type = "number", }, }, - Notes = "Adds an item to the storage; if AllowNewStacks is true (default), will also create new stacks in empty slots. Returns the number of items added", + Notes = "Adds an item to the storage; if AllowNewStacks is true (default), will also create new stacks in empty slots. Fills existing stacks first and fills the hotbar before the main inventory. Returns the number of items added", }, AddItems = { @@ -6617,6 +6617,28 @@ These ItemGrids are available in the API and can be manipulated by the plugins, }, Notes = "Removes one item from the hotbar's currently selected slot. Returns true on success.", }, + ReplaceOneEquippedItem = + { + Params = + { + { + Name = "Item", + Type = "cItem", + }, + { + Name = "TryOtherSlots", + Type = "boolean", + IsOptional = true, + }, + }, + Returns = + { + { + Type = "number", + }, + }, + Notes = "Removes one item from the the current equipped item stack, and attempts to add the specified item stack back to the same slot. If it is not possible to place the item in the same slot, optionally (default true) tries to place the specified item elsewhere in the inventory. Returns the number of items successfully added. If the currently equipped slot is empty, its contents are simply set to the given Item.", + }, SendEquippedSlot = { Notes = "Sends the equipped item slot to the client", @@ -6662,31 +6684,31 @@ These ItemGrids are available in the API and can be manipulated by the plugins, }, Notes = "Sets the specified hotbar slot contents", }, - SetShieldSlot = + SetInventorySlot = { Params = { { - Name = "Item", + Name = "InventorySlotNum", + Type = "number", + }, + { + Name = "cItem", Type = "cItem", }, }, - Notes = "Sets the shield slot content", + Notes = "Sets the specified main inventory slot contents", }, - SetInventorySlot = + SetShieldSlot = { Params = { { - Name = "InventorySlotNum", - Type = "number", - }, - { - Name = "cItem", + Name = "Item", Type = "cItem", }, }, - Notes = "Sets the specified main inventory slot contents", + Notes = "Sets the shield slot content", }, SetSlot = { @@ -6703,6 +6725,17 @@ These ItemGrids are available in the API and can be manipulated by the plugins, }, Notes = "Sets the specified slot contents", }, + SetEquippedItem = + { + Params = + { + { + Name = "Item", + Type = "cItem", + }, + }, + Notes = "Sets current item in the equipped hotbar slot", + }, }, Constants = { @@ -10712,6 +10745,17 @@ a_Player:OpenWindow(Window); }, Notes = "Places a block while impersonating the player. The {{OnPlayerPlacingBlock|HOOK_PLAYER_PLACING_BLOCK}} hook is called before the placement, and if it succeeds, the block is placed and the {{OnPlayerPlacedBlock|HOOK_PLAYER_PLACED_BLOCK}} hook is called. Returns true iff the block is successfully placed. Assumes that the block is in a currently loaded chunk.", }, + ReplaceOneEquippedItemTossRest = + { + Params = + { + { + Name = "Item", + Type = "cItem", + }, + }, + Notes = "Removes one item from the the current equipped item stack, and attempts to add the specified item stack back to the same slot. If it is not possible to place the item in the same slot, tries to place the specified item elsewhere in the inventory. If this is not possible, then any remaining items are tossed. If the currently equipped slot is empty, its contents are simply set to the given Item.", + }, Respawn = { Notes = "Restores the health, extinguishes fire, makes visible and sends the Respawn packet.", |