From 7af436c43d8bb7027c146e9a57bb19c3c89c5d3e Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 17 Aug 2026 17:24:06 -0700 Subject: Issue https://github.com/secondlife/sl-vscode-plugin/issues/98: Refactor message passing into unified format. --- indra/newview/llpreviewscript.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'indra/newview/llpreviewscript.cpp') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 10bacf53b7..354147336a 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -40,7 +40,6 @@ #include "llinventorymodel.h" #include "llkeyboard.h" #include "lllineeditor.h" -#include "llmd5.h" #include "llhelp.h" #include "llnotificationsutil.h" #include "llresmgr.h" @@ -1613,14 +1612,7 @@ std::string LLScriptEdContainer::getUniqueHash() const // Take script inventory item id (within the object inventory) // to consideration so that it's possible to edit multiple scripts // in the same object inventory simultaneously (STORM-781). - std::string script_id = mObjectUUID.asString() + "_" + mItemUUID.asString(); - - // Use MD5 sum to make the file name shorter and not exceed maximum path length. - char script_id_hash_str[33]; /* Flawfinder: ignore */ - LLMD5 script_id_hash((const U8*)script_id.c_str()); - script_id_hash.hex_digest(script_id_hash_str); - - return std::string(script_id_hash_str); + return LLScriptEditorWSServer::buildScriptSubscriptionId(mObjectUUID, mItemUUID); } std::string LLScriptEdContainer::getErrorLogFileName(const std::string& script_path) -- cgit v1.3 From 8b60b254a737b88dfbc5a27e5e47bef96aed703e Mon Sep 17 00:00:00 2001 From: trish-sl Date: Thu, 3 Sep 2026 11:37:53 -0400 Subject: #6248 Closing minimized search floater should not reopen script floater- #6235 Instead follow texture picker's example and don't permit minimization, hide instead. --- indra/newview/llpreviewscript.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpreviewscript.cpp') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 354147336a..318467745c 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -209,6 +209,7 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core) mEditorCore(editor_core) { buildFromFile("floater_script_search.xml"); + setCanMinimize(false); sInstance = this; -- cgit v1.3 From b1d6516522593ea750b603a3d5378d14f08bacde Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Tue, 8 Sep 2026 15:13:57 +0300 Subject: #6252 Use Lua-aware script help --- indra/newview/llpreviewscript.cpp | 46 ++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 8 deletions(-) (limited to 'indra/newview/llpreviewscript.cpp') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 354147336a..fbe6fc3e40 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -85,6 +85,8 @@ #include const std::string HELP_LSL_PORTAL_TOPIC = "LSL_Portal"; +const std::string HELP_LUA_PORTAL_URL = "https://wiki.secondlife.com/wiki/Lua_Alpha"; +const std::string HELP_LUA_LIBRARY_URL = "https://luau.org/library"; const std::string DEFAULT_SCRIPT_NAME = "New Script"; // *TODO:Translate? const std::string DEFAULT_SCRIPT_DESC = "(No Description)"; // *TODO:Translate? @@ -93,6 +95,36 @@ const std::string DEFAULT_SCRIPT_DESC = "(No Description)"; // *TODO:Translate? const S32 MAX_HISTORY_COUNT = 10; const F32 LIVE_HELP_REFRESH_TIME = 1.f; +static bool is_luau_library_symbol(const std::string& symbol) +{ + return symbol.rfind("bit32.", 0) == 0 + || symbol.rfind("buffer.", 0) == 0 + || symbol.rfind("coroutine.", 0) == 0 + || symbol.rfind("debug.", 0) == 0 + || symbol.rfind("math.", 0) == 0 + || symbol.rfind("os.", 0) == 0 + || symbol.rfind("string.", 0) == 0 + || symbol.rfind("table.", 0) == 0 + || symbol.rfind("utf8.", 0) == 0; +} + +static std::string build_script_help_url(bool luau_language, const std::string& help_string) +{ + if (!luau_language || help_string.rfind("ll.", 0) == 0) + { + LLUIString url_string = gSavedSettings.getString("LSLHelpURL"); + std::string page = help_string; + if (luau_language) + { + page.erase(2, 1); // Lua's ll.GetOwner maps to LSL's llGetOwner. + } + url_string.setArg("[LSL_STRING]", page.empty() ? HELP_LSL_PORTAL_TOPIC : page); + return url_string.getString(); + } + + return is_luau_library_symbol(help_string) ? HELP_LUA_LIBRARY_URL : HELP_LUA_PORTAL_URL; +} + static bool have_script_upload_cap(LLUUID& object_id) { LLViewerObject* object = gObjectList.findObject(object_id); @@ -866,13 +898,9 @@ void LLScriptEdCore::setHelpPage(const std::string& help_string) LLComboBox* history_combo = help_floater->getChild("history_combo"); if (!history_combo) return; - LLUIString url_string = gSavedSettings.getString("LSLHelpURL"); - - url_string.setArg("[LSL_STRING]", help_string.empty() ? HELP_LSL_PORTAL_TOPIC : help_string); - addHelpItemToHistory(help_string); - web_browser->navigateTo(url_string); + web_browser->navigateTo(build_script_help_url(mEditor->getIsLuauLanguage(), help_string)); } @@ -1007,6 +1035,10 @@ void LLScriptEdCore::onBtnDynamicHelp() mLiveHelpHistorySize = 0; } + const bool luau_language = mEditor->getIsLuauLanguage(); + live_help_floater->setTitle(luau_language ? "LUA REFERENCE" : "LSL REFERENCE"); + live_help_floater->setHelpTopic(luau_language ? "Lua_Alpha" : "lsl_reference"); + bool visible = true; bool take_focus = true; live_help_floater->setVisible(visible); @@ -1080,9 +1112,7 @@ void LLScriptEdCore::onHelpComboCommit(LLUICtrl* ctrl, void* userdata) corep->addHelpItemToHistory(help_string); LLMediaCtrl* web_browser = live_help_floater->getChild("lsl_guide_html"); - LLUIString url_string = gSavedSettings.getString("LSLHelpURL"); - url_string.setArg("[LSL_STRING]", help_string); - web_browser->navigateTo(url_string); + web_browser->navigateTo(build_script_help_url(corep->mEditor->getIsLuauLanguage(), help_string)); } } -- cgit v1.3