summaryrefslogtreecommitdiff
path: root/indra/newview
AgeCommit message (Collapse)Author
2024-07-12fix for 'Run' buttonMnikolenko Productengine
2024-07-12Show description and actual value of LLSD type settingMnikolenko Productengine
2024-07-10Merge branch 'lua-atexit-run' into lua-no-reuse.Nat Goodspeed
We couldn't discard the "p.s." fiber.run() call from LuaState::expr() until we could count on fiber.lua's LL.atexit(fiber.run) call being executed after each Lua script or chunk, and we couldn't count on that until we made LLLUAmanager::runScriptFile() instantiate and destroy its LuaState on the C++ Lua-specific coroutine. Now that we've done that, use LL.atexit(fiber.run) instead of the whole special-case "p.s." in LuaState::expr().
2024-07-10Remove ability to reuse a LuaState between LLLUAmanager functions.Nat Goodspeed
Remove LLLUAmanager::mumbleScriptLine() LuaState& parameters. Make startScriptLine(), waitScriptLine() and runScriptLine() exactly parallel to startScriptFile(), waitScriptFile() and runScriptFile(). That means that runScriptLine()'s C++ coroutine instantiates and destroys its own LuaState, which means that LL.atexit() functions will run on the Lua-specific C++ coroutine rather than (say) the viewer's main coroutine. Introduce LLLUAmanager::script_result typedef for std::pair<int, LLSD> and use in method returns. Remove LuaState::initLuaState(); move its logic back into the constructor. Remove initLuaState() calls in the expr() error cases: they're moot now that we won't get subsequent expr() calls on the same LuaState instance. Remove LLFloaterLUADebug "Use clean lua_State" checkbox and the cleanLuaState() method. Remove mState member. Remove explicit LuaState declarations from LLLUAmanager tests. Adapt one test for implicit LuaState: it was directly calling LuaState::obtainListener() to discover the LuaListener's reply-pump name. But since that test also captures two leap.request() calls from the Lua script, it can just look at the "reply" key in either of those requests.
2024-07-10Simplify passing keys to leap.requestMnikolenko Productengine
2024-07-09Merge branch 'release/luau-scripting' into lua-snapshotNat Goodspeed
2024-07-09Merge branch 'release/luau-scripting' into lua-snapshotNat Goodspeed
2024-07-09Introduce LLSDParam<vector<T>> and LLSDParam<map<string, T>>.Nat Goodspeed
Use LLSDParam<uuid_vec_t> in LLAppearanceListener::wearItems() and detachItems() to build the vector of LLUUIDs from the passed LLSD array.
2024-07-08The I/O manipulator std::quoted() must be passed to an ostream.Nat Goodspeed
2024-07-08Slightly simplify LLAppearanceListener::wearItems(), detachItems().Nat Goodspeed
2024-07-08Combine LLAppearanceMgr::wearOutfit() and wearOutfitByName()Nat Goodspeed
into new private wearOutfit(LLInventoryCategory*) method.
2024-07-08Quote "LLAppearance" op="wearOutfit" folder_id and folder_name argsNat Goodspeed
2024-07-08Lua api for Snapshot and demo scriptMnikolenko Productengine
2024-07-05clean up and rename demo scriptMnikolenko Productengine
2024-07-03Use llsd::toMap() to return LLSD maps from "LLAppearance" listener.Nat Goodspeed
2024-07-02Merge branch 'release/luau-scripting' into lua-appearance-listenerNat Goodspeed
2024-07-02Merge branch 'release/luau-scripting' into lua-appearance-listenerNat Goodspeed
2024-07-02Eliminate c_str() calls from LLControlGroup::loadFromFile() calls.Nat Goodspeed
Passing std::string::c_str() to a (const std::string&) function parameter is worse than clutter, it's pointless overhead: it forces the compiler to construct a new std::string instance, instead of passing a const reference to the one you already have in hand.
2024-07-02Make require() implementation honor LuaRequirePath setting.Nat Goodspeed
Remove LL_TEST special case from require() code (to search in the viewer's source tree). Instead, make llluamanager_test.cpp append to LuaRequirePath to get the same effect.
2024-07-02Promote LuaRemover from llluamanager.cpp to lua_function.h.Nat Goodspeed
2024-07-01build fixMaxim Nikolenko
2024-07-01Move error strings to strings.xml; pass wearable type and is_worn flag for ↵Mnikolenko Productengine
outfit items
2024-06-28Add LuaAutorunPath, LuaCommandPath and LuaRequirePath settings.Nat Goodspeed
Remove AutorunLuaScriptFile and the LLLUAmanager::runScriptOnLogin() method that checked it. Instead, iterate over LuaAutorunPath directories at viewer startup, iterate over *.lua files in each and implicitly run those. LuaCommandPath and LuaRequirePath are not yet implemented.
2024-06-27Introduce TypeTag<T> template whose int value differs for each T.Nat Goodspeed
This replaces type_tag<T>(), which searched and possibly extended the type_tags unordered_map at runtime. If we called lua_emplace<T>() from different threads, that would require locking type_tags. In contrast, the compiler must instantiate a distinct TypeTag<T> for every distinct T passed to lua_emplace<T>(), so each gets a distinct value at static initialization time. No locking is required; no lookup; no allocations. Add a test to llluamanager_test.cpp to verify that each distinct T passed to lua_emplace<T>() gets its own TypeTag<T>::value, and that each gets its own destructor -- but that different lua_emplace<T>() calls with the same T share the same TypeTag<T>::value and the same destructor.
2024-06-25Add wear/detach actions to Appearance listener; update example scriptMnikolenko Productengine
2024-06-24Merge branch 'release/luau-scripting' into lua-appearance-listenerMnikolenko Productengine
2024-06-21Exercise the simple popup.lua APIsNat Goodspeed
2024-06-21Remove pre-Floater.lua versions of the floater test scripts.Nat Goodspeed
2024-06-21login.lua works now, update test_login.lua accordingly.Nat Goodspeed
2024-06-21Introduce require/logout.lua and test_logout.lua.Nat Goodspeed
Add "userQuit" operation to LLAppViewerListener to engage LLAppViewer::userQuit(), which pops up "Are you sure?" prompt unless suppressed.
2024-06-21Multiple LL.atexit(function) calls run functions in reverse order.Nat Goodspeed
2024-06-21Add Appearance listenerMnikolenko Productengine
2024-06-21Use util.classctor(LLChatListener).Nat Goodspeed
2024-06-21Move newer Lua modules to scripts/lua/require subdirectory.Nat Goodspeed
2024-06-21Merge branch 'release/luau-scripting' into lua-loginNat Goodspeed
2024-06-20Merge branch 'release/luau-scripting' into lua-chat-listenerNat Goodspeed
2024-06-20Use new popup.lua, which supersedes LLNotification.lua.Nat Goodspeed
Use ClassName(ctor args) for classes using util.classctor().
2024-06-20Merge branch 'release/luau-scripting' into lua-loginNat Goodspeed
2024-06-20Revert LLLuaFloater "idle" events in favor of Lua timers.Timer().nat-goodspeed
2024-06-20Merge branch 'release/luau-scripting' into lua-speedometer-demoNat Goodspeed
2024-06-20Give popup() the ability to not wait; add popup:tip(message).Nat Goodspeed
popup:tip() engages 'SystemMessageTip'.
2024-06-20Use LLLeapListener to listen to LLNearbyChat pumpMnikolenko Productengine
2024-06-19Move popup.lua to require subdir with the rest of the modules.Nat Goodspeed
2024-06-18Improve diagnostic output from running 'require' module.Nat Goodspeed
2024-06-18Remove special-case ~LuaState() code to call fiber.run().Nat Goodspeed
Instead, make fiber.lua call LL.atexit(fiber.run) to schedule that final run() call at ~LuaState() time using the generic mechanism. Append an explicit fiber.run() call to a specific test in llluamanager_test.cpp because the test code wants to interact with multiple Lua fibers *before* we destroy the LuaState.
2024-06-17Remove useless 'coro_name' infoMnikolenko Productengine
2024-06-17Store script's LuaListener in userdata in lua_State's Registry.Nat Goodspeed
Instead of deriving LuaListener from LLInstanceTracker with an int key, generating a unique int key and storing that key in the Registry, use new lua_emplace<LuaState>() to store the LuaListener directly in a Lua userdata object in the Lua Registry. Because lua_emplace<T>() uses LL.atexit() to guarantee that ~LuaState will destroy the T object, we no longer need ~LuaState() to make a special call specifically to destroy the LuaListener, if any. So we no longer need LuaState::getListener() separate from obtainListener(). Since LuaListener is no longer an LLInstanceTracker subclass, make LuaState::obtainListener() return LuaListener& rather than LuaListener::ptr_t.
2024-06-14Move Lua modules for 'require' to indra/newview/scripts/lua/require.Nat Goodspeed
Make viewer_manifest.py copy them into the viewer install image. Make the require() function look for them there.
2024-06-14Add nearby chat listenerMnikolenko Productengine
2024-06-12Avoid messing up Lua's global namespace in 'require' modules.Nat Goodspeed