From 4929460c669c882cce35ac6a2a515d7801c3da74 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Oct 2010 18:50:47 -0500 Subject: [PATCH] COA stuff rolled into gSavedSettings. Added common script<->client command junk. --- indra/cmake/00-Common.cmake | 6 +- indra/llxml/llcontrol.cpp | 125 ++- indra/llxml/llcontrol.h | 95 +- indra/newview/CMakeLists.txt | 2 + indra/newview/app_settings/settings.xml | 855 ++---------------- indra/newview/app_settings/settings_SH.xml | 60 ++ .../newview/app_settings/settings_ascent.xml | 590 ++++++++++++ .../app_settings/settings_ascent_COA.xml | 179 ++++ .../app_settings/settings_per_account.xml | 793 +--------------- .../settings_per_account_ascent.xml | 117 +++ indra/newview/ascentprefsvan.cpp | 94 +- indra/newview/llagent.cpp | 4 +- indra/newview/llappviewer.cpp | 4 + indra/newview/llchatbar.cpp | 7 + indra/newview/llfloateravatarlist.cpp | 8 +- indra/newview/llfloatersettingsdebug.cpp | 7 +- indra/newview/llgesturemgr.cpp | 7 + indra/newview/llgroupmgr.cpp | 88 ++ indra/newview/llnetmap.cpp | 8 +- indra/newview/llsavedsettingsglue.cpp | 26 +- indra/newview/llsavedsettingsglue.h | 2 +- indra/newview/llviewercontrol.cpp | 18 +- indra/newview/llviewercontrol.h | 4 +- indra/newview/llviewergesture.cpp | 11 +- indra/newview/llviewermessage.cpp | 39 +- indra/newview/llvoavatar.cpp | 18 +- indra/newview/shcommandhandler.cpp | 178 ++++ indra/newview/shcommandhandler.h | 105 +++ 28 files changed, 1732 insertions(+), 1718 deletions(-) create mode 100644 indra/newview/app_settings/settings_SH.xml create mode 100644 indra/newview/app_settings/settings_ascent.xml create mode 100644 indra/newview/app_settings/settings_ascent_COA.xml create mode 100644 indra/newview/app_settings/settings_per_account_ascent.xml create mode 100644 indra/newview/shcommandhandler.cpp create mode 100644 indra/newview/shcommandhandler.h diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index d6847330e..2795f9483 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -9,11 +9,11 @@ include(Variables) set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1") set(CMAKE_CXX_FLAGS_RELEASE - "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG") + "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG -DSHY_MOD=1") set(CMAKE_CXX_FLAGS_RELEASESSE2 - "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG") + "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG -DSHY_MOD=1") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO - "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1") + "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1 -DSHY_MOD=1") # Don't bother with a MinSizeRel build. diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 7fbef77ad..7d9bfddae 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -59,6 +59,26 @@ //this defines the current version of the settings file const S32 CURRENT_VERSION = 101; +//Currently global. Would be better in LLControlGroup... except that that requires LLControlVars to know their parent group. +//Could also pass the setting to each COA var too.. but that's not much better. +//Can't use llcachedcontrol as an alternative as that drags in LLCachedControl constructors that refer to gSavedSettings.. which'll break +// the crashlogger which also includes llxml.lib (unresolved externals). +//So, a global it is! +bool gCOAEnabled = false; + +inline LLControlVariable *LLControlVariable::getCOAActive() +{ + //if no coa connection, return 'this' + //if per account is ON and this IS a parent, return child var + //if per account is ON and this IS NOT a parent, return 'this' + //if per account is OFF and this IS NOT a parent, return parent var + //if per account is OFF and this IS a parent, return 'this' + if(getCOAConnection() && gCOAEnabled == isCOAParent()) + return getCOAConnection(); + else + return this; +} + bool LLControlVariable::llsd_compare(const LLSD& a, const LLSD & b) { bool result = false; @@ -102,12 +122,16 @@ bool LLControlVariable::llsd_compare(const LLSD& a, const LLSD & b) LLControlVariable::LLControlVariable(const std::string& name, eControlType type, LLSD initial, const std::string& comment, - bool persist, bool hidefromsettingseditor) + bool persist, bool hidefromsettingseditor, bool IsCOA) : mName(name), mComment(comment), mType(type), mPersist(persist), - mHideFromSettingsEditor(hidefromsettingseditor) + mHideFromSettingsEditor(hidefromsettingseditor), + mSignal(new signal_t), + mIsCOA(IsCOA), + mIsCOAParent(false), + mCOAConnectedVar(NULL) { if (mPersist && mComment.empty()) { @@ -188,7 +212,8 @@ void LLControlVariable::setValue(const LLSD& value, bool saved_value) if(value_changed) { - mSignal(storable_value); + if(getCOAActive() == this) + (*mSignal)(storable_value); } } @@ -205,6 +230,7 @@ void LLControlVariable::setDefaultValue(const LLSD& value) mValues[0] = comparable_value; if(value_changed) { + if(getCOAActive() == this) firePropertyChanged(); } } @@ -235,6 +261,7 @@ void LLControlVariable::resetToDefault(bool fire_signal) if(fire_signal) { + if(getCOAActive() == this) firePropertyChanged(); } } @@ -276,7 +303,13 @@ LLPointer LLControlGroup::getControl(const std::string& name) gSettingsCallMap.push_back(std::pair(name.c_str(),1)); } #endif //PROF_CTRL_CALLS - return iter == mNameTable.end() ? LLPointer() : iter->second; + //return iter == mNameTable.end() ? LLPointer() : iter->second; + + LLControlVariable *pFoundVar = (iter != mNameTable.end()) ? iter->second : NULL; + if(pFoundVar) + return pFoundVar->getCOAActive(); + else + return LLPointer(); } @@ -322,7 +355,7 @@ std::string LLControlGroup::typeEnumToString(eControlType typeenum) return mTypeString[typeenum]; } -BOOL LLControlGroup::declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist, BOOL hidefromsettingseditor) +BOOL LLControlGroup::declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist, BOOL hidefromsettingseditor, bool IsCOA) { LLControlVariable* existing_control = getControl(name); if (existing_control) @@ -335,6 +368,7 @@ BOOL LLControlGroup::declareControl(const std::string& name, eControlType type, LLSD cur_value = existing_control->getValue(); // get the current value existing_control->setDefaultValue(initial_val); // set the default to the declared value existing_control->setValue(cur_value); // now set to the loaded value + existing_control->setIsCOA(IsCOA); } } else @@ -345,7 +379,7 @@ BOOL LLControlGroup::declareControl(const std::string& name, eControlType type, } // if not, create the control and add it to the name table - LLControlVariable* control = new LLControlVariable(name, type, initial_val, comment, persist, hidefromsettingseditor); + LLControlVariable* control = new LLControlVariable(name, type, initial_val, comment, persist, hidefromsettingseditor, IsCOA); mNameTable[name] = control; return TRUE; } @@ -1061,6 +1095,9 @@ U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_values) { + if(mIncludedFiles.find(filename) != mIncludedFiles.end()) + return 0; //Already included this file. + std::string name; LLSD settings; LLSD control_map; @@ -1089,6 +1126,24 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v name = (*itr).first; control_map = (*itr).second; + if(name == "Include") + { + if(control_map.isArray()) + { +#if LL_WINDOWS + size_t pos = filename.find_last_of("\\"); +#else + size_t pos = filename.find_last_of("/"); +#endif + if(pos!=std::string::npos) + { + const std::string dir = filename.substr(0,++pos); + for(LLSD::array_const_iterator array_itr = control_map.beginArray(); array_itr != control_map.endArray(); ++array_itr) + validitems+=loadFromFile(dir+(*array_itr).asString(),set_default_values); + } + } + continue; + } if(control_map.has("Persist")) { persist = control_map["Persist"].asInteger(); @@ -1139,13 +1194,16 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v } else { + bool IsCOA = control_map.has("IsCOA") && !!control_map["IsCOA"].asInteger(); declareControl(name, typeStringToEnum(control_map["Type"].asString()), control_map["Value"], control_map["Comment"].asString(), persist, - hidefromsettingseditor + hidefromsettingseditor, + IsCOA ); + } ++validitems; @@ -1175,6 +1233,53 @@ void LLControlGroup::applyToAll(ApplyFunctor* func) } } +void LLControlGroup::connectCOAVars(LLControlGroup &OtherGroup) +{ + LLControlVariable *pCOAVar = NULL; + for (ctrl_name_table_t::iterator iter = mNameTable.begin(); + iter != mNameTable.end(); iter++) + { + if(iter->second->isCOA()) + { + LLControlVariable *pParent = iter->second; + LLControlVariable *pChild = OtherGroup.getControl(pParent->getName()); + if(!pChild) + { + OtherGroup.declareControl( + pParent->getName(), + pParent->type(), + pParent->getDefault(), + pParent->getComment(), + pParent->isPersisted(), + true); + + pChild = OtherGroup.getControl(pParent->getName()); + } + if(pChild) + { + pParent->setCOAConnect(pChild,true); + pChild->setCOAConnect(pParent,false); + } + } + else if(iter->second->getName() == "AscentStoreSettingsPerAccount") + pCOAVar = iter->second; + } + if(pCOAVar) + { + pCOAVar->getSignal()->connect(boost::bind(&LLControlGroup::handleCOASettingChange, this, _1)); + pCOAVar->firePropertyChanged(); + } +} +void LLControlGroup::updateCOASetting(bool coa_enabled) +{ + for (ctrl_name_table_t::iterator iter = mNameTable.begin(); + iter != mNameTable.end(); iter++) + { + if(iter->second->getCOAConnection()) + iter->second->getCOAActive()->firePropertyChanged(); + } +} + //============================================================================ // First-use @@ -1224,6 +1329,12 @@ void LLControlGroup::resetWarnings() } } +bool LLControlGroup::handleCOASettingChange(const LLSD& newvalue) +{ + gCOAEnabled = !!newvalue.asInteger(); //TODO. De-globalize this. + updateCOASetting(gCOAEnabled); + return true; +} //============================================================================ #ifdef TEST_HARNESS diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index 17d5e483e..b3b6153fd 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -72,7 +72,7 @@ const BOOL NO_PERSIST = FALSE; // Saved at end of session class LLControlGroup; //Defined further down extern LLControlGroup gSavedSettings; //Default control group used in LLCachedControl -extern LLControlGroup *gCOASavedSettings; //Used in LLCachedCOAControl +extern LLControlGroup gSavedPerAccountSettings; //For ease typedef enum e_control_type { @@ -104,12 +104,16 @@ private: bool mHideFromSettingsEditor; std::vector mValues; - signal_t mSignal; - + boost::shared_ptr mSignal; //Signals are non-copyable. Therefore, using a pointer so vars can 'share' signals for COA + + //COA stuff: + bool mIsCOA; //To have COA connection set. + bool mIsCOAParent; //if true, use if settingsperaccount is false. + LLControlVariable *mCOAConnectedVar;//Because the two vars refer to eachother, LLPointer would be a circular refrence.. public: LLControlVariable(const std::string& name, eControlType type, LLSD initial, const std::string& comment, - bool persist = true, bool hidefromsettingseditor = false); + bool persist = true, bool hidefromsettingseditor = false, bool IsCOA = false); virtual ~LLControlVariable(); @@ -121,7 +125,7 @@ public: void resetToDefault(bool fire_signal = false); - signal_t* getSignal() { return &mSignal; } + signal_t* getSignal() { return mSignal.get(); } bool isDefault() { return (mValues.size() == 1); } bool isSaveValueDefault(); @@ -141,7 +145,21 @@ public: void firePropertyChanged() { - mSignal(mValues.back()); + (*mSignal)(mValues.back()); + } + + //COA stuff + bool isCOA() const { return mIsCOA; } + bool isCOAParent() const { return mIsCOAParent; } + LLControlVariable *getCOAConnection() const { return mCOAConnectedVar; } + LLControlVariable *getCOAActive(); + void setIsCOA(bool IsCOA) { mIsCOA=IsCOA; } + void setCOAConnect(LLControlVariable *pConnect, bool IsParent) + { + mIsCOAParent=IsParent; + mCOAConnectedVar=pConnect; + if(!IsParent) + mSignal = pConnect->mSignal; //Share a single signal. } private: LLSD getComparableValue(const LLSD& value); @@ -160,6 +178,7 @@ protected: eControlType typeStringToEnum(const std::string& typestr); std::string typeEnumToString(eControlType typeenum); + std::set mIncludedFiles; //To prevent perpetual recursion. public: LLControlGroup(); ~LLControlGroup(); @@ -173,8 +192,8 @@ public: virtual void apply(const std::string& name, LLControlVariable* control) = 0; }; void applyToAll(ApplyFunctor* func); - - BOOL declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist, BOOL hidefromsettingseditor = FALSE); + + BOOL declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist, BOOL hidefromsettingseditor = FALSE, bool IsCOA = false); BOOL declareU32(const std::string& name, U32 initial_val, const std::string& comment, BOOL persist = TRUE); BOOL declareS32(const std::string& name, S32 initial_val, const std::string& comment, BOOL persist = TRUE); BOOL declareF32(const std::string& name, F32 initial_val, const std::string& comment, BOOL persist = TRUE); @@ -245,6 +264,12 @@ public: // Resets all ignorables void resetWarnings(); + + //COA stuff + void connectToCOA(LLControlVariable *pConnecter, const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist); + void connectCOAVars(LLControlGroup &OtherGroup); + void updateCOASetting(bool coa_enabled); + bool handleCOASettingChange(const LLSD& newvalue); }; //! Helper function for LLCachedControl @@ -260,6 +285,7 @@ eControlType get_control_type(const T& in, LLSD& out) //! An LLCachedControl instance to connect to a LLControlVariable //! without have to manually create and bind a listener to a local //! object. + template class LLCachedControl { @@ -279,11 +305,10 @@ public: LLControlGroup &group = gSavedSettings) {Init(name,default_value,comment,group);} //for default (gSavedSettings) private: - //Pulled out of ctor due to problems with initializer lists in template classes void Init( const std::string& name, const T& default_value, const std::string& comment, - LLControlGroup &group ) + LLControlGroup &group) { mControlGroup = &group; mControl = mControlGroup->getControl(name); @@ -303,6 +328,8 @@ private: handleValueChange(mControl->getValue()); } + if(mConnection.connected()) + mConnection.disconnect(); // Add a listener to the controls signal... // and store the connection... mConnection = mControl->getSignal()->connect( @@ -325,6 +352,8 @@ public: } operator const T&() const { return mCachedValue; } + + /* Sometimes implicit casting doesn't work. For instance, something like "LLCachedControl color("blah",LLColor4()); color.getValue();" will not compile as it will look for the function getValue() in LLCachedControl, which doesn't exist. @@ -334,10 +363,6 @@ public: */ const T &get() const { return mCachedValue; } - LLPointer getControl() const - { - return mControl; - } private: void declareTypedControl(LLControlGroup& group, const std::string& name, @@ -375,48 +400,6 @@ private: } }; -//Easiest way without messing with LLCachedControl even more.. -template -class LLCachedCOAControl -{ - LLCachedControl *mCachedControl; - boost::signals::connection mCOAConnection; - const std::string mName; - const std::string mComment; - const T mDefault; -public: - LLCachedCOAControl(const std::string& name, const T& default_value,const std::string& comment = "Declared In Code") - : mName(name),mDefault(default_value),mComment(comment) - { - mCachedControl = new LLCachedControl(mName,mDefault,gCOASavedSettings,mComment); - - static LLCachedControl settings_per_account("AscentStoreSettingsPerAccount",false); - mCOAConnection = settings_per_account.getControl()->getSignal()->connect( - boost::bind(&LLCachedCOAControl::handleCOAValueChange, this, _1)); - } - ~LLCachedCOAControl() - { - if(mCachedControl) - delete mCachedControl; - if(mCOAConnection.connected()) - mCOAConnection.disconnect(); - } - LLCachedCOAControl& operator =(const T& newvalue) - { - mCachedControl = newvalue; - return *this; - } - bool handleCOAValueChange(const LLSD& newvalue) - { - if(mCachedControl) - delete mCachedControl; - mCachedControl = new LLCachedControl(mName,mDefault,gCOASavedSettings,mComment); - return true; - } - operator const T&() const { return *mCachedControl; } - const T &get() const { return *mCachedControl; } -}; - //Following is actually defined in newview/llviewercontrol.cpp, but extern access is fine (Unless GCC bites me) template <> eControlType get_control_type(const U32& in, LLSD& out); template <> eControlType get_control_type(const S32& in, LLSD& out); diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 2450d2a35..ec1216b42 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -491,6 +491,7 @@ set(viewer_SOURCE_FILES pipeline.cpp scriptcounter.cpp wlfPanel_AdvSettings.cpp + shcommandhandler.cpp ) # This gets renamed in the packaging step @@ -949,6 +950,7 @@ set(viewer_HEADER_FILES VertexCache.h VorbisFramework.h wlfPanel_AdvSettings.h + shcommandhandler.h ) source_group("CMake Rules" FILES ViewerInstall.cmake) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8f380563d..b37ab0e7d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1,7 +1,14 @@ - + + Include + + settings_ascent.xml + settings_ascent_COA.xml + settings_SH.xml + + BeauchampUseInventoryLinks Comment @@ -24,22 +31,6 @@ Value 0 - MoyMiniMapCustomColor - - Comment - Custom minimap color you wish to have. - Persist - 1 - Type - Color4 - Value - - 0.375 - 1.0 - 1.0 - 1.0 - - ShyotlRenderUseStreamVBO Comment @@ -62,446 +53,6 @@ Value 1 - AscentInstantMessageAnnounceIncoming - - Comment - Start IM window as soon as the person starts typing - Persist - 1 - Type - Boolean - Value - 1 - - AscentShowLookAt - - Comment - Show Others' Lookat points - Persist - 1 - Type - Boolean - Value - 0 - - AscentUseStatusColors - - Comment - Show special colors for statuses like Friend, Linden, so on - Persist - 1 - Type - Boolean - Value - 0 - - AscentAvatarXModifier - - Comment - Avatar position modifier (X) - Persist - 1 - Type - F32 - Value - 0.0 - - AscentAvatarYModifier - - Comment - Avatar position modifier (Y) - Persist - 1 - Type - F32 - Value - 0.0 - - AscentAvatarZModifier - - Comment - Avatar position modifier (Z) - Persist - 1 - Type - F32 - Value - 0.0 - - AscentUseSystemFolder - - Comment - Enables the System folder for setting and non-permanent asset storage. - Persist - 1 - Type - Boolean - Value - 0 - - AscentSystemTemporary - - Comment - When enabled, temporary uploads are put in the System Asset folder (if System Folder exists). - Persist - 1 - Type - Boolean - Value - 0 - - AscentShowFriendsTag - - Comment - Show friends client tags as (Friend), and colorize them specially. - Persist - 1 - Type - Boolean - Value - 1 - - AscentUseTag - - Comment - Broadcast client tag - Persist - 1 - Type - Boolean - Value - 1 - - AscentShowIdleTime - - Comment - Show client tags for others. - Persist - 1 - Type - Boolean - Value - 1 - - AscentShowOthersTag - - Comment - Show client tags for others. - Persist - 1 - Type - Boolean - Value - 1 - - AscentShowOthersTagColor - - Comment - Show avatar names in the color of their client. - Persist - 1 - Type - Boolean - Value - 1 - - AscentBuildAlwaysEnabled - - Comment - Show build option regardless of whether you can (May not mean you can actually build there) - Persist - 1 - Type - Boolean - Value - 1 - - AscentDisableMinZoomDist - - Comment - Allows much closer camera zooming. - Persist - 1 - Type - Boolean - Value - 1 - - AscentFlyAlwaysEnabled - - Comment - Always allow fly (Does actually always allow flight) - Persist - 1 - Type - Boolean - Value - 0 - - AscentDisplayTotalScriptJumps - - Comment - Shows large changes to the sim script count in chat. - Persist - 1 - Type - Boolean - Value - 0 - - Ascentnumscriptdiff - - Comment - The delta to spam you the script jump difference - Persist - 1 - Type - F32 - Value - 100 - - Ascentnumscripts - - Comment - temp.. - Persist - 0 - Type - F32 - Value - 0.0 - - AscentBuildPrefs_ActualRoot - - Comment - Center selection on parent prim's center. - Persist - 1 - Type - Boolean - Value - 1 - - AscentBuildPrefs_PivotIsPercent - - Comment - Would you like the chatbar to be able to be used for command line functions? - Persist - 1 - Type - Boolean - Value - 1 - - AscentBuildPrefs_PivotX - - Comment - idfk - Persist - 1 - Type - F32 - Value - 50.0 - - AscentBuildPrefs_PivotY - - Comment - idfk - Persist - 1 - Type - F32 - Value - 50.0 - - AscentBuildPrefs_PivotZ - - Comment - idfk - Persist - 1 - Type - F32 - Value - 50.0 - - AscentCmdLine - - Comment - Would you like the chatbar to be able to be used for command line functions? - Persist - 1 - Type - Boolean - Value - 1 - - AscentCmdLineClearChat - - Comment - Clear chat history to stop lag from chat spam - Persist - 1 - Type - String - Value - clrchat - - AscentCmdLineHeight - - Comment - Teleport to height function command - Persist - 1 - Type - String - Value - gth - - AscentCmdLinePos - - Comment - Teleport to position function command - Persist - 1 - Type - String - Value - gtp - - AscentCmdLineGround - - Comment - Teleport to ground function command - Persist - 1 - Type - String - Value - flr - - AscentCmdLineTeleportHome - - Comment - Teleport to home function command - Persist - 1 - Type - String - Value - tph - - AscentCmdLineRezPlatform - - Comment - Rez a platform underneath you - Persist - 1 - Type - String - Value - rezplat - - AscentPlatformSize - - Comment - How wide the rezzed platform will appear to be. - Persist - 1 - Type - F32 - Value - 30 - - AscentCmdLineMapTo - - Comment - Teleport to a region by name rapidly - Persist - 1 - Type - String - Value - mapto - - AscentMapToKeepPos - - Comment - Attempt to arrive in the same location you were at. - Persist - 1 - Type - Boolean - Value - 0 - - AscentCmdLineDrawDistance - - Comment - Change draw distance quickly - Persist - 1 - Type - String - Value - dd - - AscentCmdTeleportToCam - - Comment - Teleport to your camera - Persist - 1 - Type - String - Value - tp2cam - - AscentCmdLineKeyToName - - Comment - Use a fast key to name querry - Persist - 1 - Type - String - Value - key2name - - AscentCmdLineOfferTp - - Comment - Offer a teleport to target avatar - Persist - 1 - Type - String - Value - offertp - - AscentCmdLineCalc - - Comment - Calculates an expression - Persist - 1 - Type - String - Value - calc - - AscentCmdLineTP2 - - Comment - Teleport to a person by name, partials work. - Persist - 1 - Type - String - Value - tp2 - OptionPlayTpSound Comment @@ -634,28 +185,6 @@ Value 0 - AscentDisableLogoutScreens - - Comment - Disable logout screen progress bar - Persist - 1 - Type - Boolean - Value - 0 - - AscentDisableTeleportScreens - - Comment - Disable teleport screens - Persist - 1 - Type - Boolean - Value - 0 - EmeraldUseProperArc Comment @@ -777,282 +306,6 @@ Value 0 - - NaclTagColor - - Comment - The tag color you wish to have. - Persist - 1 - Type - Color4 - Value - - 0.7 - 1.0 - 1.0 - 1.0 - - - - AscentPowerfulWizard - - Comment - User is a bad enough dude. - Persist - 1 - Type - Boolean - Value - 0 - - AscentUpdateTagsOnLoad - - Comment - Allowed client to update client definitions file. - Persist - 1 - Type - Boolean - Value - 0 - - AscentUploadSettings - - Comment - Settings for upload browser - Type - LLSD - Value - - ActivePath - None - - - AscentUseCustomTag - - Comment - Show a custom tag. - Persist - 1 - Type - Boolean - Value - 0 - - AscentCustomTagColor - - Comment - Color of custom tag. - Persist - 1 - Type - Color4 - Value - - 0.5 - 1.0 - 0.25 - 1.0 - - - AscentCustomTagLabel - - Comment - Label for the custom local tag - Persist - 1 - Type - String - Value - Custom - - AscentActiveDayCycle - - Comment - Day cycle currently in use - Persist - 1 - Type - String - Value - Default - - AscentAutoCloseOOC - - Comment - Auto-close OOC chat (i.e. add \"))\" if not found and \"((\" was used) - Persist - 1 - Type - Boolean - Value - 0 - - AscentAllowMUpose - - Comment - Allow MU* pose style in chat and IM (with ':' as a synonymous to '/me ') - Persist - 1 - Type - Boolean - Value - 0 - - AscentStoreSettingsPerAccount - - Comment - Toggles whether to save certain settings per-account, rather than per-install. - Persist - 0 - Type - Boolean - Value - 0 - - AscentDataSeparator - - Comment - This separates data bits from each other - May be used in multiple locations - Persist - 1 - Type - String - Value - :: - - AscentHideTypingNotification - - Comment - Keep those jerks guessing by hiding your "____ is typing..." message. - Persist - 0 - Type - Boolean - Value - 1 - - AscentShowSelfTag - - Comment - Show your own tag - Persist - 1 - Type - Boolean - Value - 1 - - AscentShowSelfTagColor - - Comment - Show your own tag - Persist - 1 - Type - Boolean - Value - 1 - - AscentAlwaysRezInGroup - - Comment - Always rez under the owned land group - Persist - 1 - Type - Boolean - Value - 1 - - - AscentFriendColor - - Comment - Color of chat messages from other residents - Persist - 1 - Type - Color4 - Value - - 1.0 - 1.0 - 0.0 - 1.0 - - - AscentLindenColor - - Comment - Color of chat messages from other residents - Persist - 1 - Type - Color4 - Value - - 0.0 - 0.0 - 1.0 - 1.0 - - - AscentMutedColor - - Comment - Color of chat messages from other residents - Persist - 1 - Type - Color4 - Value - - 0.7 - 0.7 - 0.7 - 1.0 - - - AscentEstateOwnerColor - - Comment - Color of chat messages from other residents - Persist - 1 - Type - Color4 - Value - - 1.0 - 0.6 - 1.0 - 1.0 - - - AscentReportClientIndex - - Comment - Show your own tag - Persist - 1 - Type - U32 - Value - 1 - - AscentReportClientUUID - - Comment - Broadcasted Client Key - Persist - 1 - Type - String - Value - 8873757c-092a-98fb-1afd-ecd347566fcd - AgentChatColor @@ -1069,6 +322,8 @@ 1.0 1.0 + IsCOA + 1 BackgroundChatColor @@ -1085,6 +340,8 @@ 0.0 1.0 + IsCOA + 1 EffectColor @@ -1101,6 +358,8 @@ 1.0 1.0 + IsCOA + 1 IMChatColor @@ -1117,6 +376,8 @@ 1.0 1.0 + IsCOA + 1 llOwnerSayChatColor @@ -1133,6 +394,8 @@ 0.689999997616 1.0 + IsCOA + 1 ObjectChatColor @@ -1149,6 +412,8 @@ 0.699999988079 1 + IsCOA + 1 SkinCurrent @@ -1160,6 +425,8 @@ String Value silver + IsCOA + 1 SystemChatColor @@ -1176,6 +443,8 @@ 1.0 1.0 + IsCOA + 1 UISndAlert @@ -1187,6 +456,8 @@ String Value ed124764-705d-d497-167a-182cd9fa2e6c + IsCOA + 1 UISndBadKeystroke @@ -1198,6 +469,8 @@ String Value 2ca849ba-2885-4bc3-90ef-d4987a5b983a + IsCOA + 1 UISndClick @@ -1209,6 +482,8 @@ String Value 4c8c3c77-de8d-bde2-b9b8-32635e0fd4a6 + IsCOA + 1 UISndClickRelease @@ -1220,6 +495,8 @@ String Value 4c8c3c77-de8d-bde2-b9b8-32635e0fd4a6 + IsCOA + 1 UISndDebugSpamToggle @@ -1231,6 +508,8 @@ Boolean Value 0 + IsCOA + 1 UISndHealthReductionF @@ -1242,6 +521,8 @@ String Value 219c5d93-6c09-31c5-fb3f-c5fe7495c115 + IsCOA + 1 UISndHealthReductionM @@ -1253,6 +534,8 @@ String Value e057c244-5768-1056-c37e-1537454eeb62 + IsCOA + 1 UISndHealthReductionThreshold @@ -1264,6 +547,8 @@ F32 Value 10.0 + IsCOA + 1 UISndInvalidOp @@ -1275,6 +560,8 @@ String Value 4174f859-0d3d-c517-c424-72923dc21f65 + IsCOA + 1 UISndMoneyChangeDown @@ -1286,6 +573,8 @@ String Value 104974e3-dfda-428b-99ee-b0d4e748d3a3 + IsCOA + 1 UISndMoneyChangeThreshold @@ -1297,6 +586,8 @@ F32 Value 50.0 + IsCOA + 1 UISndMoneyChangeUp @@ -1308,6 +599,8 @@ String Value 77a018af-098e-c037-51a6-178f05877c6f + IsCOA + 1 UISndNewIncomingIMSession @@ -1319,6 +612,8 @@ String Value 67cc2844-00f3-2b3c-b991-6418d01e1bb7 + IsCOA + 1 UISndObjectCreate @@ -1330,6 +625,8 @@ String Value f4a0660f-5446-dea2-80b7-6482a082803c + IsCOA + 1 UISndObjectDelete @@ -1341,6 +638,8 @@ String Value 0cb7b00a-4c10-6948-84de-a93c09af2ba9 + IsCOA + 1 UISndObjectRezIn @@ -1352,6 +651,8 @@ String Value 3c8fc726-1fd6-862d-fa01-16c5b2568db6 + IsCOA + 1 UISndObjectRezOut @@ -1363,6 +664,8 @@ String Value 00000000-0000-0000-0000-000000000000 + IsCOA + 1 UISndPieMenuAppear @@ -1374,6 +677,8 @@ String Value 8eaed61f-92ff-6485-de83-4dcc938a478e + IsCOA + 1 UISndPieMenuHide @@ -1385,6 +690,8 @@ String Value 00000000-0000-0000-0000-000000000000 + IsCOA + 1 UISndPieMenuSliceHighlight0 @@ -1396,6 +703,8 @@ String Value d9f73cf8-17b4-6f7a-1565-7951226c305d + IsCOA + 1 UISndPieMenuSliceHighlight1 @@ -1407,6 +716,8 @@ String Value f6ba9816-dcaf-f755-7b67-51b31b6233e5 + IsCOA + 1 UISndPieMenuSliceHighlight2 @@ -1418,6 +729,8 @@ String Value 7aff2265-d05b-8b72-63c7-dbf96dc2f21f + IsCOA + 1 UISndPieMenuSliceHighlight3 @@ -1429,6 +742,8 @@ String Value 09b2184e-8601-44e2-afbb-ce37434b8ba1 + IsCOA + 1 UISndPieMenuSliceHighlight4 @@ -1440,6 +755,8 @@ String Value bbe4c7fc-7044-b05e-7b89-36924a67593c + IsCOA + 1 UISndPieMenuSliceHighlight5 @@ -1451,6 +768,8 @@ String Value d166039b-b4f5-c2ec-4911-c85c727b016c + IsCOA + 1 UISndPieMenuSliceHighlight6 @@ -1462,6 +781,8 @@ String Value 242af82b-43c2-9a3b-e108-3b0c7e384981 + IsCOA + 1 UISndPieMenuSliceHighlight7 @@ -1473,6 +794,8 @@ String Value c1f334fb-a5be-8fe7-22b3-29631c21cf0b + IsCOA + 1 UISndSnapshot @@ -1484,6 +807,8 @@ String Value 3d09f582-3851-c0e0-f5ba-277ac5c73fb4 + IsCOA + 1 UISndStartIM @@ -1495,6 +820,8 @@ String Value c825dfbc-9827-7e02-6507-3713d18916c1 + IsCOA + 1 UISndTeleportOut @@ -1506,6 +833,8 @@ String Value d7a9a565-a013-2a69-797d-5332baa1a947 + IsCOA + 1 UISndTyping @@ -1517,6 +846,8 @@ String Value 5e191c7b-8996-9ced-a177-b2ac32bfea06 + IsCOA + 1 UISndWindowClose @@ -1528,6 +859,8 @@ String Value 2c346eda-b60c-ab33-1119-b8941916a499 + IsCOA + 1 UISndWindowOpen @@ -1539,22 +872,26 @@ String Value c80260ba-41fd-8a46-768a-6bf236360e3a + IsCOA + 1 UserChatColor - Comment + Comment Color of your chat messages - Persist + Persist 1 - Type + Type Color4 - Value + Value 1.0 1.0 1.0 1.0 + IsCOA + 1 AFKTimeout diff --git a/indra/newview/app_settings/settings_SH.xml b/indra/newview/app_settings/settings_SH.xml new file mode 100644 index 000000000..75290d85b --- /dev/null +++ b/indra/newview/app_settings/settings_SH.xml @@ -0,0 +1,60 @@ + + + + SHAllowScriptCommands + + Comment + Allow script to client intercommunication + Persist + 1 + Type + Boolean + Value + 1 + + SHScriptCommandPrefix + + Comment + Prefix that script commands must be prepended with. + Persist + 1 + Type + String + Value + #@#@! + + SHChatCommandPrefix + + Comment + Prefix that chat commands must be prepended with + Persist + 1 + Type + String + Value + >> + + SHScriptCommandSeparator + + Comment + Separator to use when tokenizing script command arguments + Persist + 1 + Type + String + Value + | + + SHChatCommandSeparator + + Comment + Separator to use when tokenizing chat command arguments + Persist + 1 + Type + String + Value + + + + diff --git a/indra/newview/app_settings/settings_ascent.xml b/indra/newview/app_settings/settings_ascent.xml new file mode 100644 index 000000000..05df2dd9b --- /dev/null +++ b/indra/newview/app_settings/settings_ascent.xml @@ -0,0 +1,590 @@ + + + + + AscentPowerfulWizard + + Comment + User is a bad enough dude. + Persist + 1 + Type + Boolean + Value + 0 + + AscentUpdateTagsOnLoad + + Comment + Allowed client to update client definitions file. + Persist + 1 + Type + Boolean + Value + 0 + + AscentUploadSettings + + Comment + Settings for upload browser + Type + LLSD + Value + + ActivePath + None + + + AscentActiveDayCycle + + Comment + Day cycle currently in use + Persist + 1 + Type + String + Value + Default + + AscentAutoCloseOOC + + Comment + Auto-close OOC chat (i.e. add \"))\" if not found and \"((\" was used) + Persist + 1 + Type + Boolean + Value + 0 + + AscentAllowMUpose + + Comment + Allow MU* pose style in chat and IM (with ':' as a synonymous to '/me ') + Persist + 1 + Type + Boolean + Value + 0 + + AscentStoreSettingsPerAccount + + Comment + Toggles whether to save certain settings per-account, rather than per-install. + Persist + 0 + Type + Boolean + Value + 0 + + AscentDataSeparator + + Comment + This separates data bits from each other - May be used in multiple locations + Persist + 1 + Type + String + Value + :: + + AscentHideTypingNotification + + Comment + Keep those jerks guessing by hiding your "____ is typing..." message. + Persist + 0 + Type + Boolean + Value + 1 + + AscentShowSelfTag + + Comment + Show your own tag + Persist + 1 + Type + Boolean + Value + 1 + + AscentShowSelfTagColor + + Comment + Show your own tag + Persist + 1 + Type + Boolean + Value + 1 + + AscentAlwaysRezInGroup + + Comment + Always rez under the owned land group + Persist + 1 + Type + Boolean + Value + 1 + + AscentDisableLogoutScreens + + Comment + Disable logout screen progress bar + Persist + 1 + Type + Boolean + Value + 0 + + AscentDisableTeleportScreens + + Comment + Disable teleport screens + Persist + 1 + Type + Boolean + Value + 0 + + AscentShowLookAt + + Comment + Show Others' Lookat points + Persist + 1 + Type + Boolean + Value + 0 + + AscentUseStatusColors + + Comment + Show special colors for statuses like Friend, Linden, so on + Persist + 1 + Type + Boolean + Value + 0 + + AscentAvatarXModifier + + Comment + Avatar position modifier (X) + Persist + 1 + Type + F32 + Value + 0.0 + + AscentAvatarYModifier + + Comment + Avatar position modifier (Y) + Persist + 1 + Type + F32 + Value + 0.0 + + AscentAvatarZModifier + + Comment + Avatar position modifier (Z) + Persist + 1 + Type + F32 + Value + 0.0 + + AscentUseSystemFolder + + Comment + Enables the System folder for setting and non-permanent asset storage. + Persist + 1 + Type + Boolean + Value + 0 + + AscentSystemTemporary + + Comment + When enabled, temporary uploads are put in the System Asset folder (if System Folder exists). + Persist + 1 + Type + Boolean + Value + 0 + + AscentShowFriendsTag + + Comment + Show friends client tags as (Friend), and colorize them specially. + Persist + 1 + Type + Boolean + Value + 1 + + AscentUseTag + + Comment + Broadcast client tag + Persist + 1 + Type + Boolean + Value + 1 + + AscentShowIdleTime + + Comment + Show client tags for others. + Persist + 1 + Type + Boolean + Value + 1 + + AscentShowOthersTag + + Comment + Show client tags for others. + Persist + 1 + Type + Boolean + Value + 1 + + AscentShowOthersTagColor + + Comment + Show avatar names in the color of their client. + Persist + 1 + Type + Boolean + Value + 1 + + AscentBuildAlwaysEnabled + + Comment + Show build option regardless of whether you can (May not mean you can actually build there) + Persist + 1 + Type + Boolean + Value + 1 + + AscentDisableMinZoomDist + + Comment + Allows much closer camera zooming. + Persist + 1 + Type + Boolean + Value + 1 + + AscentFlyAlwaysEnabled + + Comment + Always allow fly (Does actually always allow flight) + Persist + 1 + Type + Boolean + Value + 0 + + AscentDisplayTotalScriptJumps + + Comment + Shows large changes to the sim script count in chat. + Persist + 1 + Type + Boolean + Value + 0 + + Ascentnumscriptdiff + + Comment + The delta to spam you the script jump difference + Persist + 1 + Type + F32 + Value + 100 + + Ascentnumscripts + + Comment + temp.. + Persist + 0 + Type + F32 + Value + 0.0 + + AscentBuildPrefs_ActualRoot + + Comment + Center selection on parent prim's center. + Persist + 1 + Type + Boolean + Value + 1 + + AscentBuildPrefs_PivotIsPercent + + Comment + Would you like the chatbar to be able to be used for command line functions? + Persist + 1 + Type + Boolean + Value + 1 + + AscentBuildPrefs_PivotX + + Comment + idfk + Persist + 1 + Type + F32 + Value + 50.0 + + AscentBuildPrefs_PivotY + + Comment + idfk + Persist + 1 + Type + F32 + Value + 50.0 + + AscentBuildPrefs_PivotZ + + Comment + idfk + Persist + 1 + Type + F32 + Value + 50.0 + + AscentCmdLine + + Comment + Would you like the chatbar to be able to be used for command line functions? + Persist + 1 + Type + Boolean + Value + 1 + + AscentCmdLineClearChat + + Comment + Clear chat history to stop lag from chat spam + Persist + 1 + Type + String + Value + clrchat + + AscentCmdLineHeight + + Comment + Teleport to height function command + Persist + 1 + Type + String + Value + gth + + AscentCmdLinePos + + Comment + Teleport to position function command + Persist + 1 + Type + String + Value + gtp + + AscentCmdLineGround + + Comment + Teleport to ground function command + Persist + 1 + Type + String + Value + flr + + AscentCmdLineTeleportHome + + Comment + Teleport to home function command + Persist + 1 + Type + String + Value + tph + + AscentCmdLineRezPlatform + + Comment + Rez a platform underneath you + Persist + 1 + Type + String + Value + rezplat + + AscentPlatformSize + + Comment + How wide the rezzed platform will appear to be. + Persist + 1 + Type + F32 + Value + 30 + + AscentCmdLineMapTo + + Comment + Teleport to a region by name rapidly + Persist + 1 + Type + String + Value + mapto + + AscentMapToKeepPos + + Comment + Attempt to arrive in the same location you were at. + Persist + 1 + Type + Boolean + Value + 0 + + AscentCmdLineDrawDistance + + Comment + Change draw distance quickly + Persist + 1 + Type + String + Value + dd + + AscentCmdTeleportToCam + + Comment + Teleport to your camera + Persist + 1 + Type + String + Value + tp2cam + + AscentCmdLineKeyToName + + Comment + Use a fast key to name querry + Persist + 1 + Type + String + Value + key2name + + AscentCmdLineOfferTp + + Comment + Offer a teleport to target avatar + Persist + 1 + Type + String + Value + offertp + + AscentCmdLineCalc + + Comment + Calculates an expression + Persist + 1 + Type + String + Value + calc + + AscentCmdLineTP2 + + Comment + Teleport to a person by name, partials work. + Persist + 1 + Type + String + Value + tp2 + + + \ No newline at end of file diff --git a/indra/newview/app_settings/settings_ascent_COA.xml b/indra/newview/app_settings/settings_ascent_COA.xml new file mode 100644 index 000000000..c6ba3d0db --- /dev/null +++ b/indra/newview/app_settings/settings_ascent_COA.xml @@ -0,0 +1,179 @@ + + + + + MoyMiniMapCustomColor + + Comment + Custom minimap color you wish to have. + Persist + 1 + Type + Color4 + Value + + 0.375 + 1.0 + 1.0 + 1.0 + + IsCOA + 1 + + AscentInstantMessageAnnounceIncoming + + Comment + Start IM window as soon as the person starts typing + Persist + 1 + Type + Boolean + Value + 1 + IsCOA + 1 + + AscentCustomTagLabel + + Comment + Label for the custom local tag + Persist + 1 + Type + String + Value + Custom + IsCOA + 1 + + AscentCustomTagColor + + Comment + Color of custom tag. + Persist + 1 + Type + Color4 + Value + + 0.5 + 1.0 + 0.25 + 1.0 + + IsCOA + 1 + + AscentUseCustomTag + + Comment + Show a custom tag. + Persist + 1 + Type + Boolean + Value + 0 + IsCOA + 1 + + AscentReportClientIndex + + Comment + Show your own tag + Persist + 1 + Type + U32 + Value + 1 + IsCOA + 1 + + AscentFriendColor + + Comment + Color of chat messages from other residents + Persist + 1 + Type + Color4 + Value + + 1.0 + 1.0 + 0.0 + 1.0 + + IsCOA + 1 + + AscentLindenColor + + Comment + Color of chat messages from other residents + Persist + 1 + Type + Color4 + Value + + 0.0 + 0.0 + 1.0 + 1.0 + + IsCOA + 1 + + AscentMutedColor + + Comment + Color of chat messages from other residents + Persist + 1 + Type + Color4 + Value + + 0.7 + 0.7 + 0.7 + 1.0 + + IsCOA + 1 + + AscentEstateOwnerColor + + Comment + Color of chat messages from other residents + Persist + 1 + Type + Color4 + Value + + 1.0 + 0.6 + 1.0 + 1.0 + + IsCOA + 1 + + AscentReportClientUUID + + Comment + Broadcasted Client Key + Persist + 1 + Type + String + Value + 8873757c-092a-98fb-1afd-ecd347566fcd + IsCOA + 1 + + + diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index a70c8e271..ebeab42f8 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -1,31 +1,23 @@ - + + + Include + + settings_per_account_ascent.xml + AO.Settings - - Comment + + Comment List for animation overrider - Persist - 1 - Type + Persist + 1 + Type LLSD - Value - - - + Value + + + - AscentContactGroups - - Comment - List for contact groups - Persist - 1 - Type - LLSD - Value - - - - Responder.Settings Comment @@ -40,258 +32,6 @@ This is an autoresponse! - AscentInstantMessageAnnounceIncoming - - Comment - Open a new IM tab when another person begins typing to you and announce that they are doing so. - Persist - 1 - Type - Boolean - Value - 0 - - MoyMiniMapCustomColor - - Comment - Custom minimap color you wish to have. - Persist - 1 - Type - Color4 - Value - - 0.375 - 1.0 - 1.0 - 1.0 - - - AscentInstantMessageResponse - - Comment - Auto response to instant messages - Persist - 1 - Type - String - Value - This is an autoresponse! - - AscentInstantMessageResponseAnyone - - Comment - Whether to auto-respond to anyone - Persist - 1 - Type - Boolean - Value - 0 - - AscentInstantMessageResponseFriends - - Comment - Whether to auto-respond to non-friends - Persist - 1 - Type - Boolean - Value - 0 - - AscentInstantMessageResponseItem - - Comment - Whether to send a item along with the autoresponse - Persist - 1 - Type - Boolean - Value - 0 - - AscentInstantMessageResponseItemData - - Comment - UUID - Persist - 1 - Type - String - Value - - - AscentInstantMessageResponseMuted - - Comment - Whether to auto-respond to muted people - Persist - 1 - Type - Boolean - Value - 0 - - AscentInstantMessageResponseRepeat - - Comment - Whether to keep on resending the autoresponse every line they send - Persist - 1 - Type - Boolean - Value - 0 - - AscentInstantMessageShowOnTyping - - Comment - Whether to perform the autorespond the moment they begin to type instead of waiting for a actual message - Persist - 1 - Type - Boolean - Value - 0 - - AscentInstantMessageShowResponded - - Comment - Whether to hide IMs entirely from those you have chosen to send autoresponses - Persist - 1 - Type - Boolean - Value - 0 - - - AscentFriendColor - - Comment - Color of chat messages from other residents - Persist - 1 - Type - Color4 - Value - - 1.0 - 1.0 - 0.0 - 1.0 - - - AscentLindenColor - - Comment - Color of chat messages from other residents - Persist - 1 - Type - Color4 - Value - - 0.0 - 0.0 - 1.0 - 1.0 - - - AscentMutedColor - - Comment - Color of chat messages from other residents - Persist - 1 - Type - Color4 - Value - - 0.7 - 0.7 - 0.7 - 1.0 - - - AscentEstateOwnerColor - - Comment - Color of chat messages from other residents - Persist - 1 - Type - Color4 - Value - - 1.0 - 0.6 - 1.0 - 1.0 - - - AscentUseCustomTag - - Comment - Show a custom local tag. - Persist - 1 - Type - Boolean - Value - 0 - - AscentCustomTagColor - - Comment - Color of custom local tag. - Persist - 1 - Type - Color4 - Value - - 0.5 - 1.0 - 0.25 - 1.0 - - - AscentCustomTagLabel - - Comment - Label for the custom local tag - Persist - 1 - Type - String - Value - Custom - - AscentReportClientIndex - - Comment - Show your own tag - Persist - 1 - Type - U32 - Value - 1 - - AscentReportClientUUID - - Comment - Broadcasted Client Key - Persist - 1 - Type - String - Value - 8873757c-092a-98fb-1afd-ecd347566fcd - - rkeastInventoryPreviousCount @@ -326,509 +66,6 @@ Value 0 - - AgentChatColor - - Comment - Color of chat messages from other residents - Persist - 1 - Type - Color4 - Value - - 1.0 - 1.0 - 1.0 - 1.0 - - - BackgroundChatColor - - Comment - Color of chat bubble background - Persist - 1 - Type - Color4 - Value - - 0.0 - 0.0 - 0.0 - 1.0 - - - EffectColor - - Comment - Particle effects color - Persist - 1 - Type - Color4 - Value - - 1.0 - 0.0 - 0.0 - 1.0 - - - IMChatColor - - Comment - Color of instant messages from other residents - Persist - 1 - Type - Color4 - Value - - 1.0 - 1.0 - 1.0 - 1.0 - - - llOwnerSayChatColor - - Comment - Color of chat messages from objects only visible to the owner - Persist - 1 - Type - Color4 - Value - - 0.990000009537 - 0.990000009537 - 0.689999997616 - 1.0 - - - ObjectChatColor - - Comment - Color of chat messages from objects - Persist - 1 - Type - Color4 - Value - - 0.699999988079 - 0.899999976158 - 0.699999988079 - 1 - - - SkinCurrent - - Comment - The currently selected skin. - Persist - 1 - Type - String - Value - default - - SystemChatColor - - Comment - Color of chat messages from SL System - Persist - 1 - Type - Color4 - Value - - 0.800000011921 - 1.0 - 1.0 - 1.0 - - - UISndAlert - - Comment - Sound file for alerts (uuid for sound asset) - Persist - 1 - Type - String - Value - ed124764-705d-d497-167a-182cd9fa2e6c - - UISndBadKeystroke - - Comment - Sound file for invalid keystroke (uuid for sound asset) - Persist - 1 - Type - String - Value - 2ca849ba-2885-4bc3-90ef-d4987a5b983a - - UISndClick - - Comment - Sound file for mouse click (uuid for sound asset) - Persist - 1 - Type - String - Value - 4c8c3c77-de8d-bde2-b9b8-32635e0fd4a6 - - UISndClickRelease - - Comment - Sound file for mouse button release (uuid for sound asset) - Persist - 1 - Type - String - Value - 4c8c3c77-de8d-bde2-b9b8-32635e0fd4a6 - - UISndDebugSpamToggle - - Comment - Log UI sound effects as they are played - Persist - 1 - Type - Boolean - Value - 0 - - UISndHealthReductionF - - Comment - Sound file for female pain (uuid for sound asset) - Persist - 1 - Type - String - Value - 219c5d93-6c09-31c5-fb3f-c5fe7495c115 - - UISndHealthReductionM - - Comment - Sound file for male pain (uuid for sound asset) - Persist - 1 - Type - String - Value - e057c244-5768-1056-c37e-1537454eeb62 - - UISndHealthReductionThreshold - - Comment - Amount of health reduction required to trigger "pain" sound - Persist - 1 - Type - F32 - Value - 10.0 - - UISndInvalidOp - - Comment - Sound file for invalid operations (uuid for sound asset) - Persist - 1 - Type - String - Value - 4174f859-0d3d-c517-c424-72923dc21f65 - - UISndMoneyChangeDown - - Comment - Sound file for L$ balance increase (uuid for sound asset) - Persist - 1 - Type - String - Value - 104974e3-dfda-428b-99ee-b0d4e748d3a3 - - UISndMoneyChangeThreshold - - Comment - Amount of change in L$ balance required to trigger "money" sound - Persist - 1 - Type - F32 - Value - 50.0 - - UISndMoneyChangeUp - - Comment - Sound file for L$ balance decrease(uuid for sound asset) - Persist - 1 - Type - String - Value - 77a018af-098e-c037-51a6-178f05877c6f - - UISndNewIncomingIMSession - - Comment - Sound file for new instant message session(uuid for sound asset) - Persist - 1 - Type - String - Value - 67cc2844-00f3-2b3c-b991-6418d01e1bb7 - - UISndObjectCreate - - Comment - Sound file for object creation (uuid for sound asset) - Persist - 1 - Type - String - Value - f4a0660f-5446-dea2-80b7-6482a082803c - - UISndObjectDelete - - Comment - Sound file for object deletion (uuid for sound asset) - Persist - 1 - Type - String - Value - 0cb7b00a-4c10-6948-84de-a93c09af2ba9 - - UISndObjectRezIn - - Comment - Sound file for rezzing objects (uuid for sound asset) - Persist - 1 - Type - String - Value - 3c8fc726-1fd6-862d-fa01-16c5b2568db6 - - UISndObjectRezOut - - Comment - Sound file for derezzing objects (uuid for sound asset) - Persist - 1 - Type - String - Value - 00000000-0000-0000-0000-000000000000 - - UISndPieMenuAppear - - Comment - Sound file for opening pie menu (uuid for sound asset) - Persist - 1 - Type - String - Value - 8eaed61f-92ff-6485-de83-4dcc938a478e - - UISndPieMenuHide - - Comment - Sound file for closing pie menu (uuid for sound asset) - Persist - 1 - Type - String - Value - 00000000-0000-0000-0000-000000000000 - - UISndPieMenuSliceHighlight0 - - Comment - Sound file for selecting pie menu item 0 (uuid for sound asset) - Persist - 1 - Type - String - Value - d9f73cf8-17b4-6f7a-1565-7951226c305d - - UISndPieMenuSliceHighlight1 - - Comment - Sound file for selecting pie menu item 1 (uuid for sound asset) - Persist - 1 - Type - String - Value - f6ba9816-dcaf-f755-7b67-51b31b6233e5 - - UISndPieMenuSliceHighlight2 - - Comment - Sound file for selecting pie menu item 2 (uuid for sound asset) - Persist - 1 - Type - String - Value - 7aff2265-d05b-8b72-63c7-dbf96dc2f21f - - UISndPieMenuSliceHighlight3 - - Comment - Sound file for selecting pie menu item 3 (uuid for sound asset) - Persist - 1 - Type - String - Value - 09b2184e-8601-44e2-afbb-ce37434b8ba1 - - UISndPieMenuSliceHighlight4 - - Comment - Sound file for selecting pie menu item 4 (uuid for sound asset) - Persist - 1 - Type - String - Value - bbe4c7fc-7044-b05e-7b89-36924a67593c - - UISndPieMenuSliceHighlight5 - - Comment - Sound file for selecting pie menu item 5 (uuid for sound asset) - Persist - 1 - Type - String - Value - d166039b-b4f5-c2ec-4911-c85c727b016c - - UISndPieMenuSliceHighlight6 - - Comment - Sound file for selecting pie menu item 6 (uuid for sound asset) - Persist - 1 - Type - String - Value - 242af82b-43c2-9a3b-e108-3b0c7e384981 - - UISndPieMenuSliceHighlight7 - - Comment - Sound file for selecting pie menu item 7 (uuid for sound asset) - Persist - 1 - Type - String - Value - c1f334fb-a5be-8fe7-22b3-29631c21cf0b - - UISndSnapshot - - Comment - Sound file for taking a snapshot (uuid for sound asset) - Persist - 1 - Type - String - Value - 3d09f582-3851-c0e0-f5ba-277ac5c73fb4 - - UISndStartIM - - Comment - Sound file for starting a new IM session (uuid for sound asset) - Persist - 1 - Type - String - Value - c825dfbc-9827-7e02-6507-3713d18916c1 - - UISndTeleportOut - - Comment - Sound file for teleporting (uuid for sound asset) - Persist - 1 - Type - String - Value - d7a9a565-a013-2a69-797d-5332baa1a947 - - UISndTyping - - Comment - Sound file for starting to type a chat message (uuid for sound asset) - Persist - 1 - Type - String - Value - 5e191c7b-8996-9ced-a177-b2ac32bfea06 - - UISndWindowClose - - Comment - Sound file for closing a window (uuid for sound asset) - Persist - 1 - Type - String - Value - 2c346eda-b60c-ab33-1119-b8941916a499 - - UISndWindowOpen - - Comment - Sound file for opening a window (uuid for sound asset) - Persist - 1 - Type - String - Value - c80260ba-41fd-8a46-768a-6bf236360e3a - - UserChatColor - - Comment - Color of your chat messages - Persist - 1 - Type - Color4 - Value - - 1.0 - 1.0 - 1.0 - 1.0 - - BusyModeResponse Comment diff --git a/indra/newview/app_settings/settings_per_account_ascent.xml b/indra/newview/app_settings/settings_per_account_ascent.xml new file mode 100644 index 000000000..810586528 --- /dev/null +++ b/indra/newview/app_settings/settings_per_account_ascent.xml @@ -0,0 +1,117 @@ + + + + AscentContactGroups + + Comment + List for contact groups + Persist + 1 + Type + LLSD + Value + + + + + AscentInstantMessageResponse + + Comment + Auto response to instant messages + Persist + 1 + Type + String + Value + This is an autoresponse! + + AscentInstantMessageResponseAnyone + + Comment + Whether to auto-respond to anyone + Persist + 1 + Type + Boolean + Value + 0 + + AscentInstantMessageResponseFriends + + Comment + Whether to auto-respond to non-friends + Persist + 1 + Type + Boolean + Value + 0 + + AscentInstantMessageResponseItem + + Comment + Whether to send a item along with the autoresponse + Persist + 1 + Type + Boolean + Value + 0 + + AscentInstantMessageResponseItemData + + Comment + UUID + Persist + 1 + Type + String + Value + + + AscentInstantMessageResponseMuted + + Comment + Whether to auto-respond to muted people + Persist + 1 + Type + Boolean + Value + 0 + + AscentInstantMessageResponseRepeat + + Comment + Whether to keep on resending the autoresponse every line they send + Persist + 1 + Type + Boolean + Value + 0 + + AscentInstantMessageShowOnTyping + + Comment + Whether to perform the autorespond the moment they begin to type instead of waiting for a actual message + Persist + 1 + Type + Boolean + Value + 0 + + AscentInstantMessageShowResponded + + Comment + Whether to hide IMs entirely from those you have chosen to send autoresponses + Persist + 1 + Type + Boolean + Value + 0 + + + \ No newline at end of file diff --git a/indra/newview/ascentprefsvan.cpp b/indra/newview/ascentprefsvan.cpp index 75c4794ca..a22d61742 100644 --- a/indra/newview/ascentprefsvan.cpp +++ b/indra/newview/ascentprefsvan.cpp @@ -123,8 +123,8 @@ void LLPrefsAscentVanImpl::onCommitColor(LLUICtrl* ctrl, void* user_data) { llinfos << "Recreating color message for tag update." << llendl; - gCOASavedSettings->setString("AscentCustomTagLabel", self->childGetValue("custom_tag_label_box")); - gCOASavedSettings->setColor4("AscentCustomTagColor", self->childGetValue("custom_tag_color_swatch")); + gSavedSettings.setString("AscentCustomTagLabel", self->childGetValue("custom_tag_label_box")); + gSavedSettings.setColor4("AscentCustomTagColor", self->childGetValue("custom_tag_color_swatch")); gAgent.sendAgentSetAppearance(); gAgent.resetClientTag(); } @@ -181,7 +181,7 @@ void LLPrefsAscentVanImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data) } BOOL showCustomOptions; - showCustomOptions = gCOASavedSettings->getBOOL("AscentUseCustomTag"); + showCustomOptions = gSavedSettings.getBOOL("AscentUseCustomTag"); self->childSetValue("customize_own_tag_check", showCustomOptions); self->childSetEnabled("custom_tag_label_text", showCustomOptions); self->childSetEnabled("custom_tag_label_box", showCustomOptions); @@ -204,21 +204,21 @@ void LLPrefsAscentVanImpl::refreshValues() mShowSelfClientTagColor = gSavedSettings.getBOOL("AscentShowSelfTagColor"); mCustomTagOn = gSavedSettings.getBOOL("AscentUseCustomTag"); - mSelectedClient = gCOASavedSettings->getU32("AscentReportClientIndex"); - mEffectColor = gCOASavedSettings->getColor4("EffectColor"); + mSelectedClient = gSavedSettings.getU32("AscentReportClientIndex"); + mEffectColor = gSavedSettings.getColor4("EffectColor"); childSetEnabled("custom_tag_label_text", mCustomTagOn); childSetEnabled("custom_tag_label_box", mCustomTagOn); childSetEnabled("custom_tag_color_text", mCustomTagOn); childSetEnabled("custom_tag_color_swatch", mCustomTagOn); - mCustomTagLabel = gCOASavedSettings->getString("AscentCustomTagLabel"); - mCustomTagColor = gCOASavedSettings->getColor4("AscentCustomTagColor"); - mFriendColor = gCOASavedSettings->getColor4("AscentFriendColor"); - mLindenColor = gCOASavedSettings->getColor4("AscentLindenColor"); - mMutedColor = gCOASavedSettings->getColor4("AscentMutedColor"); - mEMColor = gCOASavedSettings->getColor4("AscentEstateOwnerColor"); - mCustomColor = gCOASavedSettings->getColor4("MoyMiniMapCustomColor"); + mCustomTagLabel = gSavedSettings.getString("AscentCustomTagLabel"); + mCustomTagColor = gSavedSettings.getColor4("AscentCustomTagColor"); + mFriendColor = gSavedSettings.getColor4("AscentFriendColor"); + mLindenColor = gSavedSettings.getColor4("AscentLindenColor"); + mMutedColor = gSavedSettings.getColor4("AscentMutedColor"); + mEMColor = gSavedSettings.getColor4("AscentEstateOwnerColor"); + mCustomColor = gSavedSettings.getColor4("MoyMiniMapCustomColor"); } void LLPrefsAscentVanImpl::refresh() @@ -246,23 +246,23 @@ void LLPrefsAscentVanImpl::refresh() getChild("muted_color_swatch")->set(mMutedColor); getChild("em_color_swatch")->set(mEMColor); getChild("custom_color_swatch")->set(mCustomColor); - gCOASavedSettings->setColor4("EffectColor", LLColor4::white); - gCOASavedSettings->setColor4("EffectColor", mEffectColor); + gSavedSettings.setColor4("EffectColor", LLColor4::white); + gSavedSettings.setColor4("EffectColor", mEffectColor); - gCOASavedSettings->setColor4("AscentFriendColor", LLColor4::white); - gCOASavedSettings->setColor4("AscentFriendColor", mFriendColor); + gSavedSettings.setColor4("AscentFriendColor", LLColor4::white); + gSavedSettings.setColor4("AscentFriendColor", mFriendColor); - gCOASavedSettings->setColor4("AscentLindenColor", LLColor4::white); - gCOASavedSettings->setColor4("AscentLindenColor", mLindenColor); + gSavedSettings.setColor4("AscentLindenColor", LLColor4::white); + gSavedSettings.setColor4("AscentLindenColor", mLindenColor); - gCOASavedSettings->setColor4("AscentMutedColor", LLColor4::white); - gCOASavedSettings->setColor4("AscentMutedColor", mMutedColor); + gSavedSettings.setColor4("AscentMutedColor", LLColor4::white); + gSavedSettings.setColor4("AscentMutedColor", mMutedColor); - gCOASavedSettings->setColor4("AscentEstateOwnerColor", LLColor4::white); - gCOASavedSettings->setColor4("AscentEstateOwnerColor", mEMColor); + gSavedSettings.setColor4("AscentEstateOwnerColor", LLColor4::white); + gSavedSettings.setColor4("AscentEstateOwnerColor", mEMColor); - gCOASavedSettings->setColor4("MoyMiniMapCustomColor", LLColor4::white); - gCOASavedSettings->setColor4("MoyMiniMapCustomColor", mCustomColor); + gSavedSettings.setColor4("MoyMiniMapCustomColor", LLColor4::white); + gSavedSettings.setColor4("MoyMiniMapCustomColor", mCustomColor); gAgent.resetClientTag(); } @@ -274,18 +274,18 @@ void LLPrefsAscentVanImpl::cancel() childSetValue("tp_sound_check", mPlayTPSound); childSetValue("disable_logout_screen_check", mShowLogScreens); - gCOASavedSettings->setColor4("EffectColor", LLColor4::white); - gCOASavedSettings->setColor4("EffectColor", mEffectColor); - gCOASavedSettings->setColor4("AscentFriendColor", LLColor4::yellow); - gCOASavedSettings->setColor4("AscentFriendColor", mFriendColor); - gCOASavedSettings->setColor4("AscentLindenColor", LLColor4::yellow); - gCOASavedSettings->setColor4("AscentLindenColor", mLindenColor); - gCOASavedSettings->setColor4("AscentMutedColor", LLColor4::yellow); - gCOASavedSettings->setColor4("AscentMutedColor", mMutedColor); - gCOASavedSettings->setColor4("AscentEstateOwnerColor", LLColor4::yellow); - gCOASavedSettings->setColor4("AscentEstateOwnerColor", mEMColor); - gCOASavedSettings->setColor4("MoyMiniMapCustomColor", LLColor4::yellow); - gCOASavedSettings->setColor4("MoyMiniMapCustomColor", mCustomColor); + gSavedSettings.setColor4("EffectColor", LLColor4::white); + gSavedSettings.setColor4("EffectColor", mEffectColor); + gSavedSettings.setColor4("AscentFriendColor", LLColor4::yellow); + gSavedSettings.setColor4("AscentFriendColor", mFriendColor); + gSavedSettings.setColor4("AscentLindenColor", LLColor4::yellow); + gSavedSettings.setColor4("AscentLindenColor", mLindenColor); + gSavedSettings.setColor4("AscentMutedColor", LLColor4::yellow); + gSavedSettings.setColor4("AscentMutedColor", mMutedColor); + gSavedSettings.setColor4("AscentEstateOwnerColor", LLColor4::yellow); + gSavedSettings.setColor4("AscentEstateOwnerColor", mEMColor); + gSavedSettings.setColor4("MoyMiniMapCustomColor", LLColor4::yellow); + gSavedSettings.setColor4("MoyMiniMapCustomColor", mCustomColor); } void LLPrefsAscentVanImpl::apply() @@ -306,8 +306,8 @@ void LLPrefsAscentVanImpl::apply() if (client_index != mSelectedClient) { client_uuid = combo->getSelectedValue().asString(); - gCOASavedSettings->setString("AscentReportClientUUID", client_uuid); - gCOASavedSettings->setU32("AscentReportClientIndex", client_index); + gSavedSettings.setString("AscentReportClientUUID", client_uuid); + gSavedSettings.setU32("AscentReportClientIndex", client_index); LLVOAvatar* avatar = gAgent.getAvatarObject(); if (!avatar) return; @@ -319,15 +319,15 @@ void LLPrefsAscentVanImpl::apply() gSavedSettings.setBOOL("AscentShowSelfTag", childGetValue("show_self_tag_check")); gSavedSettings.setBOOL("AscentShowSelfTagColor", childGetValue("show_self_tag_color_check")); - gCOASavedSettings->setColor4("EffectColor", childGetValue("effect_color_swatch")); - gCOASavedSettings->setColor4("AscentFriendColor", childGetValue("friend_color_swatch")); - gCOASavedSettings->setColor4("AscentLindenColor", childGetValue("linden_color_swatch")); - gCOASavedSettings->setColor4("AscentMutedColor", childGetValue("muted_color_swatch")); - gCOASavedSettings->setColor4("AscentEstateOwnerColor", childGetValue("em_color_swatch")); - gCOASavedSettings->setColor4("MoyMiniMapCustomColor", childGetValue("custom_color_swatch")); - gCOASavedSettings->setBOOL("AscentUseCustomTag", childGetValue("customize_own_tag_check")); - gCOASavedSettings->setString("AscentCustomTagLabel", childGetValue("custom_tag_label_box")); - gCOASavedSettings->setColor4("AscentCustomTagColor", childGetValue("custom_tag_color_swatch")); + gSavedSettings.setColor4("EffectColor", childGetValue("effect_color_swatch")); + gSavedSettings.setColor4("AscentFriendColor", childGetValue("friend_color_swatch")); + gSavedSettings.setColor4("AscentLindenColor", childGetValue("linden_color_swatch")); + gSavedSettings.setColor4("AscentMutedColor", childGetValue("muted_color_swatch")); + gSavedSettings.setColor4("AscentEstateOwnerColor", childGetValue("em_color_swatch")); + gSavedSettings.setColor4("MoyMiniMapCustomColor", childGetValue("custom_color_swatch")); + gSavedSettings.setBOOL("AscentUseCustomTag", childGetValue("customize_own_tag_check")); + gSavedSettings.setString("AscentCustomTagLabel", childGetValue("custom_tag_label_box")); + gSavedSettings.setColor4("AscentCustomTagColor", childGetValue("custom_tag_color_swatch")); refreshValues(); } diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 586cd3bd7..0e99d5121 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -474,7 +474,7 @@ void LLAgent::init() // LLDebugVarMessageBox::show("Camera Lag", &CAMERA_FOCUS_HALF_LIFE, 0.5f, 0.01f); - mEffectColor = gCOASavedSettings->getColor4("EffectColor"); + mEffectColor = gSavedSettings.getColor4("EffectColor"); mInitialized = TRUE; } @@ -7539,7 +7539,7 @@ void LLAgent::sendAgentSetAppearance() LLColor4 color; if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) { - color = gCOASavedSettings->setColor4("AscentCustomTagColor"); + color = gSavedSettings.setColor4("AscentCustomTagColor"); } else { diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 00810cddd..fe3888d18 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1758,6 +1758,10 @@ bool LLAppViewer::initConfiguration() return false; } + //COA vars in gSavedSettings will be linked to gSavedPerAccountSettings entries that will be created if not present. + //Signals will be shared between linked vars. + gSavedSettings.connectCOAVars(gSavedPerAccountSettings); + // - set procedural settings gSavedSettings.setString("ClientSettingsFile", gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 43873435e..642beb4fe 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -70,6 +70,10 @@ #include "chatbar_as_cmdline.h" +#if SHY_MOD //Command handler +#include "shcommandhandler.h" +#endif //shy_mod + // // Globals // @@ -468,6 +472,9 @@ void LLChatBar::sendChat( EChatType type ) if (!utf8_revised_text.empty() && cmd_line_chat(utf8_revised_text, nType)) { // Chat with animation +#if SHY_MOD //Command handler + if(!SHCommandHandler::handleCommand(true, utf8_revised_text, gAgentID, (LLViewerObject*)gAgent.getAvatarObject()))//returns true if handled +#endif //shy_mod sendChatFromViewer(utf8_revised_text, nType, TRUE); } } diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index c673821f4..410bd069e 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -700,25 +700,25 @@ void LLFloaterAvatarList::refreshAvatarList() //Lindens are always more Linden than your friend, make that take precedence if(LLMuteList::getInstance()->isLinden(av_name)) { - static const LLCachedCOAControl ascent_linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f)); + static const LLCachedControl ascent_linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f)); element["columns"][LIST_AVATAR_NAME]["color"] = ascent_linden_color.get().getValue(); } //check if they are an estate owner at their current position else if(estate_owner.notNull() && av_id == estate_owner) { - static const LLCachedCOAControl ascent_estate_owner_color("AscentEstateOwnerColor",LLColor4(1.f,0.6f,1.f,1.f)); + static const LLCachedControl ascent_estate_owner_color("AscentEstateOwnerColor",LLColor4(1.f,0.6f,1.f,1.f)); element["columns"][LIST_AVATAR_NAME]["color"] = ascent_estate_owner_color.get().getValue(); } //without these dots, SL would suck. else if(is_agent_friend(av_id)) { - static const LLCachedCOAControl ascent_friend_color("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f)); + static const LLCachedControl ascent_friend_color("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f)); element["columns"][LIST_AVATAR_NAME]["color"] = ascent_friend_color.get().getValue(); } //big fat jerkface who is probably a jerk, display them as such. else if(LLMuteList::getInstance()->isMuted(av_id)) { - static const LLCachedCOAControl ascent_muted_color("AscentMutedColor",LLColor4(0.7f,0.7f,0.7f,1.f)); + static const LLCachedControl ascent_muted_color("AscentMutedColor",LLColor4(0.7f,0.7f,0.7f,1.f)); element["columns"][LIST_AVATAR_NAME]["color"] = ascent_muted_color.get().getValue(); } diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 267746761..6cbf16e6a 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -100,7 +100,7 @@ void LLFloaterSettingsDebug::draw() { LLComboBox* settings_combo = getChild("settings_combo"); LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); - updateControl(controlp); + updateControl(controlp ? controlp->getCOAActive() : NULL); LLFloater::draw(); } @@ -125,7 +125,7 @@ void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl, void* user_data) LLComboBox* combo_box = (LLComboBox*)ctrl; LLControlVariable* controlp = (LLControlVariable*)combo_box->getCurrentUserdata(); - floaterp->updateControl(controlp); + floaterp->updateControl(controlp ? controlp->getCOAActive() : NULL); } //static @@ -135,6 +135,7 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) LLComboBox* settings_combo = floaterp->getChild("settings_combo"); LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); + controlp = controlp ? controlp->getCOAActive() : NULL; LLVector3 vector; LLVector3d vectord; @@ -212,6 +213,7 @@ void LLFloaterSettingsDebug::onClickDefault(void* user_data) if (controlp) { + controlp = controlp->getCOAActive(); controlp->resetToDefault(); floaterp->updateControl(controlp); } @@ -243,6 +245,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) if (controlp) { + controlp = controlp->getCOAActive(); eControlType type = controlp->type(); //hide combo box only for non booleans, otherwise this will result in the combo box closing every frame diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 9518c3f17..68eda63b0 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -60,6 +60,10 @@ #include "chatbar_as_cmdline.h" +#if SHY_MOD //Command handler +#include "shcommandhandler.h" +#endif //shy_mod + LLGestureManager gGestureManager; // Longest time, in seconds, to wait for all animations to stop playing @@ -886,6 +890,9 @@ void LLGestureManager::runStep(LLMultiGesture* gesture, LLGestureStep* step) if ( cmd_line_chat(chat_text, CHAT_TYPE_NORMAL)) { +#if SHY_MOD //Command handler + if(!SHCommandHandler::handleCommand(true, chat_text, gAgentID, gAgent.getAvatarObject()))//returns true if handled +#endif //shy_mod gChatBar->sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate); } gesture->mCurrentStep++; diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 01d21f250..a76c63661 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -629,6 +629,91 @@ bool packRoleUpdateMessageBlock(LLMessageSystem* msg, return start_message; } +#if SHY_MOD //Group Title script access +#include "shcommandhandler.h" +class SH_GroupRoleChanger +{ + std::pair gForceRole; + typedef std::map title_map_t; + typedef std::map role_map_t; + typedef std::map group_map_t; + + //group_map_t = >> + group_map_t gPendingRoleChanges; //lol + +public: + virtual ~SH_GroupRoleChanger(){} + void CheckUpdateRole(const LLUUID &group_id,LLGroupMgrGroupData::role_list_t &roles) + { + group_map_t::iterator group_it = gPendingRoleChanges.find(group_id); + if(group_it != gPendingRoleChanges.end()) //valid group + { + for(LLGroupMgrGroupData::role_list_t::iterator roles_it = roles.begin();roles_it!=roles.end();++roles_it) + { + //bool start_message = true; + LLGroupRoleData &role = *(roles_it->second); + LLRoleData data = role.getRoleData(); + role_map_t::iterator stored_role_it = group_it->second.find(data.mRoleName); + if(stored_role_it != group_it->second.end())//found matching role. + { + if(!(stored_role_it->second.empty())) + { + title_map_t::iterator entry_it = stored_role_it->second.begin(); + for(;entry_it!=stored_role_it->second.end();++entry_it) + { + if(entry_it->first == false) + data.mRoleDescription = entry_it->second; + else + data.mRoleTitle = entry_it->second; + } + if(gForceRole.first == group_id && gForceRole.second == data.mRoleName) + { + if(gAgent.getGroupID() != group_id) + { + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_ActivateGroup); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->addUUIDFast(_PREHASH_GroupID, group_id); + gAgent.sendReliableMessage(); //Set group. + } + LLGroupMgr::getInstance()->sendGroupTitleUpdate(group_id,role.getID()); + } + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_id); + gdatap->setRoleData(role.getID(),data); + } + } + } + gPendingRoleChanges.erase(group_it); + } + LLGroupMgr::getInstance()->sendGroupRoleChanges(group_id); //get roles list from groupid + gForceRole.first = LLUUID::null; + } + void RequestUpdateRole(const LLUUID& group_id, const std::string &rolename, bool title, const std::string &string, bool force = false) //if !title then desc. + { + if(force) + { + gForceRole.first = group_id; + gForceRole.second = rolename; + } + gPendingRoleChanges[group_id][rolename][title]=string; + LLGroupMgr::getInstance()->sendGroupRoleDataRequest(group_id); //get roles list from groupid + } +}gGroupRoleChanger; + +CMD_SCRIPT(setroletext) +{ + const LLUUID group_id = args[1].asUUID(); + const std::string rolename = args[2].asString(); + const bool title = args[3].asInteger() == 1; + const std::string str = args[4].asString(); + const bool force = args[5].asInteger() == 1; + llinfos<<"Updating role- group_id:"<mChanged = TRUE; +#if SHY_MOD //Group title script access + gGroupRoleChanger.CheckUpdateRole(group_id,group_data->mRoles); +#endif //shy_mod LLGroupMgr::getInstance()->notifyObservers(GC_ROLE_DATA); } diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 07b51b022..cbbcd98bd 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -360,10 +360,10 @@ void LLNetMap::draw() // LLColor4 mapcolor = gAvatarMapColor; static const LLCachedControl standard_color("MapAvatar",LLColor4(0.f,1.f,0.f,1.f),gColors); - static const LLCachedCOAControl friend_color("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f)); - static const LLCachedCOAControl em_color("AscentEstateOwnerColor",LLColor4(1.f,0.6f,1.f,1.f)); - static const LLCachedCOAControl linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f)); - static const LLCachedCOAControl muted_color("AscentMutedColor",LLColor4(0.7f,0.7f,0.7f,1.f)); + static const LLCachedControl friend_color("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f)); + static const LLCachedControl em_color("AscentEstateOwnerColor",LLColor4(1.f,0.6f,1.f,1.f)); + static const LLCachedControl linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f)); + static const LLCachedControl muted_color("AscentMutedColor",LLColor4(0.7f,0.7f,0.7f,1.f)); std::vector avatar_ids; std::vector positions; diff --git a/indra/newview/llsavedsettingsglue.cpp b/indra/newview/llsavedsettingsglue.cpp index b2de7edaf..72879837f 100644 --- a/indra/newview/llsavedsettingsglue.cpp +++ b/indra/newview/llsavedsettingsglue.cpp @@ -79,14 +79,14 @@ void LLSavedSettingsGlue::setString(LLUICtrl* ctrl, void* data) //Begin Ascent SavedSettings/PerAccountSettings handling //Get -LLControlVariable *gCOASavedSettings->getControl(const std::string &name) +LLControlVariable *LLSavedSettingsGlue::getControl(const std::string &name) { if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) return gSavedSettings.getControl(name); else return gSavedPerAccountSettings.getControl(name); } -BOOL gCOASavedSettings->getBOOL(const std::string &name) +BOOL LLSavedSettingsGlue::getBOOL(const std::string &name) { if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) return gSavedSettings.getBOOL(name); @@ -94,7 +94,7 @@ BOOL gCOASavedSettings->getBOOL(const std::string &name) return gSavedPerAccountSettings.getBOOL(name); } -S32 gCOASavedSettings->getS32(const std::string &name) +S32 LLSavedSettingsGlue::getS32(const std::string &name) { if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) return gSavedSettings.getS32(name); @@ -102,7 +102,7 @@ S32 gCOASavedSettings->getS32(const std::string &name) return gSavedPerAccountSettings.getS32(name); } -F32 gCOASavedSettings->getF32(const std::string &name) +F32 LLSavedSettingsGlue::getF32(const std::string &name) { if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) return gSavedSettings.getF32(name); @@ -110,7 +110,7 @@ F32 gCOASavedSettings->getF32(const std::string &name) return gSavedPerAccountSettings.getF32(name); } -U32 gCOASavedSettings->getU32(const std::string &name) +U32 LLSavedSettingsGlue::getU32(const std::string &name) { if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) return gSavedSettings.getU32(name); @@ -118,7 +118,7 @@ U32 gCOASavedSettings->getU32(const std::string &name) return gSavedPerAccountSettings.getU32(name); } -std::string gCOASavedSettings->getString(const std::string &name) +std::string LLSavedSettingsGlue::getString(const std::string &name) { if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) return gSavedSettings.getString(name); @@ -126,7 +126,7 @@ std::string gCOASavedSettings->getString(const std::string &name) return gSavedPerAccountSettings.getString(name); } -LLColor4 gCOASavedSettings->getColor4(const std::string &name) +LLColor4 LLSavedSettingsGlue::getColor4(const std::string &name) { if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) return gSavedSettings.getColor4(name); @@ -136,7 +136,7 @@ LLColor4 gCOASavedSettings->getColor4(const std::string &name) //Set -void gCOASavedSettings->setBOOL(const std::string &name, BOOL value) +void LLSavedSettingsGlue::setBOOL(const std::string &name, BOOL value) { if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) gSavedSettings.setBOOL(name, value); @@ -144,7 +144,7 @@ void gCOASavedSettings->setBOOL(const std::string &name, BOOL value) gSavedPerAccountSettings.setBOOL(name, value); } -void gCOASavedSettings->setS32(const std::string &name, S32 value) +void LLSavedSettingsGlue::setS32(const std::string &name, S32 value) { if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) gSavedSettings.setS32(name, value); @@ -152,7 +152,7 @@ void gCOASavedSettings->setS32(const std::string &name, S32 value) gSavedPerAccountSettings.setS32(name, value); } -void gCOASavedSettings->setF32(const std::string &name, F32 value) +void LLSavedSettingsGlue::setF32(const std::string &name, F32 value) { if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) gSavedSettings.setF32(name, value); @@ -160,7 +160,7 @@ void gCOASavedSettings->setF32(const std::string &name, F32 value) gSavedPerAccountSettings.setF32(name, value); } -void gCOASavedSettings->setU32(const std::string &name, U32 value) +void LLSavedSettingsGlue::setU32(const std::string &name, U32 value) { if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) gSavedSettings.setU32(name, value); @@ -168,7 +168,7 @@ void gCOASavedSettings->setU32(const std::string &name, U32 value) gSavedPerAccountSettings.setU32(name, value); } -void gCOASavedSettings->setString(const std::string &name, std::string value) +void LLSavedSettingsGlue::setString(const std::string &name, std::string value) { if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) gSavedSettings.setString(name, value); @@ -176,7 +176,7 @@ void gCOASavedSettings->setString(const std::string &name, std::string value) gSavedPerAccountSettings.setString(name, value); } -void gCOASavedSettings->setColor4(const std::string &name, LLColor4 value) +void LLSavedSettingsGlue::setColor4(const std::string &name, LLColor4 value) { if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) gSavedSettings.setColor4(name, value); diff --git a/indra/newview/llsavedsettingsglue.h b/indra/newview/llsavedsettingsglue.h index 06799ec63..6108b69ae 100644 --- a/indra/newview/llsavedsettingsglue.h +++ b/indra/newview/llsavedsettingsglue.h @@ -49,7 +49,7 @@ public:/* static void setString(LLUICtrl* ctrl, void* name); //Ascent Client-Or-Account Settings Get - static LLControlVariable *gCOASavedSettings->getControl(const std::string &name); + static LLControlVariable *getControl(const std::string &name); static BOOL getCOABOOL(const std::string &name); static S32 getCOAS32(const std::string &name); static F32 getCOAF32(const std::string &name); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 351d4ea9b..ae5347fb4 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -82,7 +82,6 @@ BOOL gHackGodmode = FALSE; std::map gSettings; LLControlGroup gSavedSettings; // saved at end of session LLControlGroup gSavedPerAccountSettings; // saved at end of session -LLControlGroup *gCOASavedSettings = &gSavedSettings; //Ascent Client-Or-Account LLControlGroup gColors; // read-only LLControlGroup gCrashSettings; // saved at end of session @@ -499,11 +498,7 @@ bool handleCloudSettingsChanged(const LLSD& newvalue) LLPipeline::toggleRenderTypeControl((void*)LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS); return true; } -bool handleAscentCOAChange(const LLSD& newvalue) -{ - gCOASavedSettings = newvalue.asBoolean() ? &gSavedPerAccountSettings : &gSavedSettings; - return true; -} + bool handleAscentSelfTag(const LLSD& newvalue) { if(gAgent.getAvatarObject()) @@ -522,7 +517,6 @@ bool handleAscentGlobalTag(const LLSD& newvalue) return true; } //////////////////////////////////////////////////////////////////////////// - void settings_setup_listeners() { gSavedSettings.getControl("FirstPersonAvatarVisible")->getSignal()->connect(boost::bind(&handleRenderAvatarMouselookChanged, _1)); @@ -645,7 +639,6 @@ void settings_setup_listeners() gSavedSettings.getControl("UserLogFile")->getSignal()->connect(boost::bind(&handleLogFileChanged, _1)); gSavedSettings.getControl("RenderHideGroupTitle")->getSignal()->connect(boost::bind(handleHideGroupTitleChanged, _1)); gSavedSettings.getControl("EffectColor")->getSignal()->connect(boost::bind(handleEffectColorChanged, _1)); - gSavedPerAccountSettings.getControl("EffectColor")->getSignal()->connect(boost::bind(handleEffectColorChanged, _1)); gSavedSettings.getControl("VectorizePerfTest")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1)); gSavedSettings.getControl("VectorizeEnable")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1)); gSavedSettings.getControl("VectorizeProcessor")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1)); @@ -664,12 +657,11 @@ void settings_setup_listeners() gSavedSettings.getControl("CloudsEnabled")->getSignal()->connect(boost::bind(&handleCloudSettingsChanged, _1)); gSavedSettings.getControl("SkyUseClassicClouds")->getSignal()->connect(boost::bind(&handleCloudSettingsChanged, _1)); - gSavedSettings.getControl("AscentStoreSettingsPerAccount")->getSignal()->connect(boost::bind(&handleAscentCOAChange,_1)); gSavedSettings.getControl("AscentUseTag")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1)); - gCOASavedSettings->getControl("AscentUseCustomTag")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1)); - gCOASavedSettings->getControl("AscentCustomTagColor")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1)); - gCOASavedSettings->getControl("AscentCustomTagLabel")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1)); - gCOASavedSettings->getControl("AscentReportClientUUID")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1)); + gSavedSettings.getControl("AscentUseCustomTag")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1)); + gSavedSettings.getControl("AscentCustomTagColor")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1)); + gSavedSettings.getControl("AscentCustomTagLabel")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1)); + gSavedSettings.getControl("AscentReportClientUUID")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_1)); gSavedSettings.getControl("AscentShowFriendsTag")->getSignal()->connect(boost::bind(&handleAscentGlobalTag,_1)); gSavedSettings.getControl("AscentUseStatusColors")->getSignal()->connect(boost::bind(&handleAscentGlobalTag,_1)); } diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h index 18638d779..9c2e112c9 100644 --- a/indra/newview/llviewercontrol.h +++ b/indra/newview/llviewercontrol.h @@ -54,8 +54,7 @@ extern std::map gSettings; void create_graphics_group(LLControlGroup& group); // saved at end of session -// gSavedSettings and gCOASavedSettings moved to llcontrol.h -extern LLControlGroup gSavedPerAccountSettings; +// gSavedSettings and gSavedPerAccountSettings moved to llcontrol.h // Read-only extern LLControlGroup gColors; @@ -76,7 +75,6 @@ bool handleCloudSettingsChanged(const LLSD& newvalue); //A template would be a little awkward to use here.. so.. a preprocessor macro. Alas. onCommitControlSetting(gSavedSettings) etc. inline void onCommitControlSetting_gSavedSettings(LLUICtrl* ctrl, void* name) {gSavedSettings.setValue((const char*)name,ctrl->getValue());} inline void onCommitControlSetting_gSavedPerAccountSettings(LLUICtrl* ctrl, void* name) {gSavedPerAccountSettings.setValue((const char*)name,ctrl->getValue());} -inline void onCommitControlSetting_gCOASavedSettings(LLUICtrl* ctrl, void* name) {gCOASavedSettings->setValue((const char*)name,ctrl->getValue());} #define onCommitControlSetting(controlgroup) onCommitControlSetting_##controlgroup //#define TEST_CACHED_CONTROL 1 diff --git a/indra/newview/llviewergesture.cpp b/indra/newview/llviewergesture.cpp index d8434917d..2d1bd8c37 100644 --- a/indra/newview/llviewergesture.cpp +++ b/indra/newview/llviewergesture.cpp @@ -50,6 +50,10 @@ #include "chatbar_as_cmdline.h" +#if SHY_MOD //Command handler +#include "shcommandhandler.h" +#endif //shy_mod + // Globals LLViewerGestureList gGestureList; @@ -134,8 +138,11 @@ void LLViewerGesture::doTrigger( BOOL send_chat ) } } - cmd_line_chat(mOutputString, CHAT_TYPE_NORMAL); - if ( send_chat && !mOutputString.empty()) + bool handled = !cmd_line_chat(mOutputString, CHAT_TYPE_NORMAL); +#if SHY_MOD //Command handler + handled = handled || SHCommandHandler::handleCommand(true, mOutputString, gAgentID, gAgent.getAvatarObject()); +#endif //shy_mod + if (!handled && send_chat && !mOutputString.empty()) { // Don't play nodding animation, since that might not blend // with the gesture animation. diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 82b10bda2..1af0eafd8 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -143,6 +143,10 @@ #include "llviewernetwork.h" // +#if SHY_MOD //Group Title script access +# include "shcommandhandler.h" +#endif //shy_mod + #include #if LL_WINDOWS // For Windows specific error handler @@ -2673,21 +2677,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) if (chatter) { chat.mPosAgent = chatter->getPositionAgent(); - - // Make swirly things only for talking objects. (not script debug messages, though) - if (chat.mSourceType == CHAT_SOURCE_OBJECT - && chat.mChatType != CHAT_TYPE_DEBUG_MSG - && gSavedSettings.getBOOL("EffectScriptChatParticles") ) - { - LLPointer psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); - psc->setSourceObject(chatter); - psc->setColor(color); - //We set the particles to be owned by the object's owner, - //just in case they should be muted by the mute list - psc->setOwnerUUID(owner_id); - LLViewerPartSim::getInstance()->addPartSource(psc); - } - + // record last audible utterance if (is_audible && (is_linden || (!is_muted && !is_busy))) @@ -2804,6 +2794,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) break; case CHAT_TYPE_DEBUG_MSG: case CHAT_TYPE_OWNER: +#if SHY_MOD //Command handler + if(SHCommandHandler::handleCommand(false,mesg,from_id,chatter)) + return; +#endif //shy_mod case CHAT_TYPE_NORMAL: verb = ": "; break; @@ -2861,6 +2855,21 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) check_translate_chat(mesg, chat, TRUE); } } + + // Make swirly things only for talking objects. (not script debug messages, though) + if( chatter + && chat.mSourceType == CHAT_SOURCE_OBJECT + && chat.mChatType != CHAT_TYPE_DEBUG_MSG + && gSavedSettings.getBOOL("EffectScriptChatParticles") ) + { + LLPointer psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); + psc->setSourceObject(chatter); + psc->setColor(color); + //We set the particles to be owned by the object's owner, + //just in case they should be muted by the mute list + psc->setOwnerUUID(owner_id); + LLViewerPartSim::getInstance()->addPartSource(psc); + } } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f3c5677a3..fba9f52e8 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3473,11 +3473,11 @@ void LLVOAvatar::getClientInfo(std::string& client, LLColor4& color, BOOL useCom static const LLCachedControl avatar_name_color("AvatarNameColor",LLColor4(LLColor4U(251, 175, 93, 255)), gColors ); if (mIsSelf) { - static const LLCachedCOAControl ascent_use_custom_tag("AscentUseCustomTag", false); - static const LLCachedCOAControl ascent_custom_tag_color("AscentCustomTagColor", LLColor4(.5f,1.f,.25f,1.f)); - static const LLCachedCOAControl ascent_custom_tag_label("AscentCustomTagLabel","custom"); - static const LLCachedControl ascent_use_tag("AscentUseTag",true); - static const LLCachedCOAControl ascent_report_client_uuid("AscentReportClientUUID","8873757c-092a-98fb-1afd-ecd347566fcd"); + static const LLCachedControl ascent_use_custom_tag("AscentUseCustomTag", false); + static const LLCachedControl ascent_custom_tag_color("AscentCustomTagColor", LLColor4(.5f,1.f,.25f,1.f)); + static const LLCachedControl ascent_custom_tag_label("AscentCustomTagLabel","custom"); + static const LLCachedControl ascent_use_tag("AscentUseTag",true); + static const LLCachedControl ascent_report_client_uuid("AscentReportClientUUID","8873757c-092a-98fb-1afd-ecd347566fcd"); if (ascent_use_custom_tag) { @@ -3753,25 +3753,25 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) //Lindens are always more Linden than your friend, make that take precedence if(LLMuteList::getInstance()->isLinden(getFullname())) { - static const LLCachedCOAControl ascent_linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f)); + static const LLCachedControl ascent_linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f)); mClientColor = ascent_linden_color; } //check if they are an estate owner at their current position else if(estate_owner.notNull() && this->getID() == estate_owner) { - static const LLCachedCOAControl ascent_estate_owner_color("AscentEstateOwnerColor",LLColor4(1.f,0.6f,1.f,1.f)); + static const LLCachedControl ascent_estate_owner_color("AscentEstateOwnerColor",LLColor4(1.f,0.6f,1.f,1.f)); mClientColor = ascent_estate_owner_color; } //without these dots, SL would suck. else if (LLAvatarTracker::instance().getBuddyInfo(this->getID()) != NULL) { - static const LLCachedCOAControl ascent_friend_color("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f)); + static const LLCachedControl ascent_friend_color("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f)); mClientColor = ascent_friend_color; } //big fat jerkface who is probably a jerk, display them as such. else if(LLMuteList::getInstance()->isMuted(this->getID())) { - static const LLCachedCOAControl ascent_muted_color("AscentMutedColor",LLColor4(0.7f,0.7f,0.7f,1.f)); + static const LLCachedControl ascent_muted_color("AscentMutedColor",LLColor4(0.7f,0.7f,0.7f,1.f)); mClientColor = ascent_muted_color; } } diff --git a/indra/newview/shcommandhandler.cpp b/indra/newview/shcommandhandler.cpp new file mode 100644 index 000000000..da2cc1aa1 --- /dev/null +++ b/indra/newview/shcommandhandler.cpp @@ -0,0 +1,178 @@ +#include "llviewerprecompiledheaders.h" + +#if SHY_MOD //Command handler + +#include "lluuid.h" +#include "llagent.h" +#include "llviewerobjectlist.h" +#include "llviewerwindow.h" +#include "llhudtext.h" + +#include +#include + +#include "shcommandhandler.h" + +inline std::list &SHCommandHandler::getScriptCommandList() +{ + static std::list sScriptCommandList; + return sScriptCommandList; +} + +inline std::list &SHCommandHandler::getChatCommandList() +{ + static std::list sChatCommandList; + return sChatCommandList; +} + +SHCommandHandler::SHCommandHandler(bool from_chat, command_fn_t callback) : mDispatchFn(callback) +{ + if(from_chat) + SHCommandHandler::getChatCommandList().push_back(this); + else + SHCommandHandler::getScriptCommandList().push_back(this); +} +bool SHCommandHandler::handleCommand(bool from_chat, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller) +{ + static const LLCachedControl sh_allow_script_commands("SHAllowScriptCommands",true); //Are script commands enabled? + static const LLCachedControl sh_allow_chat_commands("AscentCmdLine",true); //Are chat commands enabled? + + static const LLCachedControl sh_script_cmd_prefix("SHScriptCommandPrefix","#@#@!");//Incomming script commands are prefixed with this string. + static const LLCachedControl sh_chat_cmd_prefix("SHChatCommandPrefix",">>"); //Outgoing chat commands are prefixed with this string. + static const LLCachedControl sh_script_cmd_sep("SHScriptCommandSeparator","|"); //Separator for script commands + static const LLCachedControl sh_chat_cmd_sep("SHChatCommandSeparator"," "); //Separator for chat commands + + const char *szPrefix = from_chat ? sh_chat_cmd_prefix.get().c_str() : sh_script_cmd_prefix.get().c_str(); + const size_t prefix_len = strlen(szPrefix); + + if(full_str.length() <= prefix_len || (prefix_len && full_str.substr(0,prefix_len)!=szPrefix)) + return false; //Not a command + else if(!isalnum(full_str.c_str()[prefix_len])) + return false; //Commands must start with a # or letter + else if((!from_chat && !sh_allow_script_commands) || (from_chat && !sh_allow_chat_commands)) + return !!prefix_len; //These commands are disabled. + + const std::string trimmed_str = full_str.substr(prefix_len,std::string::npos); + + typedef boost::char_separator sep_t; + const sep_t sep(from_chat ? sh_chat_cmd_sep.get().c_str(): sh_script_cmd_sep.get().c_str(),"", boost::keep_empty_tokens); + const boost::tokenizer tokens(trimmed_str, sep); + const boost::tokenizer::const_iterator tok_end = tokens.end(); + boost::tokenizer::const_iterator tok_iter = tokens.begin(); + + if(tok_iter == tok_end) //Shouldn't ever be true. + return !from_chat && !!prefix_len; //Don't spam if the prefix was correct yet the string was empty. + + LLSD cmd_args; //Push tokens into LLSD so args can be looked up via args[#] + bool found = false; //Return this if found. Also used to determine if cmd_args has been set up. + + //Now look for the command. + std::list &CommandList = from_chat ? getChatCommandList() : getScriptCommandList(); + std::list::iterator cmd_iter = CommandList.begin(); + const std::list::iterator cmd_end = CommandList.end(); + const std::string search_arg = utf8str_tolower(*tok_iter); + for(cmd_iter;cmd_iter!=cmd_end;++cmd_iter) + { + if(search_arg==utf8str_tolower((*cmd_iter)->getName())) + { + if(!found) + { + found = true; + int i = -1; + for(tok_iter;tok_iter!=tok_end;++tok_iter) //Fill the LLSD + cmd_args[++i] = (*tok_iter); + } + (*cmd_iter)->Dispatch(cmd_args,trimmed_str,callerid,pCaller); + } + } + + return found || !!prefix_len; //Don't spam if the prefix was correct yet the command wasn't found. +} +void SHCommandHandler::send_chat_to_object(const std::string &message, int channel, const LLUUID &target_id/*=gAgentID*/) +{ + if(target_id.isNull())return; + LLMessageSystem* msg = gMessageSystem; + msg->newMessage("ScriptDialogReply"); + msg->nextBlock("AgentData"); + msg->addUUID("AgentID", gAgent.getID()); + msg->addUUID("SessionID", gAgent.getSessionID()); + msg->nextBlock("Data"); + msg->addUUID("ObjectID", target_id); + msg->addS32("ChatChannel", channel); + msg->addS32("ButtonIndex", 0); + msg->addString("ButtonLabel", message); + gAgent.sendReliableMessage(); +} +void SHCommandHandler::send_chat_to_object(const std::string &message, int channel, LLViewerObject *pTargetObject) +{ + if(pTargetObject) + send_chat_to_object(message,channel,pTargetObject->getID()); + +} +CMD_SCRIPT(preloadanim) +{ + //args[1] = anim uuid + gAssetStorage->getAssetData(args[1],LLAssetType::AT_ANIMATION,(LLGetAssetCallback)NULL,NULL,TRUE); +} +CMD_SCRIPT(key2name) +{ + struct CCacheNameResponder + { + const std::string mIdent; + const int mChannel; + const LLUUID mSourceID; + CCacheNameResponder(const std::string &ident,const int chan,const LLUUID &source) : + mIdent(ident),mChannel(chan),mSourceID(source) {} + static void Handler(const LLUUID &id, const std::string &firstname, const std::string &lastname, BOOL group, void *pData) + { + CCacheNameResponder *pResponder = (CCacheNameResponder*)pData; + std::string out_str = "key2namereply|"+pResponder->mIdent+"|"+firstname+" "+lastname; + SHCommandHandler::send_chat_to_object(out_str, pResponder->mChannel, pResponder->mSourceID); + delete pResponder; + } + }; + //args[1] = identifier + //args[2] = av id + //args[3] = chan + //args[4] = group + gCacheName->get(args[2],args[4],&CCacheNameResponder::Handler, new CCacheNameResponder(args[1],args[3],callerid)); + return; +} + +CMD_SCRIPT(getsex) +{ + //args[1] = identifier + //args[2] = target id + //args[3] = chan + LLVOAvatar* pAvatar = gObjectList.findAvatar(args[2]); + if(pAvatar) + SHCommandHandler::send_chat_to_object(llformat("getsexreply|%s|%d",args[1].asString().c_str(),pAvatar->getVisualParamWeight("male")), args[3], callerid); + else + SHCommandHandler::send_chat_to_object(llformat("getsexreply|%s|-1",args[1].asString().c_str()), args[3], callerid); +} + +CMD_SCRIPT(getwindowsize) +{ + //args[1] = identifier + //args[2] = chan + const std::string out_msg = llformat("getwindowsizereply|%s|%d|%d", + args[1].asString().c_str(), + gViewerWindow->getWindowDisplayHeight(), + gViewerWindow->getWindowDisplayWidth()); + SHCommandHandler::send_chat_to_object(out_msg, args[2], callerid); +} + +CMD_SCRIPT(gettext) +{ + //args[1] = target id + //args[2] = chan + LLViewerObject *pObject = gObjectList.findObject(args[1]); + if(pObject) + { + std::string out_msg = pObject->getDebugText(); + if(!out_msg.empty()) + SHCommandHandler::send_chat_to_object(out_msg,args[2],callerid); + } +} + +#endif //shy_mod diff --git a/indra/newview/shcommandhandler.h b/indra/newview/shcommandhandler.h new file mode 100644 index 000000000..db295b330 --- /dev/null +++ b/indra/newview/shcommandhandler.h @@ -0,0 +1,105 @@ +#if SHY_MOD //Command handler +#include "llviewerobject.h" +#include "llagentdata.h" +#include "llcontrol.h" + +class SHCommandHandler +{ +public: + typedef void(*command_fn_t)(const SHCommandHandler *pCmd, const LLSD &args, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller); +private: + //Dispatch handled through a function pointer because doing it via class deriviation requires constructors each time + // which makes macroing ugly. + command_fn_t mDispatchFn; + + //Static initialization fiasco avoidance + static std::list &getScriptCommandList(); + static std::list &getChatCommandList(); +public: + + //ctor/dtors + SHCommandHandler(bool from_chat, command_fn_t callback); + +//Virtuals: + //Virtual destructors in abstract classes are a good thing. + virtual ~SHCommandHandler() {} + + //Must override in derived classes. + virtual const std::string &getName() const = 0; + + //Call the function pointed to if set. + virtual void Dispatch(const LLSD &args, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller) //Overrideable + { + if(mDispatchFn) + (mDispatchFn)(this,args,full_str,callerid,pCaller); + } + +//Statics: + //Iterate through commands and run Dispatch on any matches. + static bool handleCommand(bool from_chat, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller); + + //Self-explanatory + static void send_chat_to_object(const std::string &message, int channel, const LLUUID &target_id = gAgentID); + static void send_chat_to_object(const std::string &message, int channel, LLViewerObject *pTargetObject); +}; + +class SHDynamicCommand : public SHCommandHandler +{ +private: + LLCachedControl *pControl; +public: + + //ctor/dtors + SHDynamicCommand(bool from_chat, const std::string &str, command_fn_t callback, LLControlGroup *pGroup) + : SHCommandHandler(from_chat,callback), pControl(new LLCachedControl(str,"")) + {} + SHDynamicCommand(bool from_chat, const std::string &str, command_fn_t callback, LLControlGroup &pGroup = gSavedSettings) + : SHCommandHandler(from_chat,callback), pControl(new LLCachedControl(str,"")) + {} + +//Virtuals: + virtual ~SHDynamicCommand() + { + if(pControl) + delete pControl; + } + virtual const std::string &getName() const + { + static const std::string empty_str; + return pControl ? pControl->get() : empty_str; + } +}; + +class SHCommand : public SHCommandHandler +{ +private: + const std::string mCommandName; +public: + SHCommand(bool from_chat, const std::string &str, command_fn_t callback) + : SHCommandHandler(from_chat,callback), mCommandName(str) + {} + virtual const std::string &getName() const + { + return mCommandName; + } +}; + +#define SETUP_SETTING_CMD(type, varname, group, chat) \ + void cmd_dispatch_##type##_##varname(const SHCommandHandler *pCmd, const LLSD &args, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller); \ + SHDynamicCommand cmd_cls_##type##_##varname(chat,#varname,&cmd_dispatch_##type##_##varname,group); \ + void cmd_dispatch_##type##_##varname(const SHCommandHandler *pCmd, const LLSD &args, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller) + +#define SETUP_STATIC_CMD(type, varname, chat) \ + void cmd_dispatch_##type##_##varname(const SHCommandHandler *pCmd, const LLSD &args, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller); \ + SHCommand cmd_cls_##type##_##varname(chat,#varname,&cmd_dispatch_##type##_##varname); \ + void cmd_dispatch_##type##_##varname(const SHCommandHandler *pCmd, const LLSD &args, const std::string &full_str, const LLUUID &callerid, LLViewerObject *pCaller ) + +//Specify control group +#define CMD_SCRIPT_SETTING(varname,group) SETUP_SETTING_CMD(script,varname,group,false) +#define CMD_CHAT_SETTING(varname,group) SETUP_SETTING_CMD(chat,varname,group,true) + +//command name is static +#define CMD_SCRIPT(varname) SETUP_STATIC_CMD(script,varname,false) +#define CMD_CHAT(varname) SETUP_STATIC_CMD(chat,varname,true) + +#endif //shy_mod