Skip to content

Commit

Permalink
Merge pull request #867 from OpenCollarTeam/2022-q1-features
Browse files Browse the repository at this point in the history
2022 q1 features
  • Loading branch information
Medea-Destiny authored Oct 19, 2022
2 parents 850123c + f3d2482 commit 5914698
Show file tree
Hide file tree
Showing 23 changed files with 2,542 additions and 904 deletions.
43 changes: 27 additions & 16 deletions src/Apps/oc_outfits.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Felkami (Caraway Ohmai)
* Jan 2021 - #461, Made menu call case insensitive
Lillith (Lillith Xue)
* Dec 2019 - Fixed bug: Outfits not working for non-wearer as menu user due to listen typo
Phidoux (Taya Maruti)
*Sept 2022 - Limited core lock/unlock to wearer and owner (issue #855)
et al.
Expand Down Expand Up @@ -59,8 +60,13 @@ integer MENUNAME_RESPONSE = 3001;
integer OUTFITS_ADD = -999901;
integer OUTFITS_REM = -999902;

//integer RLV_CMD = 6000;
//integer RLV_REFRESH = 6001;//RLV plugins should reinstate their restrictions upon receiving this message.
integer RLV_CMD = 6000;
integer RLV_REFRESH = 6001;//RLV plugins should reinstate their restrictions upon receiving this message.
integer DO_RLV_REFRESH = 26001;//RLV plugins should reinstate their restrictions upon receiving this message.
integer RLV_CLEAR = 6002;//RLV plugins should clear their restriction lists upon receiving this message.
integer RLV_VERSION = 6003; //RLV Plugins can recieve the used RLV viewer version upon receiving this message..
integer RLVA_VERSION = 6004; //RLV Plugins can recieve the used RLVa viewer version upon receiving this message..
integer RLV_CMD_OVERRIDE=6010; //RLV Plugins can send one-shot (force) commands with a list of restrictions to temporarily lift if required to ensure that the one-shot commands can be executed

//integer RLV_OFF = 6100; // send to inform plugins that RLV is disabled now, no message or key needed
//integer RLV_ON = 6101; // send to inform plugins that RLV is enabled now, no message or key needed
Expand Down Expand Up @@ -145,6 +151,10 @@ FolderBrowser (key kID, integer iAuth){
}

CoreBrowser(key kID, integer iAuth){
if(iAuth != CMD_OWNER && kID != g_kWearer) {
llMessageLinked(LINK_SET,NOTIFY, "0%NOACCESS% to core", kID);
return;
}
g_sPath = GetOutfitSystem(TRUE);
g_kListenTo = kID;
g_iListenToAuth = iAuth;
Expand Down Expand Up @@ -308,7 +318,7 @@ integer ALIVE = -55;
integer READY = -56;
integer STARTUP = -57;

integer g_iRLVa = 0;
integer g_iRLVa = FALSE;

string RLVA_APPEND=".";

Expand All @@ -317,8 +327,8 @@ string GetOutfitSystem(integer iCorePath){
if(iCorePath)return ".outfits/.core";
else return ".outfits";
}else{
if(iCorePath)return "outfits/core";
else return "outfits";
if(iCorePath)return "~outfits/~core";
else return "~outfits";
}
}

Expand All @@ -327,8 +337,8 @@ string GetFolderName(integer iCore){
if(iCore)return ".core";
else return ".outfits";
}else{
if(iCore)return "core";
else return "outfits";
if(iCore)return "~core";
else return "~outfits";
}
}

Expand All @@ -340,14 +350,6 @@ default
}
state_entry(){
llMessageLinked(LINK_SET, ALIVE, llGetScriptName(),"");
llListen(999988, "", llGetOwner(), "");
llOwnerSay("@version=999988");
}
listen(integer iChan, string sName, key kID, string sMsg)
{
if(llSubStringIndex(sMsg, "RLVa")==-1){
g_iRLVa=FALSE;
}else g_iRLVa=TRUE;
}
link_message(integer iSender, integer iNum, string sStr, key kID){
if(iNum == REBOOT){
Expand All @@ -374,6 +376,11 @@ state active
}
link_message(integer iSender,integer iNum,string sStr,key kID){
if(iNum >= CMD_OWNER && iNum <= CMD_EVERYONE) UserCommand(iNum, sStr, kID);
else if(iNum == RLVA_VERSION ){
if(sStr != "0"){
g_iRLVa=TRUE;
}else g_iRLVa=FALSE;
}
else if(iNum == MENUNAME_REQUEST && sStr == g_sParentMenu)
llMessageLinked(iSender, MENUNAME_RESPONSE, g_sParentMenu+"|"+ g_sSubMenu,"");
else if(iNum == -99999){
Expand Down Expand Up @@ -412,6 +419,10 @@ state active
llMessageLinked(LINK_SET, iAuth, "menu "+g_sParentMenu, kAv);
}
else if(sMsg == TickBox(g_iLockCore, "Lock Core")){
if(iAuth != CMD_OWNER && kID != g_kWearer) {
llMessageLinked(LINK_SET,NOTIFY, "0%NOACCESS% to core", kID);
return;
}
g_iLockCore=1-g_iLockCore;
llSetTimerEvent(120);
Commit();
Expand Down
Loading

0 comments on commit 5914698

Please sign in to comment.