@sharedwear=n stops the user from wearing or attaching any item that lives anywhere inside the shared #RLV folder (the whole subtree). Items stored elsewhere in inventory are not affected. It is the "add" half of a pair: @sharedunwear is the matching "remove" lock.
It is implemented as an RLVa folder lock: a deny lock of type "add" with subtree scope on the #RLV root folder, owned by the issuing object.
@sharedwear=<n|add> add the restriction
@sharedwear=<y|rem> remove the restriction
None. The command takes no option; @sharedwear:anything=n fails with an option error.
#RLV or any folder below it is blocked, including items in "folded" (dot-prefixed or +-folded) subfolders, which inherit their parent's lock.RlvAttachmentLocks::canAttach(item)) and when wearing body parts or clothing (RlvWearableLocks::canWear(item)) is the same one the force-wear commands rely on, so scripted @attach/@addoutfit-style force-wears from #RLV are also refused while the lock is held.#RLV._sec form and no exceptions.// Nothing from #RLV may be put on while this object is worn
llOwnerSay("@sharedwear=n");
// Lift it again
llOwnerSay("@sharedwear=y");
BHVR_EXTENDED, which marks it as part of RLVa's own extended command set. In this tree the flag is informational: nothing in the code tests isExtended().=n/=add and =y/=rem are parsed identically (rlvhelper.cpp 721-750).RLV_BHVR_SHAREDWEAR is incremented, so @getstatus reports it like any other restriction.#RLV#RLV#RLVrlvhelper.cpp 149 – RlvBehaviourInfo("sharedwear", RLV_BHVR_SHAREDWEAR, RLV_TYPE_ADDREM, BHVR_EXTENDED).rlvhandler.cpp 1645-1658 (shared with @sharedunwear). Builds a lock source (ST_SHAREDPATH, "") (the #RLV root), PERM_DENY, SCOPE_SUBTREE, lock type RLV_LOCK_ADD, and calls RlvFolderLocks::addFolderLock/removeFolderLock. VERIFY_OPTION_REF(strOption.empty()) rejects any option.rlvlocks.cpp 1018-1024 maps ST_SHAREDPATH to RlvInventory::getSharedFolder(path); isLockedFolder (1149-1214) walks from the item's folded parent to the inventory root looking for deny locks.rlvlocks.h 426-435 (canAttach(item)) and 514-519 (canWear(item)) both return RLV_WEAR_LOCKED when isLockedFolder(parent, RLV_LOCK_ADD).No significant differences from RLV's @sharedwear.