Merged with RLVa tip
commit
05d22f77ae
|
|
@ -1254,6 +1254,17 @@
|
|||
<key>Value</key>
|
||||
<string>+</string>
|
||||
</map>
|
||||
<key>RLVaCompatibilityModeList</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Contains a list of creators or partial items names that require compatibility mode handling (see wiki for more information and syntax)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string></string>
|
||||
</map>
|
||||
<key>RLVaDebugDeprecateExplicitPoint</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -1287,6 +1298,17 @@
|
|||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RLVaEnableIMQuery</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enables a limited number of configuration queries via IM (e.g. @version)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RLVaEnableLegacyNaming</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -1309,6 +1331,17 @@
|
|||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RLVaEnableTemporaryAttachments</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Allows temporary attachments (regardless of origin) to issue RLV commands</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RLVaExperimentalCommands</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -1388,17 +1421,6 @@
|
|||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>WarnFirstRLVGiveToRLV</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enables FirstRLVGiveToRLV warning dialog</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
|
||||
<key>DebugSearch</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
#include "llavatarpropertiesprocessor.h"
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvhelper.h"
|
||||
#include "rlvlocks.h"
|
||||
|
|
@ -1911,6 +1912,13 @@ bool LLAppearanceMgr::getCanRemoveFromCOF(const LLUUID& outfit_cat_id)
|
|||
{
|
||||
return false;
|
||||
}
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
if ( (RlvActions::isRlvEnabled()) && (RlvFolderLocks::instance().isLockedFolder(outfit_cat_id, RLV_LOCK_REMOVE)) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
LLFindWearablesEx is_worn(/*is_worn=*/ true, /*include_body_parts=*/ false);
|
||||
|
|
@ -1930,6 +1938,13 @@ bool LLAppearanceMgr::getCanAddToCOF(const LLUUID& outfit_cat_id)
|
|||
return false;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
if ( (RlvActions::isRlvEnabled()) && (RlvFolderLocks::instance().isLockedFolder(outfit_cat_id, RLV_LOCK_ADD)) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
|
||||
|
|
@ -1950,6 +1965,14 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
|
|||
return false;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
// Block "Replace Current Outfit" if the user can't wear the new folder
|
||||
if ( (RlvActions::isRlvEnabled()) && (RlvFolderLocks::instance().isLockedFolder(outfit_cat_id, RLV_LOCK_ADD)) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Check whether it's the base outfit.
|
||||
// if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID())
|
||||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.1)
|
||||
|
|
@ -2142,9 +2165,9 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
|
|||
LLInventoryModel::item_array_t body_items;
|
||||
getDescendentsOfAssetType(cof, body_items, LLAssetType::AT_BODYPART);
|
||||
// getDescendentsOfAssetType(category, body_items, LLAssetType::AT_BODYPART);
|
||||
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0)
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
// Filter out any new body parts that can't be worn before adding them
|
||||
if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) )
|
||||
if ( (RlvActions::isRlvEnabled()) && ((gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) || (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ADD))) )
|
||||
body_items_new.erase(std::remove_if(body_items_new.begin(), body_items_new.end(), RlvPredCanNotWearItem(RLV_WEAR_REPLACE)), body_items_new.end());
|
||||
body_items.insert(body_items.end(), body_items_new.begin(), body_items_new.end());
|
||||
// [/RLVa:KB]
|
||||
|
|
@ -2159,8 +2182,8 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
|
|||
LLInventoryModel::item_array_t wear_items;
|
||||
if (append)
|
||||
getDescendentsOfAssetType(cof, wear_items, LLAssetType::AT_CLOTHING);
|
||||
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0)
|
||||
else if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) )
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
else if ( (RlvActions::isRlvEnabled()) && ((gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) || (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_REMOVE))) )
|
||||
{
|
||||
// Make sure that all currently locked clothing layers remain in COF when replacing
|
||||
getDescendentsOfAssetType(cof, wear_items, LLAssetType::AT_CLOTHING);
|
||||
|
|
@ -2168,9 +2191,9 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
|
|||
}
|
||||
// [/RLVa:KB]
|
||||
// getDescendentsOfAssetType(category, wear_items, LLAssetType::AT_CLOTHING);
|
||||
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0)
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
// Filter out any new wearables that can't be worn before adding them
|
||||
if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) )
|
||||
if ( (RlvActions::isRlvEnabled()) && ((gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) || (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ADD))) )
|
||||
wear_items_new.erase(std::remove_if(wear_items_new.begin(), wear_items_new.end(), RlvPredCanNotWearItem(RLV_WEAR)), wear_items_new.end());
|
||||
wear_items.insert(wear_items.end(), wear_items_new.begin(), wear_items_new.end());
|
||||
// [/RLVa:KB]
|
||||
|
|
@ -2185,8 +2208,8 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
|
|||
LLInventoryModel::item_array_t obj_items;
|
||||
if (append)
|
||||
getDescendentsOfAssetType(cof, obj_items, LLAssetType::AT_OBJECT);
|
||||
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0z) | Modified: RLVa-1.2.0b
|
||||
else if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
else if ( (RlvActions::isRlvEnabled()) && ((gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) || (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_REMOVE))) )
|
||||
{
|
||||
// Make sure that all currently locked attachments remain in COF when replacing
|
||||
getDescendentsOfAssetType(cof, obj_items, LLAssetType::AT_OBJECT);
|
||||
|
|
@ -2194,9 +2217,9 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
|
|||
}
|
||||
// [/RLVa:KB]
|
||||
// getDescendentsOfAssetType(category, obj_items, LLAssetType::AT_OBJECT);
|
||||
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0)
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
// Filter out any new attachments that can't be worn before adding them
|
||||
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
|
||||
if ( (RlvActions::isRlvEnabled()) && ((gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) || (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ADD))) )
|
||||
obj_items_new.erase(std::remove_if(obj_items_new.begin(), obj_items_new.end(), RlvPredCanNotWearItem(RLV_WEAR)), obj_items_new.end());
|
||||
obj_items.insert(obj_items.end(), obj_items_new.begin(), obj_items_new.end());
|
||||
// [/RLVa:KB]
|
||||
|
|
|
|||
|
|
@ -326,8 +326,8 @@ bool LLGroupActions::onJoinGroup(const LLSD& notification, const LLSD& response)
|
|||
void LLGroupActions::leave(const LLUUID& group_id)
|
||||
{
|
||||
// if (group_id.isNull())
|
||||
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
|
||||
if ( (group_id.isNull()) || ((gAgent.getGroupID() == group_id) && (gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP))) )
|
||||
// [RLVa:KB] - Checked: RLVa-1.3.0
|
||||
if ( (group_id.isNull()) || ((gAgent.getGroupID() == group_id) && (!RlvActions::canChangeActiveGroup())) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
return;
|
||||
|
|
@ -388,8 +388,8 @@ void LLGroupActions::processLeaveGroupDataResponse(const LLUUID group_id)
|
|||
// static
|
||||
void LLGroupActions::activate(const LLUUID& group_id)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
|
||||
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP)) && (gRlvHandler.getAgentGroup() != group_id) )
|
||||
// [RLVa:KB] - Checked: RLVa-1.3.0
|
||||
if ( (!RlvActions::canChangeActiveGroup()) && (gRlvHandler.getAgentGroup() != group_id) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@
|
|||
#include "llviewercontrol.h" // for gSavedSettings
|
||||
#include "llviewermenu.h" // for gMenuHolder
|
||||
#include "llvoiceclient.h"
|
||||
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
|
||||
#include "rlvhandler.h"
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
#include "rlvactions.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
static LLDefaultChildRegistry::Register<LLGroupList> r("group_list");
|
||||
|
|
@ -360,14 +360,14 @@ bool LLGroupList::onContextMenuItemEnable(const LLSD& userdata)
|
|||
bool real_group_selected = selected_group_id.notNull(); // a "real" (not "none") group is selected
|
||||
|
||||
// each group including "none" can be activated
|
||||
// [RLVa:KB] - Checked: RLVa-1.3.0
|
||||
if (userdata.asString() == "activate")
|
||||
return (gAgent.getGroupID() != selected_group_id) && (RlvActions::canChangeActiveGroup());
|
||||
else if (userdata.asString() == "leave")
|
||||
return (real_group_selected) && ((gAgent.getGroupID() != selected_group_id) || (RlvActions::canChangeActiveGroup()));
|
||||
// [/RLVa:KB]
|
||||
// if (userdata.asString() == "activate")
|
||||
// return gAgent.getGroupID() != selected_group_id;
|
||||
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
|
||||
if (userdata.asString() == "activate")
|
||||
return (gAgent.getGroupID() != selected_group_id) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP));
|
||||
else if (userdata.asString() == "leave")
|
||||
return (real_group_selected) && ((gAgent.getGroupID() != selected_group_id) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP)));
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (userdata.asString() == "call")
|
||||
return real_group_selected && LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
|
||||
|
|
|
|||
|
|
@ -4323,6 +4323,13 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t&
|
|||
{
|
||||
disabled_items.push_back(std::string("Replace Outfit"));
|
||||
}
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
// Block "Replace Current Outfit" if the user can't wear the new folder
|
||||
if ( (RlvActions::isRlvEnabled()) && (RlvFolderLocks::instance().isLockedFolder(mUUID, RLV_LOCK_ADD)) )
|
||||
{
|
||||
disabled_items.push_back(std::string("Replace Outfit"));
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
if (!LLAppearanceMgr::instance().getCanAddToCOF(mUUID))
|
||||
{
|
||||
disabled_items.push_back(std::string("Add To Outfit"));
|
||||
|
|
@ -6546,6 +6553,11 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
|
|||
{
|
||||
attachment = RlvAttachPtLookup::getAttachPoint(item);
|
||||
}
|
||||
|
||||
if ( (RlvActions::isRlvEnabled()) && (!rlvPredCanWearItem(item, RLV_WEAR_REPLACE)) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
const LLUUID& item_id = item->getLinkedUUID();
|
||||
|
|
|
|||
|
|
@ -2925,11 +2925,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
// do nothing -- don't distract newbies in
|
||||
// Prelude with global IMs
|
||||
}
|
||||
// [RLVa:KB] - Checked: 2011-05-28 (RLVa-1.4.0)
|
||||
else if ( (rlv_handler_t::isEnabled()) && (offline == IM_ONLINE) && ("@version" == message) &&
|
||||
(!is_muted) && ((!accept_im_from_only_friend) || (is_friend)) )
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
else if ( (RlvActions::isRlvEnabled()) && (RlvSettings::getEnableIMQuery()) && (offline == IM_ONLINE) && ("@version" == message) && (!is_muted) && ((!accept_im_from_only_friend) || (is_friend)) )
|
||||
{
|
||||
RlvUtil::sendBusyMessage(from_id, RlvStrings::getVersion(), session_id);
|
||||
RlvUtil::sendBusyMessage(from_id, RlvStrings::getVersion(LLUUID::null), session_id);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// else if (offline == IM_ONLINE
|
||||
|
|
@ -4733,7 +4732,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
|||
|
||||
// [RLVa:KB] - Checked: 2010-02-XX (RLVa-1.2.0a) | Modified: RLVa-1.1.0f
|
||||
// TODO-RLVa: [RLVa-1.2.0] consider rewriting this before a RLVa-1.2.0 release
|
||||
if ( (rlv_handler_t::isEnabled()) && (mesg.length() > 3) && (RLV_CMD_PREFIX == mesg[0]) && (CHAT_TYPE_OWNER == chat.mChatType) )
|
||||
if ( (rlv_handler_t::isEnabled()) && (mesg.length() > 3) && (RLV_CMD_PREFIX == mesg[0]) && (CHAT_TYPE_OWNER == chat.mChatType) &&
|
||||
((!chatter) || (!chatter->isAttachment()) || (!chatter->isTempAttachment()) || (RlvSettings::getEnableTemporaryAttachments())) )
|
||||
{
|
||||
mesg.erase(0, 1);
|
||||
LLStringUtil::toLower(mesg);
|
||||
|
|
|
|||
|
|
@ -121,6 +121,13 @@ bool RlvActions::getCameraFOVLimits(F32& nFOVMin, F32& nFOVMax)
|
|||
|
||||
bool RlvActions::s_BlockNamesContexts[SNC_COUNT] = { 0 };
|
||||
|
||||
bool RlvActions::canChangeActiveGroup(const LLUUID& idRlvObject)
|
||||
{
|
||||
// User can change their active group if:
|
||||
// - not specifically restricted (by another object that the one specified) from changing their active group
|
||||
return (idRlvObject.isNull()) ? !gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP) : !gRlvHandler.hasBehaviourExcept(RLV_BHVR_SETGROUP, idRlvObject);
|
||||
}
|
||||
|
||||
// Little helper function to check the IM exclusion range for @recvim, @sendim and @startim (returns: min_dist <= (pos user - pos target) <= max_dist)
|
||||
static bool rlvCheckAvatarIMDistance(const LLUUID& idAvatar, ERlvBehaviourModifier eModDistMin, ERlvBehaviourModifier eModDistMax)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -74,6 +74,11 @@ public:
|
|||
// Communication/Avatar interaction
|
||||
// ================================
|
||||
public:
|
||||
/*
|
||||
* Returns true if the user is allowed to change their currently active group
|
||||
*/
|
||||
static bool canChangeActiveGroup(const LLUUID& idRlvObject = LLUUID::null);
|
||||
|
||||
/*
|
||||
* Returns true if the user is allowed to receive IMs from the specified sender (can be an avatar or a group)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -23,8 +23,10 @@
|
|||
#include "llregionhandle.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "lltrans.h"
|
||||
#include "llversioninfo.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llworld.h"
|
||||
|
||||
|
|
@ -38,6 +40,8 @@
|
|||
#include <boost/algorithm/string/predicate.hpp> // icontains
|
||||
#include <boost/algorithm/string/regex.hpp> // regex_replace_all
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// Forward declarations
|
||||
|
|
@ -76,11 +80,14 @@ void RlvNotifications::onGiveToRLVConfirmation(const LLSD& notification, const L
|
|||
//
|
||||
|
||||
#ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS
|
||||
bool RlvSettings::fCompositeFolders = false;
|
||||
bool RlvSettings::s_fCompositeFolders = false;
|
||||
#endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS
|
||||
bool RlvSettings::fCanOOC = true;
|
||||
bool RlvSettings::fLegacyNaming = true;
|
||||
bool RlvSettings::fNoSetEnv = false;
|
||||
bool RlvSettings::s_fCanOOC = true;
|
||||
bool RlvSettings::s_fLegacyNaming = true;
|
||||
bool RlvSettings::s_fNoSetEnv = false;
|
||||
bool RlvSettings::s_fTempAttach = true;
|
||||
std::list<LLUUID> RlvSettings::s_CompatItemCreators;
|
||||
std::list<std::string> RlvSettings::s_CompatItemNames;
|
||||
|
||||
// Checked: 2010-02-27 (RLVa-1.2.0a) | Modified: RLVa-1.1.0i
|
||||
void RlvSettings::initClass()
|
||||
|
|
@ -88,18 +95,24 @@ void RlvSettings::initClass()
|
|||
static bool fInitialized = false;
|
||||
if (!fInitialized)
|
||||
{
|
||||
initCompatibilityMode(LLStringUtil::null);
|
||||
|
||||
s_fTempAttach = rlvGetSetting<bool>(RLV_SETTING_ENABLETEMPATTACH, true);
|
||||
if (gSavedSettings.controlExists(RLV_SETTING_ENABLETEMPATTACH))
|
||||
gSavedSettings.getControl(RLV_SETTING_ENABLETEMPATTACH)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &s_fTempAttach));
|
||||
|
||||
#ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS
|
||||
fCompositeFolders = rlvGetSetting<bool>(RLV_SETTING_ENABLECOMPOSITES, false);
|
||||
s_fCompositeFolders = rlvGetSetting<bool>(RLV_SETTING_ENABLECOMPOSITES, false);
|
||||
if (gSavedSettings.controlExists(RLV_SETTING_ENABLECOMPOSITES))
|
||||
gSavedSettings.getControl(RLV_SETTING_ENABLECOMPOSITES)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &fCompositeFolders));
|
||||
gSavedSettings.getControl(RLV_SETTING_ENABLECOMPOSITES)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &s_fCompositeFolders));
|
||||
#endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS
|
||||
|
||||
fLegacyNaming = rlvGetSetting<bool>(RLV_SETTING_ENABLELEGACYNAMING, true);
|
||||
s_fLegacyNaming = rlvGetSetting<bool>(RLV_SETTING_ENABLELEGACYNAMING, true);
|
||||
if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING))
|
||||
gSavedSettings.getControl(RLV_SETTING_ENABLELEGACYNAMING)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &fLegacyNaming));
|
||||
gSavedSettings.getControl(RLV_SETTING_ENABLELEGACYNAMING)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &s_fLegacyNaming));
|
||||
|
||||
fCanOOC = rlvGetSetting<bool>(RLV_SETTING_CANOOC, true);
|
||||
fNoSetEnv = rlvGetSetting<bool>(RLV_SETTING_NOSETENV, false);
|
||||
s_fCanOOC = rlvGetSetting<bool>(RLV_SETTING_CANOOC, true);
|
||||
s_fNoSetEnv = rlvGetSetting<bool>(RLV_SETTING_NOSETENV, false);
|
||||
|
||||
// Don't allow toggling RLVaLoginLastLocation from the debug settings floater
|
||||
if (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION))
|
||||
|
|
@ -154,6 +167,65 @@ void RlvSettings::onChangedSettingMain(const LLSD& sdValue)
|
|||
}
|
||||
}
|
||||
|
||||
void RlvSettings::initCompatibilityMode(std::string strCompatList)
|
||||
{
|
||||
// NOTE: this function can be called more than once
|
||||
s_CompatItemCreators.clear();
|
||||
s_CompatItemNames.clear();
|
||||
|
||||
strCompatList.append(";").append(rlvGetSetting<std::string>("RLVaCompatibilityModeList", ""));
|
||||
|
||||
boost_tokenizer tokCompatList(strCompatList, boost::char_separator<char>(";", "", boost::drop_empty_tokens));
|
||||
for (const std::string& strCompatEntry : tokCompatList)
|
||||
{
|
||||
if (boost::starts_with(strCompatEntry, "creator:"))
|
||||
{
|
||||
LLUUID idCreator;
|
||||
if ( (44 == strCompatEntry.size()) && (LLUUID::parseUUID(strCompatEntry.substr(8), &idCreator)) &&
|
||||
(s_CompatItemCreators.end() == std::find(s_CompatItemCreators.begin(), s_CompatItemCreators.end(), idCreator)) )
|
||||
{
|
||||
s_CompatItemCreators.push_back(idCreator);
|
||||
}
|
||||
}
|
||||
else if (boost::starts_with(strCompatEntry, "name:"))
|
||||
{
|
||||
if (strCompatEntry.size() > 5)
|
||||
s_CompatItemNames.push_back(strCompatEntry.substr(5));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool RlvSettings::isCompatibilityModeObject(const LLUUID& idRlvObject)
|
||||
{
|
||||
bool fCompatMode = false;
|
||||
if (idRlvObject.notNull())
|
||||
{
|
||||
const LLViewerObject* pObj = gObjectList.findObject(idRlvObject);
|
||||
if ( (pObj) && (pObj->isAttachment()) )
|
||||
{
|
||||
const LLViewerInventoryItem* pItem = gInventory.getItem(pObj->getAttachmentItemID());
|
||||
if (pItem)
|
||||
{
|
||||
fCompatMode = s_CompatItemCreators.end() != std::find(s_CompatItemCreators.begin(), s_CompatItemCreators.end(), pItem->getCreatorUUID());
|
||||
if (!fCompatMode)
|
||||
{
|
||||
const std::string& strAttachName = pItem->getName();
|
||||
for (const std::string& strCompatName : s_CompatItemNames)
|
||||
{
|
||||
boost::regex regexp(strCompatName, boost::regex::perl | boost::regex::icase);
|
||||
if (boost::regex_match(strAttachName, regexp))
|
||||
{
|
||||
fCompatMode = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return fCompatMode;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// RlvStrings
|
||||
//
|
||||
|
|
@ -316,27 +388,26 @@ const char* RlvStrings::getStringFromReturnCode(ERlvCmdRet eRet)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// Checked: 2012-02-25 (RLVa-1.4.5) | Modified: RLVa-1.4.5
|
||||
std::string RlvStrings::getVersion(bool fLegacy)
|
||||
std::string RlvStrings::getVersion(const LLUUID& idRlvObject, bool fLegacy)
|
||||
{
|
||||
bool fCompatMode = RlvSettings::isCompatibilityModeObject(idRlvObject);
|
||||
return llformat("%s viewer v%d.%d.%d (RLVa %d.%d.%d)",
|
||||
( (!fLegacy) ? "RestrainedLove" : "RestrainedLife" ),
|
||||
RLV_VERSION_MAJOR, RLV_VERSION_MINOR, RLV_VERSION_PATCH,
|
||||
(!fCompatMode) ? RLV_VERSION_MAJOR : RLV_VERSION_MAJOR_COMPAT, (!fCompatMode) ? RLV_VERSION_MINOR : RLV_VERSION_MINOR_COMPAT, (!fCompatMode) ? RLV_VERSION_PATCH : RLV_VERSION_PATCH_COMPAT,
|
||||
RLVa_VERSION_MAJOR, RLVa_VERSION_MINOR, RLVa_VERSION_PATCH);
|
||||
}
|
||||
|
||||
// Checked: 2010-04-18 (RLVa-1.4.0a) | Added: RLVa-1.2.0e
|
||||
std::string RlvStrings::getVersionAbout()
|
||||
{
|
||||
return llformat("RLV v%d.%d.%d / RLVa v%d.%d.%d%c" ,
|
||||
RLV_VERSION_MAJOR, RLV_VERSION_MINOR, RLV_VERSION_PATCH,
|
||||
RLVa_VERSION_MAJOR, RLVa_VERSION_MINOR, RLVa_VERSION_PATCH, 'a' + RLVa_VERSION_BUILD);
|
||||
return llformat("RLV v%d.%d.%d / RLVa v%d.%d.%d.%d", RLV_VERSION_MAJOR, RLV_VERSION_MINOR, RLV_VERSION_PATCH, RLVa_VERSION_MAJOR, RLVa_VERSION_MINOR, RLVa_VERSION_PATCH, LLVersionInfo::getBuild());
|
||||
}
|
||||
|
||||
// Checked: 2010-03-27 (RLVa-1.4.0a) | Modified: RLVa-1.1.0a
|
||||
std::string RlvStrings::getVersionNum()
|
||||
std::string RlvStrings::getVersionNum(const LLUUID& idRlvObject)
|
||||
{
|
||||
return llformat("%d%02d%02d%02d", RLV_VERSION_MAJOR, RLV_VERSION_MINOR, RLV_VERSION_PATCH, RLV_VERSION_BUILD);
|
||||
bool fCompatMode = RlvSettings::isCompatibilityModeObject(idRlvObject);
|
||||
return llformat("%d%02d%02d%02d",
|
||||
(!fCompatMode) ? RLV_VERSION_MAJOR : RLV_VERSION_MAJOR_COMPAT, (!fCompatMode) ? RLV_VERSION_MINOR : RLV_VERSION_MINOR_COMPAT,
|
||||
(!fCompatMode) ? RLV_VERSION_PATCH : RLV_VERSION_PATCH_COMPAT, (!fCompatMode) ? RLV_VERSION_BUILD : RLV_VERSION_BUILD_COMPAT);
|
||||
}
|
||||
|
||||
// Checked: 2011-11-08 (RLVa-1.5.0)
|
||||
|
|
|
|||
|
|
@ -81,20 +81,22 @@ class RlvSettings
|
|||
{
|
||||
public:
|
||||
static bool getDebug() { return rlvGetSetting<bool>(RLV_SETTING_DEBUG, false); }
|
||||
static bool getCanOOC() { return fCanOOC; }
|
||||
static bool getCanOOC() { return s_fCanOOC; }
|
||||
static bool getForbidGiveToRLV() { return rlvGetSetting<bool>(RLV_SETTING_FORBIDGIVETORLV, true); }
|
||||
static bool getNoSetEnv() { return fNoSetEnv; }
|
||||
static bool getNoSetEnv() { return s_fNoSetEnv; }
|
||||
|
||||
static std::string getWearAddPrefix() { return rlvGetSetting<std::string>(RLV_SETTING_WEARADDPREFIX, LLStringUtil::null); }
|
||||
static std::string getWearReplacePrefix() { return rlvGetSetting<std::string>(RLV_SETTING_WEARREPLACEPREFIX, LLStringUtil::null); }
|
||||
|
||||
static bool getDebugHideUnsetDup() { return rlvGetSetting<bool>(RLV_SETTING_DEBUGHIDEUNSETDUP, false); }
|
||||
#ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS
|
||||
static BOOL getEnableComposites() { return fCompositeFolders; }
|
||||
static BOOL getEnableComposites() { return s_fCompositeFolders; }
|
||||
#endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS
|
||||
static bool getEnableLegacyNaming() { return fLegacyNaming; }
|
||||
static bool getEnableIMQuery() { return rlvGetSetting<bool>("RLVaEnableIMQuery", true); }
|
||||
static bool getEnableLegacyNaming() { return s_fLegacyNaming; }
|
||||
static bool getEnableSharedWear() { return rlvGetSetting<bool>(RLV_SETTING_ENABLESHAREDWEAR, false); }
|
||||
static bool getHideLockedLayers() { return rlvGetSetting<bool>(RLV_SETTING_HIDELOCKEDLAYER, false); }
|
||||
static bool getEnableTemporaryAttachments() { return s_fTempAttach; }
|
||||
static bool getHideLockedLayers() { return rlvGetSetting<bool>(RLV_SETTING_HIDELOCKEDLAYER, false); }
|
||||
static bool getHideLockedAttach() { return rlvGetSetting<bool>(RLV_SETTING_HIDELOCKEDATTACH, false); }
|
||||
static bool getHideLockedInventory() { return rlvGetSetting<bool>(RLV_SETTING_HIDELOCKEDINVENTORY, false); }
|
||||
static bool getSharedInvAutoRename() { return rlvGetSetting<bool>(RLV_SETTING_SHAREDINVAUTORENAME, true); }
|
||||
|
|
@ -102,6 +104,9 @@ public:
|
|||
static bool getLoginLastLocation() { return rlvGetPerUserSetting<bool>(RLV_SETTING_LOGINLASTLOCATION, true); }
|
||||
static void updateLoginLastLocation();
|
||||
|
||||
static void initCompatibilityMode(std::string strCompatList);
|
||||
static bool isCompatibilityModeObject(const LLUUID& idRlvObject);
|
||||
|
||||
static void initClass();
|
||||
static void onChangedSettingMain(const LLSD& sdValue);
|
||||
protected:
|
||||
|
|
@ -109,11 +114,19 @@ protected:
|
|||
static bool onChangedSettingBOOL(const LLSD& sdValue, bool* pfSetting);
|
||||
|
||||
#ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS
|
||||
static BOOL fCompositeFolders;
|
||||
static BOOL s_fCompositeFolders;
|
||||
#endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS
|
||||
static bool fCanOOC;
|
||||
static bool fLegacyNaming;
|
||||
static bool fNoSetEnv;
|
||||
|
||||
/*
|
||||
* Member variables
|
||||
*/
|
||||
protected:
|
||||
static bool s_fCanOOC;
|
||||
static bool s_fLegacyNaming;
|
||||
static bool s_fNoSetEnv;
|
||||
static bool s_fTempAttach;
|
||||
static std::list<LLUUID> s_CompatItemCreators;
|
||||
static std::list<std::string> s_CompatItemNames;
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
|
|
@ -132,9 +145,9 @@ public:
|
|||
static const std::string& getString(const std::string& strStringName);
|
||||
static const char* getStringFromReturnCode(ERlvCmdRet eRet);
|
||||
static const std::string& getStringMapPath() { return m_StringMapPath; }
|
||||
static std::string getVersion(bool fLegacy = false); // @version
|
||||
static std::string getVersionAbout(); // Shown in Help / About
|
||||
static std::string getVersionNum(); // @versionnum
|
||||
static std::string getVersion(const LLUUID& idRlvObject, bool fLegacy = false);
|
||||
static std::string getVersionAbout();
|
||||
static std::string getVersionNum(const LLUUID& idRlvObject);
|
||||
static bool hasString(const std::string& strStringName, bool fCheckCustom = false);
|
||||
static void setCustomString(const std::string& strStringName, const std::string& strStringValue);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
/**
|
||||
/**
|
||||
*
|
||||
* Copyright (c) 2009-2016, Kitty Barnett
|
||||
*
|
||||
* The source code in this file is provided to you under the terms of the
|
||||
*
|
||||
* The source code in this file is provided to you under the terms of the
|
||||
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||
*
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge that
|
||||
* you have read and understood your obligations described above, and agree to
|
||||
* you have read and understood your obligations described above, and agree to
|
||||
* abide by those obligations.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef RLV_DEFINES_H
|
||||
|
|
@ -21,17 +21,22 @@
|
|||
// Defines
|
||||
//
|
||||
|
||||
// Version of the specifcation we support
|
||||
// Version of the specifcation we report
|
||||
const S32 RLV_VERSION_MAJOR = 3;
|
||||
const S32 RLV_VERSION_MINOR = 1;
|
||||
const S32 RLV_VERSION_PATCH = 4;
|
||||
const S32 RLV_VERSION_BUILD = 0;
|
||||
|
||||
// Version of the specifcation we report (in compatibility mode)
|
||||
const S32 RLV_VERSION_MAJOR_COMPAT = 2;
|
||||
const S32 RLV_VERSION_MINOR_COMPAT = 8;
|
||||
const S32 RLV_VERSION_PATCH_COMPAT = 0;
|
||||
const S32 RLV_VERSION_BUILD_COMPAT = 0;
|
||||
|
||||
// Implementation version
|
||||
const S32 RLVa_VERSION_MAJOR = 2;
|
||||
const S32 RLVa_VERSION_MINOR = 0;
|
||||
const S32 RLVa_VERSION_PATCH = 0;
|
||||
const S32 RLVa_VERSION_BUILD = 0;
|
||||
const S32 RLVa_VERSION_PATCH = 3;
|
||||
|
||||
// Uncomment before a final release
|
||||
#define RLV_RELEASE
|
||||
|
|
@ -343,6 +348,7 @@ enum ERlvAttachGroupType
|
|||
#define RLV_SETTING_ENABLECOMPOSITES "RLVaEnableCompositeFolders"
|
||||
#define RLV_SETTING_ENABLELEGACYNAMING "RLVaEnableLegacyNaming"
|
||||
#define RLV_SETTING_ENABLESHAREDWEAR "RLVaEnableSharedWear"
|
||||
#define RLV_SETTING_ENABLETEMPATTACH "RLVaEnableTemporaryAttachments"
|
||||
#define RLV_SETTING_HIDELOCKEDLAYER "RLVaHideLockedLayers"
|
||||
#define RLV_SETTING_HIDELOCKEDATTACH "RLVaHideLockedAttachments"
|
||||
#define RLV_SETTING_HIDELOCKEDINVENTORY "RLVaHideLockedInventory"
|
||||
|
|
@ -365,6 +371,7 @@ enum ERlvAttachGroupType
|
|||
|
||||
#define RLV_STRING_BLOCKED_AUTOPILOT "blocked_autopilot"
|
||||
#define RLV_STRING_BLOCKED_GENERIC "blocked_generic"
|
||||
#define RLV_STRING_BLOCKED_GROUPCHANGE "blocked_groupchange"
|
||||
#define RLV_STRING_BLOCKED_PERMATTACH "blocked_permattach"
|
||||
#define RLV_STRING_BLOCKED_PERMTELEPORT "blocked_permteleport"
|
||||
#define RLV_STRING_BLOCKED_RECVIM "blocked_recvim"
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ void RlvFloaterBehaviours::onBtnCopyToClipboard()
|
|||
{
|
||||
std::ostringstream strRestrictions;
|
||||
|
||||
strRestrictions << RlvStrings::getVersion() << "\n";
|
||||
strRestrictions << RlvStrings::getVersion(LLUUID::null) << "\n";
|
||||
|
||||
const RlvHandler::rlv_object_map_t* pObjects = gRlvHandler.getObjectMap();
|
||||
for (RlvHandler::rlv_object_map_t::const_iterator itObj = pObjects->begin(), endObj = pObjects->end(); itObj != endObj; ++itObj)
|
||||
|
|
|
|||
|
|
@ -478,21 +478,43 @@ ERlvCmdRet RlvHandler::processClearCommand(const RlvCommand& rlvCmd)
|
|||
// Externally invoked event handlers
|
||||
//
|
||||
|
||||
// Checked: 2011-05-22 (RLVa-1.4.1a) | Added: RLVa-1.3.1b
|
||||
bool RlvHandler::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& sdUserdata)
|
||||
{
|
||||
// If the user managed to change their active group (= newly joined or created group) we need to reactivate the previous one
|
||||
if ( (hasBehaviour(RLV_BHVR_SETGROUP)) && ("new group" == event->desc()) && (m_idAgentGroup != gAgent.getGroupID()) )
|
||||
// NOTE: we'll fire once for every group the user belongs to so we need to manually keep track of pending changes
|
||||
static LLUUID s_idLastAgentGroup = LLUUID::null;
|
||||
static bool s_fGroupChanging = false;
|
||||
|
||||
if (s_idLastAgentGroup != gAgent.getGroupID())
|
||||
{
|
||||
// [Copy/paste from LLGroupActions::activate()]
|
||||
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, m_idAgentGroup);
|
||||
gAgent.sendReliableMessage();
|
||||
return true;
|
||||
s_idLastAgentGroup = gAgent.getGroupID();
|
||||
s_fGroupChanging = false;
|
||||
}
|
||||
|
||||
// If the user managed to change their active group (= newly joined or created group) we need to reactivate the previous one
|
||||
if ( (!RlvActions::canChangeActiveGroup()) && ("new group" == event->desc()) && (m_idAgentGroup != gAgent.getGroupID()) )
|
||||
{
|
||||
// Make sure they still belong to the group
|
||||
if ( (m_idAgentGroup.notNull()) && (!gAgent.isInGroup(m_idAgentGroup)) )
|
||||
{
|
||||
m_idAgentGroup.setNull();
|
||||
s_fGroupChanging = false;
|
||||
}
|
||||
|
||||
if (!s_fGroupChanging)
|
||||
{
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_GROUPCHANGE, LLSD().with("GROUP_SLURL", (m_idAgentGroup.notNull()) ? llformat("secondlife:///app/group/%s/about", m_idAgentGroup.asString()) : "(none)"));
|
||||
|
||||
// [Copy/paste from LLGroupActions::activate()]
|
||||
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, m_idAgentGroup);
|
||||
gAgent.sendReliableMessage();
|
||||
s_fGroupChanging = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1076,7 +1098,7 @@ BOOL RlvHandler::setEnabled(BOOL fEnable)
|
|||
|
||||
if (fEnable)
|
||||
{
|
||||
RLV_INFOS << "Enabling Restrained Love API support - " << RlvStrings::getVersion() << RLV_ENDL;
|
||||
RLV_INFOS << "Enabling Restrained Love API support - " << RlvStrings::getVersionAbout() << RLV_ENDL;
|
||||
m_fEnabled = TRUE;
|
||||
|
||||
// Initialize static classes
|
||||
|
|
@ -1755,6 +1777,38 @@ void RlvBehaviourModifierHandler<RLV_MODIFIER_SETCAM_FOCUSOFFSET>::onValueChange
|
|||
}
|
||||
}
|
||||
|
||||
// Handles: @setcam_fovmin:<angle>=n|y and @setcam_fovmax:<angle>=n|y
|
||||
template<> template<>
|
||||
ERlvCmdRet RlvBehaviourSetCamFovHandler::onCommand(const RlvCommand& rlvCmd, bool& fRefCount)
|
||||
{
|
||||
static float s_nLastCameraAngle = DEFAULT_FIELD_OF_VIEW;
|
||||
|
||||
S32 nRefMinBhvr = gRlvHandler.m_Behaviours[RLV_BHVR_SETCAM_FOVMIN], nRefMaxBhvr = gRlvHandler.m_Behaviours[RLV_BHVR_SETCAM_FOVMAX];
|
||||
LLControlVariable* pSetting = gSavedSettings.getControl("CameraAngle");
|
||||
|
||||
// Save the user's current FOV angle if nothing's been restricted (yet)
|
||||
if ( (!nRefMinBhvr) && (!nRefMaxBhvr) && (pSetting) )
|
||||
s_nLastCameraAngle = (pSetting->isPersisted()) ? LLViewerCamera::instance().getDefaultFOV() : DEFAULT_FIELD_OF_VIEW;
|
||||
|
||||
// Perform default handling of the command
|
||||
ERlvCmdRet eRet = RlvBehaviourGenericHandler<RLV_OPTION_MODIFIER>::onCommand(rlvCmd, fRefCount);
|
||||
if ( (RLV_RET_SUCCESS == eRet) && (fRefCount) && (pSetting) )
|
||||
{
|
||||
if (RLV_TYPE_ADD == rlvCmd.getParamType())
|
||||
{
|
||||
// Don't persist changes from this point
|
||||
pSetting->setPersist(LLControlVariable::PERSIST_NO);
|
||||
}
|
||||
else if ( (RLV_TYPE_REMOVE == rlvCmd.getParamType()) && (1 == nRefMinBhvr + nRefMaxBhvr) )
|
||||
{
|
||||
// Restore the user's last FOV angle (and resume persistance)
|
||||
LLViewerCamera::instance().setDefaultFOV(s_nLastCameraAngle);
|
||||
pSetting->setPersist(LLControlVariable::PERSIST_NONDFT);
|
||||
}
|
||||
}
|
||||
return eRet;
|
||||
}
|
||||
|
||||
// Handles: @setcam_fovmin:<angle>=n|y changes
|
||||
template<>
|
||||
void RlvBehaviourModifierHandler<RLV_MODIFIER_SETCAM_FOVMIN>::onValueChange() const
|
||||
|
|
@ -2358,6 +2412,14 @@ ERlvCmdRet RlvForceHandler<RLV_BHVR_SETCAM_FOV>::onCommand(const RlvCommand& rlv
|
|||
return RLV_RET_FAILED_OPTION;
|
||||
|
||||
LLViewerCamera::getInstance()->setDefaultFOV(nFOV);
|
||||
|
||||
// Don't persist non-default changes that are due to RLV; but do resume persistance once reset back to the default
|
||||
if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_FOVMIN)) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_FOVMAX)) )
|
||||
{
|
||||
if (LLControlVariable* pSetting = gSavedSettings.getControl("CameraAngle"))
|
||||
pSetting->setPersist( (pSetting->isDefault()) ? LLControlVariable::PERSIST_NONDFT : LLControlVariable::PERSIST_NO );
|
||||
}
|
||||
|
||||
return RLV_RET_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
@ -2410,7 +2472,7 @@ void RlvHandler::onForceWearCallback(const uuid_vec_t& idItems, U32 nFlags) cons
|
|||
template<> template<>
|
||||
ERlvCmdRet RlvForceHandler<RLV_BHVR_SETGROUP>::onCommand(const RlvCommand& rlvCmd)
|
||||
{
|
||||
if (gRlvHandler.hasBehaviourExcept(RLV_BHVR_SETGROUP, rlvCmd.getObjectID()))
|
||||
if (!RlvActions::canChangeActiveGroup(rlvCmd.getObjectID()))
|
||||
{
|
||||
return RLV_RET_FAILED_LOCK;
|
||||
}
|
||||
|
|
@ -2566,11 +2628,11 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
|
|||
case RLV_BHVR_VERSION: // @version=<channel> - Checked: 2010-03-27 (RLVa-1.4.0a)
|
||||
case RLV_BHVR_VERSIONNEW: // @versionnew=<channel> - Checked: 2010-03-27 (RLVa-1.4.0a) | Added: RLVa-1.2.0b
|
||||
// NOTE: RLV will respond even if there's an option
|
||||
strReply = RlvStrings::getVersion(RLV_BHVR_VERSION == rlvCmd.getBehaviourType());
|
||||
strReply = RlvStrings::getVersion(rlvCmd.getObjectID(), RLV_BHVR_VERSION == rlvCmd.getBehaviourType());
|
||||
break;
|
||||
case RLV_BHVR_VERSIONNUM: // @versionnum=<channel> - Checked: 2010-03-27 (RLVa-1.4.0a) | Added: RLVa-1.0.4b
|
||||
// NOTE: RLV will respond even if there's an option
|
||||
strReply = RlvStrings::getVersionNum();
|
||||
strReply = RlvStrings::getVersionNum(rlvCmd.getObjectID());
|
||||
break;
|
||||
case RLV_BHVR_GETATTACH: // @getattach[:<layer>]=<channel>
|
||||
eRet = onGetAttach(rlvCmd, strReply);
|
||||
|
|
|
|||
|
|
@ -191,11 +191,11 @@ RlvBehaviourDictionary::RlvBehaviourDictionary()
|
|||
addModifier(RLV_BHVR_SETCAM_EYEOFFSET, RLV_MODIFIER_SETCAM_EYEOFFSET, new RlvBehaviourModifierHandler<RLV_MODIFIER_SETCAM_EYEOFFSET>("Camera - Eye Offset", LLVector3::zero, true, nullptr));
|
||||
addEntry(new RlvBehaviourGenericToggleProcessor<RLV_BHVR_SETCAM_FOCUSOFFSET, RLV_OPTION_MODIFIER, RlvBehaviourCamEyeFocusOffsetHandler>("setcam_focusoffset", RlvBehaviourInfo::BHVR_EXPERIMENTAL));
|
||||
addModifier(RLV_BHVR_SETCAM_FOCUSOFFSET, RLV_MODIFIER_SETCAM_FOCUSOFFSET, new RlvBehaviourModifierHandler<RLV_MODIFIER_SETCAM_FOCUSOFFSET>("Camera - Focus Offset", LLVector3::zero, true, nullptr));
|
||||
addEntry(new RlvBehaviourGenericProcessor<RLV_OPTION_MODIFIER>("setcam_fovmin", RLV_BHVR_SETCAM_FOVMIN));
|
||||
addEntry(new RlvBehaviourProcessor<RLV_BHVR_SETCAM_FOVMIN, RlvBehaviourSetCamFovHandler>("setcam_fovmin"));
|
||||
addModifier(RLV_BHVR_SETCAM_FOVMIN, RLV_MODIFIER_SETCAM_FOVMIN, new RlvBehaviourModifierHandler<RLV_MODIFIER_SETCAM_FOVMIN>("Camera - FOV (Min)", DEFAULT_FIELD_OF_VIEW, true, new RlvBehaviourModifier_CompMax));
|
||||
addEntry(new RlvBehaviourGenericProcessor<RLV_OPTION_MODIFIER>("setcam_fovmax", RLV_BHVR_SETCAM_FOVMAX));
|
||||
addEntry(new RlvBehaviourGenericToggleProcessor<RLV_BHVR_SETCAM_MOUSELOOK, RLV_OPTION_NONE>("setcam_mouselook"));
|
||||
addEntry(new RlvBehaviourProcessor<RLV_BHVR_SETCAM_FOVMAX, RlvBehaviourSetCamFovHandler>("setcam_fovmax"));
|
||||
addModifier(RLV_BHVR_SETCAM_FOVMAX, RLV_MODIFIER_SETCAM_FOVMAX, new RlvBehaviourModifierHandler<RLV_MODIFIER_SETCAM_FOVMAX>("Camera - FOV (Max)", DEFAULT_FIELD_OF_VIEW, true, new RlvBehaviourModifier_CompMin));
|
||||
addEntry(new RlvBehaviourGenericToggleProcessor<RLV_BHVR_SETCAM_MOUSELOOK, RLV_OPTION_NONE>("setcam_mouselook"));
|
||||
addEntry(new RlvBehaviourGenericProcessor<RLV_OPTION_NONE_OR_MODIFIER>("setcam_textures", RLV_BHVR_SETCAM_TEXTURES));
|
||||
addModifier(RLV_BHVR_SETCAM_TEXTURES, RLV_MODIFIER_SETCAM_TEXTURE, new RlvBehaviourModifierHandler<RLV_MODIFIER_SETCAM_TEXTURE>("Camera - Forced Texture", IMG_DEFAULT, true, nullptr));
|
||||
addEntry(new RlvBehaviourGenericToggleProcessor<RLV_BHVR_SETCAM_UNLOCK, RLV_OPTION_NONE>("setcam_unlock"));
|
||||
|
|
@ -361,7 +361,7 @@ const RlvBehaviourInfo* RlvBehaviourDictionary::getBehaviourInfo(const std::stri
|
|||
if (pfStrict)
|
||||
*pfStrict = fStrict;
|
||||
|
||||
rlv_string2info_map_t::const_iterator itBhvr = m_String2InfoMap.find(std::make_pair(strBhvr, (eParamType & RLV_TYPE_ADDREM) ? RLV_TYPE_ADDREM : eParamType));
|
||||
rlv_string2info_map_t::const_iterator itBhvr = m_String2InfoMap.find(std::make_pair( (!fStrict) ? strBhvr : strBhvr.substr(0, strBhvr.size() - 4), (eParamType & RLV_TYPE_ADDREM) ? RLV_TYPE_ADDREM : eParamType));
|
||||
return ( (itBhvr != m_String2InfoMap.end()) && ((!fStrict) || (itBhvr->second->hasStrict())) ) ? itBhvr->second : NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ typedef RlvBehaviourToggleHandler<RLV_BHVR_SETCAM_EYEOFFSET> RlvBehaviourCamEyeF
|
|||
typedef RlvBehaviourHandler<RLV_BHVR_REMATTACH> RlvBehaviourAddRemAttachHandler; // Shared between @addattach and @remattach
|
||||
typedef RlvBehaviourHandler<RLV_BHVR_SENDCHANNEL> RlvBehaviourSendChannelHandler; // Shared between @sendchannel and @sendchannel_except
|
||||
typedef RlvBehaviourHandler<RLV_BHVR_SENDIM> RlvBehaviourRecvSendStartIMHandler; // Shared between @recvim, @sendim and @startim
|
||||
typedef RlvBehaviourHandler<RLV_BHVR_SETCAM_FOVMIN> RlvBehaviourSetCamFovHandler; // Shared between @setcam_fovmin and @setcam_fovmax
|
||||
typedef RlvBehaviourToggleHandler<RLV_BHVR_SHOWSELF> RlvBehaviourShowSelfToggleHandler; // Shared between @showself and @showselfhead
|
||||
typedef RlvBehaviourHandler<RLV_BHVR_CAMZOOMMIN> RlvBehaviourCamZoomMinMaxHandler; // Shared between @camzoommin and @camzoommax (deprecated)
|
||||
typedef RlvReplyHandler<RLV_BHVR_GETCAM_AVDISTMIN> RlvReplyCamMinMaxModifierHandler; // Shared between @getcam_avdistmin and @getcam_avdistmax
|
||||
|
|
@ -385,7 +386,7 @@ public:
|
|||
*/
|
||||
public:
|
||||
std::string asString() const;
|
||||
const std::string& getBehaviour() const { return (m_pBhvrInfo) ? m_pBhvrInfo->getBehaviour() : m_strBehaviour; }
|
||||
const std::string& getBehaviour() const { return m_strBehaviour; }
|
||||
ERlvBehaviour getBehaviourType() const { return (m_pBhvrInfo) ? m_pBhvrInfo->getBehaviourType() : RLV_BHVR_UNKNOWN; }
|
||||
U32 getBehaviourFlags() const{ return (m_pBhvrInfo) ? m_pBhvrInfo->getBehaviourFlags() : 0; }
|
||||
const LLUUID& getObjectID() const { return m_idObj; }
|
||||
|
|
|
|||
|
|
@ -972,6 +972,9 @@ void RlvFolderLocks::addFolderLock(const folderlock_source_t& lockSource, ELockP
|
|||
else if (RLV_LOCK_ADD == eLockType)
|
||||
m_cntLockAdd++;
|
||||
}
|
||||
|
||||
if (!m_AttachmentChangeConnection.connected())
|
||||
m_AttachmentChangeConnection = gAgentAvatarp->setAttachmentCallback(boost::bind(&RlvFolderLocks::onNeedsLookupRefresh, this));
|
||||
m_fLookupDirty = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -367,6 +367,8 @@ public:
|
|||
const uuid_vec_t& getAttachmentLookups() { return m_LockedAttachmentRem; }
|
||||
const uuid_vec_t& getWearableLookups() { return m_LockedWearableRem; }
|
||||
protected:
|
||||
boost::signals2::connection m_AttachmentChangeConnection;
|
||||
|
||||
// Map of folder locks (idRlvObj -> lockDescr)
|
||||
folderlock_list_t m_FolderLocks; // List of add and remove locked folder descriptions
|
||||
S32 m_cntLockAdd; // Number of RLV_LOCK_ADD locked folders in m_FolderLocks
|
||||
|
|
@ -475,15 +477,14 @@ inline bool RlvAttachmentLocks::isLockedAttachment(const LLViewerObject* pAttach
|
|||
RLV_ASSERT( (!pAttachObj) || (pAttachObj == pAttachObj->getRootEdit()) );
|
||||
|
||||
// Object is locked if:
|
||||
// - it's not a temporary attachment
|
||||
// - it's specifically marked as non-detachable (ie @detach=n)
|
||||
// - it's attached to an attachment point that is RLV_LOCK_REMOVE locked (ie @remattach:<attachpt>=n)
|
||||
// - it's part of a locked folder
|
||||
return
|
||||
(pAttachObj) && (pAttachObj->isAttachment()) && (!pAttachObj->isTempAttachment()) &&
|
||||
( (m_AttachObjRem.find(pAttachObj->getID()) != m_AttachObjRem.end()) ||
|
||||
(pAttachObj) && (pAttachObj->isAttachment()) &&
|
||||
( (m_AttachObjRem.find(pAttachObj->getID()) != m_AttachObjRem.end()) ||
|
||||
(isLockedAttachmentPoint(RlvAttachPtLookup::getAttachPointIndex(pAttachObj), RLV_LOCK_REMOVE)) ||
|
||||
(RlvFolderLocks::instance().isLockedAttachment(pAttachObj->getAttachmentItemID())) );
|
||||
((!pAttachObj->isTempAttachment()) && (RlvFolderLocks::instance().isLockedAttachment(pAttachObj->getAttachmentItemID()))) );
|
||||
}
|
||||
|
||||
// Checked: 2010-02-28 (RLVa-1.2.0a) | Added: RLVa-1.0.5a
|
||||
|
|
|
|||
|
|
@ -2260,6 +2260,16 @@
|
|||
function="ToggleControl"
|
||||
parameter="RestrainedLoveCanOOC" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Allow Temporary Attachments"
|
||||
name="Allow Temporary Attachments">
|
||||
<menu_item_check.on_check
|
||||
function="CheckControl"
|
||||
parameter="RLVaEnableTemporaryAttachments" />
|
||||
<menu_item_check.on_click
|
||||
function="ToggleControl"
|
||||
parameter="RLVaEnableTemporaryAttachments" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Forbid Give to #RLV"
|
||||
name="Forbid Give to #RLV">
|
||||
|
|
|
|||
|
|
@ -56,6 +56,11 @@
|
|||
<key>value</key>
|
||||
<string>Unable to perform action due to RLV restrictions</string>
|
||||
</map>
|
||||
<key>blocked_groupchange</key>
|
||||
<map>
|
||||
<key>value</key>
|
||||
<string>Unable to change your active group due to an RLV restriction; switching back to [GROUP_SLURL]</string>
|
||||
</map>
|
||||
<key>blocked_permattach</key>
|
||||
<map>
|
||||
<key>value</key>
|
||||
|
|
|
|||
Loading…
Reference in New Issue