summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2024-04-29 19:56:41 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2024-04-29 19:56:41 +0300
commit76d36fe7210443b4564d2646a2fe5aa6d7c490fc (patch)
treefe7a62e7bf7cd2713ad5ee680dc398f675193ab1 /indra/newview/scripts/lua
parent0868427913e0a1411bc857b227dad82414e42457 (diff)
Allow getting the value of debug settings via Lua script
Diffstat (limited to 'indra/newview/scripts/lua')
-rw-r--r--indra/newview/scripts/lua/LLDebugSettings.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/LLDebugSettings.lua b/indra/newview/scripts/lua/LLDebugSettings.lua
new file mode 100644
index 0000000000..71a12a2ca2
--- /dev/null
+++ b/indra/newview/scripts/lua/LLDebugSettings.lua
@@ -0,0 +1,13 @@
+leap = require 'leap'
+
+local LLDebugSettings = {}
+
+function LLDebugSettings.set(name, value)
+ leap.send('LLAppViewer', {op='setDebugSetting', setting=name, value=value})
+end
+
+function LLDebugSettings.get(name)
+ return leap.request('LLAppViewer', {op='getDebugSetting', setting=name})['value']
+end
+
+return LLDebugSettings