Skip to content

Commit

Permalink
Merge pull request #224 from zontreck/72_rel
Browse files Browse the repository at this point in the history
7.2 Final Changes
  • Loading branch information
zontreck authored Jul 14, 2019
2 parents 7a63ce4 + c8205c8 commit 945bb50
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 24 deletions.
3 changes: 2 additions & 1 deletion src/collar/.couples
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ hug|~hug|~hug|0.4|_SELF_ hugs _PARTNER_.
kiss|~kiss|~kiss|0.4|_SELF_ kisses _PARTNER_.
pet|~good|~pet|0.55|_PARTNER_ pets _SELF_'s head.
cling|~cling|~hips|0.55|_SELF_ clings to _PARTNER_'s hips.
catch|~leap|~catch|0.6|_SELF_ leaps into _PARTNER_'s arms.
catch|~leap|~catch|0.6|_SELF_ leaps into _PARTNER_'s arms.
foot|~footkiss|~foot|1.1|_SELF_ kisses _PARTNER_'s foot
8 changes: 2 additions & 6 deletions src/collar/oc_bookmarks.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Sumi Perl, Master Starship, littlemousy, mewtwo064, ml132,
// Romka Swallowtail, Garvin Twine et al.
// Licensed under the GPLv2. See LICENSE for full details.
string g_sScriptVersion = "7.2rc";
string g_sScriptVersion = "7.2";
integer LINK_CMD_DEBUG=1999;
DebugOutput(key kID, list ITEMS){
integer i=0;
Expand Down Expand Up @@ -118,10 +118,6 @@ PermsCheck() {

UserCommand(integer iNum, string sStr, key kID) {
// So commands can accept a value
if (iNum==CMD_GROUP) { // Do not permit Group Access (Public Access)
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"%NOACCESS% for group in bookmarks",kID);
return;
}
if (sStr == "reset") {
// it is a request for a reset
if(iNum == CMD_WEARER || iNum == CMD_OWNER)
Expand Down Expand Up @@ -461,7 +457,7 @@ default {
g_lVolatile_Slurls += [sValue];
}
}
} else if (iNum >= CMD_OWNER && iNum <= CMD_WEARER) UserCommand(iNum, sStr, kID); // This is intentionally not available to public access.
} else if (iNum >= CMD_OWNER && iNum <= CMD_WEARER && iNum != CMD_GROUP) UserCommand(iNum, sStr, kID); // This is intentionally not available to public access.
else if(iNum == DIALOG_RESPONSE) {
integer iMenuIndex = llListFindList(g_lMenuIDs, [kID]);
if (iMenuIndex != -1) {
Expand Down
41 changes: 40 additions & 1 deletion src/collar/oc_leash.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ integer g_iLeasherInRange=FALSE; //
integer g_iRLVOn=FALSE; // To store if RLV was enabled in the collar
integer g_iAwayCounter=0;



string g_sLeashHolder="na"; // Leash holder item name
// ---------------------------------------------
// ------ FUNCTION DEFINITIONS ------

Expand Down Expand Up @@ -402,6 +405,7 @@ YankTo(key kIn){
}

UserCommand(integer iAuth, string sMessage, key kMessageID, integer bFromMenu) {
//llSay(0, sMessage+" ["+(string)kMessageID+"]");
//Debug("Got user comand:\niAuth: "+(string)iAuth+"\nsMessage: "+sMessage+"\nkMessageID: "+(string)kMessageID+"\nbFromMenu: "+(string)bFromMenu);
if (iAuth == CMD_NOACCESS) {
if (kMessageID == g_kLeashedTo) {
Expand All @@ -418,6 +422,7 @@ UserCommand(integer iAuth, string sMessage, key kMessageID, integer bFromMenu) {
sMessage = llToLower(sMessage); //convert sMessage to lower case for caseless comparisson
//debug(sMessage);
if (sMessage=="leashmenu" || sMessage == "menu leash"){
if(g_sLeashHolder=="na")LHSearch(); // Try to find the leash holder before showing the menu if leash holder was not found at init.
list lButtons;
if (kMessageID != g_kWearer) lButtons += "Grab";// Only if not the wearer.
else lButtons += ["-"];
Expand All @@ -431,6 +436,8 @@ UserCommand(integer iAuth, string sMessage, key kMessageID, integer bFromMenu) {
lButtons += ["Follow"];
lButtons += ["Anchor","Pass"];
lButtons += ["Length"];
if(g_sLeashHolder!="na")
lButtons += ["Give Holder"];
lButtons += g_lButtons;

string sPrompt = "\n[Leash]\n";
Expand Down Expand Up @@ -580,6 +587,18 @@ UserCommand(integer iAuth, string sMessage, key kMessageID, integer bFromMenu) {
} else
SensorDialog(g_kCmdGiver, "\n\nWhat's going to serve us as a post? If the desired object isn't on the list, please try moving closer.\n", "",iAuth,"PostTarget", PASSIVE|ACTIVE);
}
if(sMessage == "give holder"){
if(iAuth >=CMD_OWNER || iAuth <= CMD_EVERYONE){
if(g_sLeashHolder == "na") {
llMessageLinked(LINK_DIALOG,NOTIFY, "0This option is disabled because no leash holder is in the collar", kMessageID);
if(bFromMenu)UserCommand(iAuth, "leashmenu", kMessageID, bFromMenu);
}else{
llMessageLinked(LINK_DIALOG,NOTIFY, "0Sending Leash Holder...", kMessageID);
llGiveInventory(kMessageID, g_sLeashHolder);
if(bFromMenu)UserCommand(iAuth, "leashmenu", kMessageID, bFromMenu);
}
}
}
}
}
DebugOutput(key kID, list ITEMS){
Expand All @@ -591,6 +610,24 @@ DebugOutput(key kID, list ITEMS){
}
llInstantMessage(kID, llGetScriptName() +final);
}
LHSearch(){
integer iBegin=0;
integer iEnd = llGetInventoryNumber(INVENTORY_OBJECT);
if(iEnd == 0)g_sLeashHolder="na";
else{
for(iBegin=0;iBegin<iEnd;iBegin++){
string sItem = llGetInventoryName(INVENTORY_OBJECT,iBegin);
sItem = llToLower(sItem);
if(llSubStringIndex(sItem,"leashholder")!=-1){
g_sLeashHolder=llGetInventoryName(INVENTORY_OBJECT, iBegin);
sItem="";
iBegin=0;
iEnd=0;
return;
}
}
}
}
default {
on_rez(integer start_param) {
DoUnleash(FALSE);
Expand All @@ -601,6 +638,7 @@ default {
llMinEventDelay(0.44);
DoUnleash(FALSE);
//Debug("Starting");
LHSearch();
}

timer() {
Expand Down Expand Up @@ -776,6 +814,7 @@ default {
DebugOutput(kMessageID, [" COMMAND GIVER:",g_kCmdGiver]);
DebugOutput(kMessageID, [" LEASH COMMANDER ID:",g_kLeashCmderID]);
DebugOutput(kMessageID, [" LEASHED TO AVI:",g_bLeashedToAvi]);
DebugOutput(kMessageID, [" LEASH HOLDER:",g_sLeashHolder]);
}
}

Expand Down Expand Up @@ -834,4 +873,4 @@ default {
g_kWearer = llGetOwner();
}
}
}
}
27 changes: 23 additions & 4 deletions src/collar/oc_sys.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//on menu request, give dialog, with alphabetized list of submenus
//on listen, send submenu link message

string g_sDevStage="(Release Candidate)";
string g_sDevStage="";
string g_sCollarVersion="7.2";
integer g_iCaptureIsActive=FALSE; // this is a fix for ensuring proper permissions with capture
integer g_iLatestVersion=TRUE;
Expand All @@ -21,6 +21,7 @@ key g_kWearer;
// Relay will read .settings from root prim and send to oc_settings for storage.
key g_kSettingsReader;
integer g_iSettingsReader;
key g_kExistingSettings; // To prevent excess linked messages if the settings notecard is not modified, or load is not requested, cache the settings UUID
// End .settings relay

list g_lMenuIDs;//3-strided list of avatars given menus, their dialog ids, and the name of the menu they were given
Expand Down Expand Up @@ -109,6 +110,7 @@ key g_kCurrentUser;

list g_lAppsButtons;
list g_lResizeButtons;
integer MVANIM_ANNOUNCE = 13001;

integer g_iLocked = FALSE;
integer g_bDetached = FALSE;
Expand Down Expand Up @@ -429,6 +431,17 @@ BuildLockElementList() {//EB
g_lOpenLockElements += [n];
}
}
AnnounceAnimInventory(integer iLink) {
// if there's an anim, announce it.
if (llGetInventoryNumber(INVENTORY_ANIMATION)) {
string sAnim = llGetInventoryName(INVENTORY_ANIMATION, 0);
llMessageLinked(iLink, MVANIM_ANNOUNCE, sAnim, llGetInventoryKey(sAnim));
}

if (llGetInventoryType(".couples") == INVENTORY_NOTECARD) {
llMessageLinked(iLink, MVANIM_ANNOUNCE, ".couples", llGetInventoryKey(".couples"));
}
}

PermsCheck() {
if (!(llGetObjectPermMask(MASK_OWNER) & PERM_MODIFY)) {
Expand Down Expand Up @@ -706,8 +719,14 @@ default {
llSetTimerEvent(1.0);
llMessageLinked(LINK_ALL_OTHERS, LM_SETTING_REQUEST,"ALL","");
if(llGetInventoryType(".settings") == INVENTORY_NOTECARD){
g_iSettingsReader=0;
g_kSettingsReader = llGetNotecardLine(".settings", g_iSettingsReader);
if(llGetInventoryKey(".settings") != g_kExistingSettings){
g_iSettingsReader=0;
g_kSettingsReader = llGetNotecardLine(".settings", g_iSettingsReader);
g_kExistingSettings = llGetInventoryKey(".settings");
}
}
if(llGetInventoryNumber(INVENTORY_ANIMATION)!=0){
AnnounceAnimInventory(LINK_ALL_OTHERS);
}
}
if (iChange & CHANGED_OWNER) llResetScript();
Expand Down Expand Up @@ -801,4 +820,4 @@ default {
}
if (!g_iWaitUpdate && !g_iWaitRebuild) llSetTimerEvent(0.0);
}
}
}
37 changes: 28 additions & 9 deletions src/collar/oc_titler.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Romka Swallowtail, Mano Nevadan, and other contributors.
// Licensed under the GPLv2. See LICENSE for full details.


string g_sScriptVersion = "7.2";
string g_sAppVersion = "1.5";

string g_sParentMenu = "Apps";
Expand All @@ -23,7 +23,7 @@ integer CMD_EVERYONE = 504;
//integer CMD_SAFEWORD = 510;
//integer CMD_RELAY_SAFEWORD = 511;
//integer CMD_BLOCKED = 520;

integer LINK_CMD_DEBUG = 1999;
integer NOTIFY = 1002;
//integer SAY = 1004;
integer REBOOT = -1000;
Expand Down Expand Up @@ -206,6 +206,13 @@ UserCommand(integer iAuth, string sStr, key kAv) {
else if (sStr == "runaway" && (iAuth == CMD_OWNER || iAuth == CMD_WEARER)) {
UserCommand(CMD_OWNER,"title off", g_kWearer);
} else if (sCommand == "image") {

if(g_sParticle == "" && g_iOn==FALSE) g_iLastRank = CMD_EVERYONE;
if(iAuth > g_iLastRank){
llMessageLinked(LINK_DIALOG, NOTIFY, "0%NOACCESS% to change titler particles.", kAv);
return;
}
g_iLastRank=iAuth;
if (sAction == "") ImageMenu(kAv, iAuth);
else if (sAction == "bigger") {
float fNew = g_vPartSize.x + 0.1;
Expand All @@ -218,6 +225,7 @@ UserCommand(integer iAuth, string sStr, key kAv) {
g_vPartSize = < fNew, fNew, 0.0 >;
llMessageLinked(LINK_SAVE, LM_SETTING_SAVE, g_sSettingToken+"particlesize="+(string)g_vPartSize, "");
} else if (sAction == "off") {
if(!g_iOn)g_iLastRank=CMD_EVERYONE;
g_sParticle = "";
llMessageLinked(LINK_SAVE, LM_SETTING_DELETE, g_sSettingToken+"particle", "");
} else if (sAction == "custom") {
Expand All @@ -230,18 +238,23 @@ UserCommand(integer iAuth, string sStr, key kAv) {
} else if (sCommand == "title") {
integer iIsCommand;
if (llGetListLength(lParams) <= 2) iIsCommand = TRUE;
if (g_iOn && iAuth > g_iLastRank) //only change text if commander has same or greater auth
if(g_sParticle == "" && g_iOn==FALSE) g_iLastRank = CMD_EVERYONE;
if ( iAuth > g_iLastRank){ //only change text if commander has same or greater auth
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"You currently have not the right to change the Titler settings, someone with a higher rank set it!",kAv);
return;
}
else if (sAction == "on") {
g_iLastRank = iAuth;
g_iOn = TRUE;
llMessageLinked(LINK_SAVE, LM_SETTING_SAVE, g_sSettingToken+"on="+(string)g_iOn, "");
llMessageLinked(LINK_SAVE, LM_SETTING_SAVE, g_sSettingToken+"auth="+(string)g_iLastRank, ""); // save lastrank to DB
} else if (sAction == "off" && iIsCommand) {

g_iLastRank = CMD_EVERYONE;
g_iOn = FALSE;
llMessageLinked(LINK_SAVE, LM_SETTING_DELETE, g_sSettingToken+"on", "");
llMessageLinked(LINK_SAVE, LM_SETTING_DELETE, g_sSettingToken+"auth", ""); // del lastrank from DB

} else if (sAction == "image") {
string sNewText= llDumpList2String(llDeleteSubList(lParams, 0, 1), " ");
g_sParticle = sNewText;
Expand Down Expand Up @@ -275,7 +288,7 @@ UserCommand(integer iAuth, string sStr, key kAv) {
}
ShowHideTitle();
} else if (sStr == "rm titler") {
if (kAv!=g_kWearer && iAuth!=CMD_OWNER) llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"%NOACCESS%",kAv);
if (kAv!=g_kWearer && iAuth!=CMD_OWNER) llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"%NOACCESS% to uninstalling titler",kAv);
else ConfirmDeleteMenu(kAv, iAuth);
}
}
Expand Down Expand Up @@ -393,12 +406,18 @@ default{
if (sStr == "LINK_DIALOG") LINK_DIALOG = iSender;
else if (sStr == "LINK_SAVE") LINK_SAVE = iSender;
} else if (iNum == REBOOT && sStr == "reboot") llResetScript();
else if(iNum == 1999){ // link_cmd_debug. This script hasn't been modified since 7.1 i don't think - will update this if changelog shows otherwise.
else if(iNum == LINK_CMD_DEBUG){
integer iOnlyver=FALSE;
if(sStr=="ver"){
llInstantMessage(kID, llGetScriptName()+" 7.1");
}else{
llInstantMessage(kID, llGetScriptName()+" TITLE TEXT: "+g_sText);
iOnlyver=TRUE;
}
llInstantMessage(kID, llGetScriptName()+" SCRIPT VERSION: "+g_sScriptVersion);
if(iOnlyver)return;
llInstantMessage(kID, llGetScriptName()+" TITLE TEXT: "+g_sText);
llInstantMessage(kID, llGetScriptName()+" ON: "+(string)g_iOn);
llInstantMessage(kID, llGetScriptName()+" PARTICLE: "+g_sParticle);
llInstantMessage(kID, llGetScriptName()+" LAST AUTH: "+(string)g_iLastRank);

}
}

Expand All @@ -409,4 +428,4 @@ default{
on_rez(integer param){
llResetScript();
}
}
}
1 change: 1 addition & 0 deletions src/installer/oc_update_shim.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ default {
llRegionSayTo(kID, iChannel, sResponse);
} else if (sMsg == "Core5Done") Check4Core5Script();
else if (!llSubStringIndex(sMsg, "DONE")){
llSleep(5); // WAIT A FEW SECONDS TO ALLOW EVERYTHING TO SETTLE DOWN
//restore settings
if (g_iIsUpdate) {
llMessageLinked(LINK_ALL_OTHERS, LINK_UPDATE, "LINK_REQUEST","");
Expand Down
4 changes: 2 additions & 2 deletions src/spares/.lead.lsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is part of OpenCollar.
// Copyright (c) 2008-2016 Ilse Mannonen, Garvin Twine, Wendy Starfall.
// Copyright (c) 2008-2016 Ilse Mannonen, Garvin Twine, Wendy Starfall, Tashia Redrose
// Licensed under the GPLv2. See LICENSE for full details.

integer g_iMychannel = -8888;
Expand Down Expand Up @@ -51,7 +51,7 @@ default {
}
changed(integer change) {
if (change & CHANGED_INVENTORY) PermsCheck();
if (change & CHANGED_TELEPORT) {
if (change & CHANGED_TELEPORT || change & CHANGED_REGION) {
llSay(g_iMychannel, g_sResponse);
llSetTimerEvent(2.0);
}
Expand Down
1 change: 1 addition & 0 deletions web/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.2
2 changes: 1 addition & 1 deletion web/~version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.1
7.2

0 comments on commit 945bb50

Please sign in to comment.