diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-06-25 14:51:53 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-06-25 14:51:53 +0300 |
commit | eb6d24e531aa5faa251b7aaf8b13c62f06708696 (patch) | |
tree | 2b6cbd003520a44b46c9c82348fec63d3fe5f768 /indra/newview/scripts/lua/require | |
parent | 61fad5fd04f90542b2842dec86a6f74a4f801de7 (diff) |
Add wear/detach actions to Appearance listener; update example script
Diffstat (limited to 'indra/newview/scripts/lua/require')
-rw-r--r-- | indra/newview/scripts/lua/require/LLAppearance.lua | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/require/LLAppearance.lua b/indra/newview/scripts/lua/require/LLAppearance.lua new file mode 100644 index 0000000000..165bb6d06f --- /dev/null +++ b/indra/newview/scripts/lua/require/LLAppearance.lua @@ -0,0 +1,37 @@ +leap = require 'leap' + +local LLAppearance = {} + +function LLAppearance.addOutfit(folder) + leap.request('LLAppearance', {op='wearOutfit', append = true, folder_id=folder}) +end + +function LLAppearance.replaceOutfit(folder) + leap.request('LLAppearance', {op='wearOutfit', append = false, folder_id=folder}) +end + +function LLAppearance.addOutfitByName(folder) + leap.request('LLAppearance', {op='wearOutfitByName', append = true, folder_name=folder}) +end + +function LLAppearance.replaceOutfitByName(folder) + leap.request('LLAppearance', {op='wearOutfitByName', append = false, folder_name=folder}) +end + +function LLAppearance.wearItem(item_id, replace) + leap.send('LLAppearance', {op='wearItem', replace = replace, item_id=item_id}) +end + +function LLAppearance.detachItem(item_id) + leap.send('LLAppearance', {op='detachItem', item_id=item_id}) +end + +function LLAppearance.getOutfitsList() + return leap.request('LLAppearance', {op='getOutfitsList'})['outfits'] +end + +function LLAppearance.getOutfitItems(id) + return leap.request('LLAppearance', {op='getOutfitItems', outfit_id = id})['items'] +end + +return LLAppearance |