Skip to content

Commit

Permalink
Merge pull request #1112 from NikkiLacrima/NikkiLacrima-patch-folders…
Browse files Browse the repository at this point in the history
…_locks-241011

Nikki lacrima patch folders locks 241011
  • Loading branch information
SilkieSabra authored Oct 19, 2024
2 parents 9d6467b + bd4ddbf commit 38503cc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/collar/oc_folders_locks.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ Copyright 2021
Aria (Tashia Redrose)
* Feb 2021 - Create oc_folders_locks
Nikki Lacrima
Oct 2024 - consistently use RLV_CMD with source g_sRLVSource
et al.
Licensed under the GPLv2. See LICENSE for full details.
https://github.com/OpenCollarTeam/OpenCollar
*/

string g_sScriptVersion = "8.4";
string g_sRLVSource ="folders_locks";
list g_lFolderLocks;

integer RLV_OFF = 6100;
Expand All @@ -27,7 +32,7 @@ IssueLocks()
integer i=0;
integer end=llGetListLength(g_lFolderLocks);
for(i=0;i<end;i+=2){
llMessageLinked(LINK_SET, RLV_CMD, llList2String(g_lFolderLocks,i)+":"+llList2String(g_lFolderLocks,i+1)+"=n", "");
llMessageLinked(LINK_SET, RLV_CMD, llList2String(g_lFolderLocks,i)+":"+llList2String(g_lFolderLocks,i+1)+"=n", g_sRLVSource);
}

//llSay(0, "FOLDER LOCKS DEBUG RESTRICT\n\n"+llDumpList2String(g_lFolderLocks, " ~ "));
Expand Down Expand Up @@ -87,20 +92,20 @@ default
integer index=llListFindList(g_lFolderLocks, [sMsg,(string)kID]);
if(index==-1){
g_lFolderLocks += [sMsg, (string)kID];
IssueLocks();
}else{
llOwnerSay("@"+llList2String(g_lFolderLocks, index)+":"+llList2String(g_lFolderLocks,index+1)+"=y");
llMessageLinked(LINK_SET, RLV_CMD, llList2String(g_lFolderLocks,index)+":"+llList2String(g_lFolderLocks,index+1)+"=y", g_sRLVSource);
g_lFolderLocks = llDeleteSubList(g_lFolderLocks, index,index+1);
}
//llSay(0, "FOLDER LOCKS DEBUG (SET LOCK)\n\nFMEM = "+(string)llGetFreeMemory()+"b\n\n"+llDumpList2String(g_lFolderLocks, " ~ "));
IssueLocks();
} else if(iNum == CLEAR_FOLDER_LOCKS)
{
//llSay(0, "FOLDER LOCKS DEBUG CLEAR");
integer i=0;
integer end = llGetListLength(g_lFolderLocks);
for(i=0;i<end;i+=2)
{
llMessageLinked(LINK_SET, RLV_CMD, llList2String(g_lFolderLocks, i)+":"+llList2String(g_lFolderLocks,i+1)+"=y", "");
llMessageLinked(LINK_SET, RLV_CMD, llList2String(g_lFolderLocks, i)+":"+llList2String(g_lFolderLocks,i+1)+"=y",g_sRLVSource);
}
llResetScript();
} else if(iNum == UPDATER)
Expand Down

0 comments on commit 38503cc

Please sign in to comment.