diff options
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
| -rw-r--r-- | indra/newview/llpreviewscript.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 300fa30420..c540046df1 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -2478,13 +2478,25 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**) } instance->mCompileTarget->setValue(compile_target); + + bool lua_scripts_enabled = false; + + // TODO: better handling of this + LLViewerRegion* region = gAgent.getRegion(); + if (region && region->simulatorFeaturesReceived()) + { + LLSD simulatorFeatures; + region->getSimulatorFeatures(simulatorFeatures); + lua_scripts_enabled = simulatorFeatures["LuaScriptsEnabled"].asBoolean(); + } + if (LLScrollListItem* luau_item = instance->mCompileTarget->findItemByValue("luau")) { - luau_item->setEnabled(luau); + luau_item->setEnabled(lua_scripts_enabled); } if (LLScrollListItem* lsl_luau_item = instance->mCompileTarget->findItemByValue("lsl_luau")) { - lsl_luau_item->setEnabled(luau); + lsl_luau_item->setEnabled(lua_scripts_enabled); } instance->mCompileTarget->setEnabled(instance->getIsModifiable() && have_script_upload_cap(object_id)); |
