summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/require/LLInventory.lua
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2024-08-15 23:29:54 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2024-08-15 23:29:54 +0300
commitab0f7ff14cd80b89524ba95eb5a39e2d6df55b26 (patch)
treeebcfa415231c452e1dba96c3fb8816ef7a626782 /indra/newview/scripts/lua/require/LLInventory.lua
parent8324ef8edf68c074f4d30322d37b091b3ea10539 (diff)
First batch of Inventory api; raise interrupts limit
Diffstat (limited to 'indra/newview/scripts/lua/require/LLInventory.lua')
-rw-r--r--indra/newview/scripts/lua/require/LLInventory.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/require/LLInventory.lua b/indra/newview/scripts/lua/require/LLInventory.lua
new file mode 100644
index 0000000000..880a2516f1
--- /dev/null
+++ b/indra/newview/scripts/lua/require/LLInventory.lua
@@ -0,0 +1,28 @@
+local leap = require 'leap'
+local mapargs = require 'mapargs'
+
+local LLInventory = {}
+
+-- Get the items/folders info by provided IDs,
+-- reply will contain "items" and "categories" tables accordingly
+function LLInventory.getItemsInfo(items_id)
+ return leap.request('LLInventory', {op = 'getItemsInfo', items_id=items_id})
+end
+
+-- Get the table of folder type names, which can be later used to get the ID of the basic folders
+function LLInventory.getFolderTypeNames()
+ return leap.request('LLInventory', {op = 'getFolderTypeNames'}).type_names
+end
+
+-- Get the UUID of the basic folder("Textures", "My outfits", "Sounds" etc.) by specified folder type name
+function LLInventory.getBasicFolderID(ft_name)
+ return leap.request('LLInventory', {op = 'getBasicFolderID', ft_name=ft_name}).id
+end
+
+-- Get the direct descendents of the 'folder_id' provided,
+-- reply will contain "items" and "categories" tables accordingly
+function LLInventory.getDirectDescendents(folder_id)
+ return leap.request('LLInventory', {op = 'getDirectDescendents', folder_id=folder_id})
+end
+
+return LLInventory