summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/LLDebugSettings.lua
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2024-05-16 03:41:57 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2024-05-16 03:41:57 +0300
commit0212bae056419c10abdfac478188b52e61373609 (patch)
tree3a5809ba24b3253c016813204365bd97e305e25a /indra/newview/scripts/lua/LLDebugSettings.lua
parentb1098308428873e927cbf3c956ed0a7f17dc439b (diff)
parentc808d849aa6aa17db95a7814e6eb6bc5162ba816 (diff)
Merge branch 'lua-ui-callbacks' into release/luau-scripting
Diffstat (limited to 'indra/newview/scripts/lua/LLDebugSettings.lua')
-rw-r--r--indra/newview/scripts/lua/LLDebugSettings.lua14
1 files changed, 4 insertions, 10 deletions
diff --git a/indra/newview/scripts/lua/LLDebugSettings.lua b/indra/newview/scripts/lua/LLDebugSettings.lua
index c1d74fe00a..06a8a63727 100644
--- a/indra/newview/scripts/lua/LLDebugSettings.lua
+++ b/indra/newview/scripts/lua/LLDebugSettings.lua
@@ -1,24 +1,18 @@
leap = require 'leap'
-
-local function check_response(res)
- if res.error then
- error(res.error)
- end
- return res
-end
+util = require 'util'
local LLDebugSettings = {}
function LLDebugSettings.set(name, value)
- check_response(leap.request('LLViewerControl', {op='set', group='Global', key=name, value=value}))
+ util.check_response(leap.request('LLViewerControl', {op='set', group='Global', key=name, value=value}))
end
function LLDebugSettings.toggle(name)
- check_response(leap.request('LLViewerControl', {op='toggle', group='Global', key=name}))
+ util.check_response(leap.request('LLViewerControl', {op='toggle', group='Global', key=name}))
end
function LLDebugSettings.get(name)
- return check_response(leap.request('LLViewerControl', {op='get', group='Global', key=name}))['value']
+ return util.check_response(leap.request('LLViewerControl', {op='get', group='Global', key=name}))['value']
end
return LLDebugSettings