From 9c072624808949cc5d4f72e0eaf90f3d5e4d0c52 Mon Sep 17 00:00:00 2001 From: Evil Factory <36804725+evilfactory@users.noreply.github.com> Date: Sat, 16 Oct 2021 18:07:16 -0300 Subject: [PATCH] added new hooks to docs --- docs/lua/Hooks.lua | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/lua/Hooks.lua b/docs/lua/Hooks.lua index eda0bc34f..0a403ffe6 100644 --- a/docs/lua/Hooks.lua +++ b/docs/lua/Hooks.lua @@ -105,10 +105,27 @@ function itemDrop(item, character) end -- @realm shared function itemEquip(item, character) end - --- Same as itemEquip, but for unequipping. -- @realm shared function itemUnequip(item, character) end + +--- Gets called every time an item is interacted, eg: picking item on ground, fixing something with wrench +-- @realm shared +function itemInteract(item, characterPicker, ignoreRequiredItemsBool, forceSelectKeyBool, forceActionKeyBool) end + +--- Gets called every time two items are combined, eg: drag an half empty magazine to another half empty magazine to combine +-- @realm shared +function itemCombine(item, otherItem, userCharacter) end + + +--- Gets called every time an item is moved from one inventory slot to another, return true to cancel +-- @realm shared +function inventoryPutItem(inventory, item, characterUser, index, removeItemBool) end + +--- Gets called every time items are swapped, return true to cancel +-- @realm shared +function inventoryItemSwap(inventory, item, characterUser, index, swapWholeStackBool) end + --- -- @realm shared function changeFallDamage() end