summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2025-02-05 14:29:45 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2025-02-11 10:17:25 +0200
commitfd82aa010c4ff369484304d00822dc286d9c720e (patch)
treeb345cd26fbd3cf7e1c5ee172ee851aef4a997e4c
parent7f88aedbc3b53496bc99d8e0e64a818c7a3f6d6f (diff)
#3423 Adapt the code to the changes on a server
-rw-r--r--indra/llmessage/message_prehash.cpp3
-rw-r--r--indra/llmessage/message_prehash.h3
-rw-r--r--indra/newview/llpreviewscript.cpp34
-rw-r--r--indra/newview/skins/default/xui/en/floater_live_lsleditor.xml4
4 files changed, 32 insertions, 12 deletions
diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp
index df16184e76..fab07c018c 100644
--- a/indra/llmessage/message_prehash.cpp
+++ b/indra/llmessage/message_prehash.cpp
@@ -715,7 +715,8 @@ char const* const _PREHASH_AttachedSoundGainChange = LLMessageStringTable::getIn
char const* const _PREHASH_LocationID = LLMessageStringTable::getInstance()->getString("LocationID");
char const* const _PREHASH_Running = LLMessageStringTable::getInstance()->getString("Running");
char const* const _PREHASH_Mono = LLMessageStringTable::getInstance()->getString("Mono");
-char const* const _PREHASH_CompileTarget = LLMessageStringTable::getInstance()->getString("CompileTarget");
+char const* const _PREHASH_Luau = LLMessageStringTable::getInstance()->getString("Luau");
+char const* const _PREHASH_LuauLanguage = LLMessageStringTable::getInstance()->getString("LuauLanguage");
char const* const _PREHASH_AgentThrottle = LLMessageStringTable::getInstance()->getString("AgentThrottle");
char const* const _PREHASH_NeighborList = LLMessageStringTable::getInstance()->getString("NeighborList");
char const* const _PREHASH_PathTaperX = LLMessageStringTable::getInstance()->getString("PathTaperX");
diff --git a/indra/llmessage/message_prehash.h b/indra/llmessage/message_prehash.h
index 0feb6ecad8..83b480392c 100644
--- a/indra/llmessage/message_prehash.h
+++ b/indra/llmessage/message_prehash.h
@@ -715,7 +715,8 @@ extern char const* const _PREHASH_AttachedSoundGainChange;
extern char const* const _PREHASH_LocationID;
extern char const* const _PREHASH_Running;
extern char const* const _PREHASH_Mono;
-extern char const* const _PREHASH_CompileTarget;
+extern char const* const _PREHASH_Luau;
+extern char const* const _PREHASH_LuauLanguage;
extern char const* const _PREHASH_AgentThrottle;
extern char const* const _PREHASH_NeighborList;
extern char const* const _PREHASH_PathTaperX;
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 432aaa8f18..300fa30420 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -2451,26 +2451,40 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**)
msg->getBOOLFast(_PREHASH_Script, _PREHASH_Running, running);
instance->mRunningCheckbox->set(running);
+ bool mono = false, luau = false, luau_language = false;
+ msg->getBOOLFast(_PREHASH_Script, _PREHASH_Mono, mono);
+ msg->getBOOLFast(_PREHASH_Script, _PREHASH_Luau, luau);
+ msg->getBOOLFast(_PREHASH_Script, _PREHASH_LuauLanguage, luau_language);
+
std::string compile_target;
- msg->getStringFast(_PREHASH_Script, _PREHASH_CompileTarget, compile_target);
- if (compile_target.empty()) // Old sim not providing CompileTarget field
+ if (luau)
{
- bool mono;
- msg->getBOOLFast(_PREHASH_Script, _PREHASH_Mono, mono); // Use Mono field
- instance->mCompileTarget->setValue(mono ? "mono" : "lso2");
+ if (luau_language)
+ {
+ compile_target = "luau";
+ }
+ else
+ {
+ compile_target = "lsl_luau";
+ }
}
- else if (instance->mCompileTarget->valueExists(compile_target))
+ else if (mono)
{
- instance->mCompileTarget->setValue(compile_target); // Use CompileTarget field
+ compile_target = "mono";
}
else
{
- instance->mCompileTarget->setValue("mono"); // Use default value
+ compile_target = "lsl2";
}
- if (LLScrollListItem* item = instance->mCompileTarget->findItemByValue("luau"))
+ instance->mCompileTarget->setValue(compile_target);
+ if (LLScrollListItem* luau_item = instance->mCompileTarget->findItemByValue("luau"))
+ {
+ luau_item->setEnabled(luau);
+ }
+ if (LLScrollListItem* lsl_luau_item = instance->mCompileTarget->findItemByValue("lsl_luau"))
{
- item->setEnabled(!compile_target.empty());
+ lsl_luau_item->setEnabled(luau);
}
instance->mCompileTarget->setEnabled(instance->getIsModifiable() && have_script_upload_cap(object_id));
diff --git a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
index 4d15522c76..c5124e2119 100644
--- a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
+++ b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
@@ -145,5 +145,9 @@
label="Lua"
name="compile_target_luau"
value="luau" />
+ <combo_box.item
+ label="LSL/Luau"
+ name="compile_target_lsl_luau"
+ value="lsl_luau" />
</combo_box>
</floater>