summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/require/LLAppearance.lua
blob: f533d22daf8e2b66437cdc860928884a6322b7fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
local leap = require 'leap'

local LLAppearance = {}

function LLAppearance.wearOutfit(folder, action)
    action = action or 'add'
    leap.request('LLAppearance', {op='wearOutfit', append = (action == 'add'), folder_id=folder})
end

function LLAppearance.wearOutfitByName(folder, action)
    action = action or 'add'
    leap.request('LLAppearance', {op='wearOutfit', append = (action == 'add'), folder_name=folder})
end

function LLAppearance.wearItems(items_id, replace)
    leap.send('LLAppearance', {op='wearItems', replace = replace, items_id=items_id})
end

function LLAppearance.detachItems(items_id)
    leap.send('LLAppearance', {op='detachItems', items_id=items_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