summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-07-11 14:31:55 +0800
committerErik Kundiman <erik@megapahit.org>2025-07-11 14:31:55 +0800
commitb1d2961edb593393da5ae88e275be7bb2568969b (patch)
tree6c2379d6603dd3c4429dc6d9a46a5a0bfc31876b /indra/newview
parent77e6c8c26d056f9d25d1d1c392affd7aa7c74f6f (diff)
@attachover:<folder1/../folderN>=force implementationHEADmain
See f4e04a3e7bac42a8cb18e9c70b67bf97ce020d8c
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/rlvdefines.h1
-rw-r--r--indra/newview/rlvhandler.cpp27
-rw-r--r--indra/newview/rlvhelper.cpp1
3 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h
index 5de428d093..649aa75d14 100644
--- a/indra/newview/rlvdefines.h
+++ b/indra/newview/rlvdefines.h
@@ -100,6 +100,7 @@ namespace Rlv
Detach,
GetInv,
Attach,
+ AttachOver,
GetCommand,
Count,
diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp
index f3306b0f21..066543987f 100644
--- a/indra/newview/rlvhandler.cpp
+++ b/indra/newview/rlvhandler.cpp
@@ -331,6 +331,33 @@ ECmdRet ForceHandler<EBehaviour::Attach>::onCommand(const RlvCommand& rlvCmd)
return ECmdRet::Succeeded;
}
+template<> template<>
+ECmdRet ForceHandler<EBehaviour::AttachOver>::onCommand(const RlvCommand& rlvCmd)
+{
+ auto rlvFolderID = findDescendentCategoryIDByName(gInventory.getRootFolderID(), "#RLV");
+ if (rlvFolderID == LLUUID::null)
+ return ECmdRet::FailedNoSharedRoot;
+ std::vector<std::string> optionList;
+ auto option = rlvCmd.getOption();
+ if (!option.empty())
+ {
+ auto folderID = findDescendentCategoryIDByName(rlvFolderID, option);
+ if (folderID == LLUUID::null)
+ {
+ Util::parseStringList(option, optionList, "/");
+ auto iter = optionList.begin();
+ for(; optionList.end() != iter; ++iter)
+ {
+ auto name = *iter;
+ if (!name.empty())
+ folderID = findDescendentCategoryIDByName(folderID, name);
+ }
+ }
+ LLAppearanceMgr::instance().addCategoryToCurrentOutfit(folderID);
+ }
+ return ECmdRet::Succeeded;
+}
+
// AddRem
ECmdRet CommandHandlerBaseImpl<EParamType::AddRem>::processCommand(const RlvCommand& rlvCmd, BhvrHandlerFunc* pHandler, BhvrToggleHandlerFunc* pToggleHandler)
diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp
index bba1c4c6fd..4a0b394acb 100644
--- a/indra/newview/rlvhelper.cpp
+++ b/indra/newview/rlvhelper.cpp
@@ -61,6 +61,7 @@ BehaviourDictionary::BehaviourDictionary()
addEntry(new ForceProcessor<EBehaviour::SitGround>("sitground"));
addEntry(new ForceProcessor<EBehaviour::Unsit>("unsit"));
addEntry(new ForceProcessor<EBehaviour::Attach>("attach"));
+ addEntry(new ForceProcessor<EBehaviour::AttachOver>("attachover"));
// AddRem
addEntry(new BehaviourProcessor<EBehaviour::Sit>("sit"));