Skip to content

Commit

Permalink
New Version! 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zontreck committed Jan 24, 2021
1 parent 1708bc3 commit 56f493e
Show file tree
Hide file tree
Showing 19 changed files with 144 additions and 578 deletions.
554 changes: 0 additions & 554 deletions src/Apps/oc_outfits.RLV.lsl

This file was deleted.

4 changes: 2 additions & 2 deletions src/Apps/oc_outfits.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ UserCommand(integer iNum, string sStr, key kID) {
//We have to validate against known commands for Outfits, or else we'll pop denied errors every time a public user sneezes
string sChangetype = llToLower(llList2String(llParseString2List(sStr, [" "], []),0));

if(sStr==g_sSubMenu || llToLower(sStr) == "menu "+ llToLower(g_sSubMenu) || sChangetype == "wear" || sChangetype == "naked")
if(llToLower(sStr)==llToLower(g_sSubMenu) || llToLower(sStr) == "menu "+ llToLower(g_sSubMenu) || sChangetype == "wear" || sChangetype == "naked")
llMessageLinked(LINK_SET,NOTIFY, "0%NOACCESS% to outifts", kID);
}
if(deny) return;
Expand All @@ -214,7 +214,7 @@ UserCommand(integer iNum, string sStr, key kID) {
g_lOwner = g_lTrust = g_lBlock = [];
return;
}
if (sStr==g_sSubMenu || llToLower(sStr) == "menu "+ llToLower(g_sSubMenu)) Menu(kID, iNum);
if (llToLower(sStr)==llToLower(g_sSubMenu) || llToLower(sStr) == "menu "+ llToLower(g_sSubMenu)) Menu(kID, iNum);
//else if (iNum!=CMD_OWNER && iNum!=CMD_TRUSTED && kID!=g_kWearer) RelayNotify(kID,"Access denied!",0);
else {
//integer iWSuccess = 0;
Expand Down
13 changes: 10 additions & 3 deletions src/ao/oc_ao.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


string g_sDevStage = "dev1";
string g_sVersion = "2.0";
string g_sVersion = "2.1";
integer g_iUpdateAvailable;
key g_kWebLookup;

Expand Down Expand Up @@ -505,12 +505,13 @@ PermsCheck() {
}
}


integer API_CHANNEL;
default {
state_entry() {
if (llGetInventoryType("oc_installer_sys")==INVENTORY_SCRIPT) return;
g_kWearer = llGetOwner();
PermsCheck();
API_CHANNEL = ((integer)("0x" + llGetSubString((string)llGetOwner(), 0, 8))) + 0xf6eb - 0xd2;
g_iInterfaceChannel = -llAbs((integer)("0x" + llGetSubString(g_kWearer,30,-1)));
llListen(g_iInterfaceChannel, "", "", "");
g_iHUDChannel = -llAbs((integer)("0x"+llGetSubString((string)llGetOwner(),-7,-1)));
Expand Down Expand Up @@ -596,7 +597,13 @@ default {
if (sMenuType == "AO") {
if (sMessage == "Cancel") return;
else if (sMessage == "-") MenuAO(kID);
else if (sMessage == "Collar Menu") llRegionSayTo(g_kWearer,g_iHUDChannel,(string)g_kWearer+":menu");
else if (sMessage == "Collar Menu"){
llRegionSayTo(g_kWearer, API_CHANNEL, llList2Json(JSON_OBJECT, ["pkt_type", "online", "kID", g_kWearer, "addon_name", "OC_Sub_AO", "optin", ""]));
llSleep(2);
llRegionSayTo(g_kWearer, API_CHANNEL, llList2Json(JSON_OBJECT, ["pkt_type", "from_addon", "kID", g_kWearer, "iNum", 0, "sMsg", "menu", "addon_name", "OC_Sub_AO"]));
llSleep(0.5);
llRegionSayTo(g_kWearer, API_CHANNEL, llList2Json(JSON_OBJECT, ["pkt_type", "offline", "addon_name", "OC_Sub_AO", "kID", g_kWearer]));
}
else if (~llSubStringIndex(sMessage,"LOCK")) {
Command(kID,llToLower(sMessage));
MenuAO(kID);
Expand Down
2 changes: 1 addition & 1 deletion src/collar/oc_core.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ integer NOTIFY_OWNERS=1003;

//string g_sParentMenu = "";
string g_sSubMenu = "Main";
string COLLAR_VERSION = "8.0.0000"; // Provide enough room
string COLLAR_VERSION = "8.0.1000"; // Provide enough room
// LEGEND: Major.Minor.Build RC Beta Alpha
integer UPDATE_AVAILABLE=FALSE;
string NEW_VERSION = "";
Expand Down
9 changes: 6 additions & 3 deletions src/installer/BUNDLE_00-Core_REQUIRED
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
SCRIPT|oc_com
SCRIPT|oc_sys
SCRIPT|oc_themes
SCRIPT|oc_rlvextension
SCRIPT|oc_rlvsuite
SCRIPT|oc_states
SCRIPT|oc_addons
SCRIPT|oc_states
SCRIPT|oc_core
SCRIPT|oc_auth
SCRIPT|oc_api
1 change: 0 additions & 1 deletion src/installer/BUNDLE_10-Children_REQUIRED
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
SCRIPT|oc_auth
SCRIPT|oc_couples
SCRIPT|oc_dialog
SCRIPT|oc_rlvsys
Expand Down
3 changes: 1 addition & 2 deletions src/installer/BUNDLE_20-Anims_REQUIRED
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
ITEM|back
ITEM|beautystand
ITEM|belly
ITEM|booty
ITEM|bop
ITEM|bracelets
ITEM|cutie
ITEM|display
Expand All @@ -23,6 +21,7 @@ ITEM|~hug
ITEM|~kiss
ITEM|~leap
ITEM|~footkiss
ITEM|~stiff
ITEM|~pet
ITEM|.couples
SCRIPT|oc_anim
3 changes: 1 addition & 2 deletions src/installer/BUNDLE_30-Other-Features_REQUIRED
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ SCRIPT|oc_detach
SCRIPT|oc_outfits
SCRIPT|oc_particle
SCRIPT|oc_resizer
SCRIPT|oc_themes
SCRIPT|oc_relay
ITEM|Turbo Safety RLV Relay
SCRIPT|oc_undress
ITEM|.license
ITEM|OpenCollar_Help
ITEM|s&p_leashholder
8 changes: 7 additions & 1 deletion src/installer/BUNDLE_40-Apps_OPTIONAL
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
SCRIPT|oc_bookmarks
SCRIPT|oc_capture
SCRIPT|oc_presets
SCRIPT|oc_undress
SCRIPT|oc_OwnerOnlineCheck
SCRIPT|oc_titler
SCRIPT|oc_undress
SCRIPT|oc_detach
SCRIPT|oc_outfits
SCRIPT|oc_bell
SCRIPT|oc_folders
3 changes: 2 additions & 1 deletion src/installer/BUNDLE_99_DEPRECATED
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ ITEM|bop
ITEM|beautystand
SCRIPT|oc_anticrash
SCRIPT|oc_meshthemes
LIKE|S&P
LIKE|S&P
SCRIPT|oc_outfits.RLV
55 changes: 54 additions & 1 deletion src/installer/oc_installer_bundles.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ SetStatus() {
}



list g_lChannels;
list g_lListeners;
list g_lItems;
list g_lTypes;
default
{
state_entry() {
Expand Down Expand Up @@ -122,6 +125,38 @@ default
}

listen(integer iChannel, string sName, key kID, string sMsg) {
integer iIndexChannels = llListFindList(g_lChannels, [iChannel]);
if(iIndexChannels != -1){
// -> //
integer iLstn = llList2Integer(g_lListeners,iIndexChannels);
string sItem = llList2String(g_lItems, iIndexChannels);
string sType = llList2String(g_lTypes, iIndexChannels);
g_lChannels = llDeleteSubList(g_lChannels, iIndexChannels, iIndexChannels);
g_lListeners = llDeleteSubList(g_lListeners, iIndexChannels, iIndexChannels);
g_lItems = llDeleteSubList(g_lItems, iIndexChannels, iIndexChannels);
g_lTypes = llDeleteSubList(g_lTypes, iIndexChannels, iIndexChannels);

llListenRemove(iLstn);
if(sMsg == "Skip"){
g_iLine++;
g_kLineID = llGetNotecardLine(g_sCard, g_iLine);
} else if(sMsg == "Install"){
if (sType == "ITEM") {
llGiveInventory(g_kRCPT, sItem);
} else if (sType == "SCRIPT") {
llRemoteLoadScriptPin(g_kRCPT, sItem, g_iPin, TRUE, 1);
} else if (sType == "STOPPEDSCRIPT") {
llRemoteLoadScriptPin(g_kRCPT, sItem, g_iPin, FALSE, 1);
}
g_iLine++;
g_kLineID = llGetNotecardLine(g_sCard, g_iLine);
} else if(sMsg == "Remove"){
llRegionSayTo(g_kRCPT, g_iTalkChannel, sType+"|"+sItem+"|"+(string)NULL_KEY+"|DEPRECATED");
}

return;
}

// let's live on the edge and assume that we only ever listen with a uuid filter so we know it's safe
// look for msgs in the form <type>|<name>|<cmd>
list lParts = llParseString2List(sMsg, ["|"], []);
Expand All @@ -144,6 +179,24 @@ default
}
g_iLine++;
g_kLineID = llGetNotecardLine(g_sCard, g_iLine);
} else if(sCmd == "PROMPT_INSTALL"){
//Do prompt
g_lChannels += [llRound(llFrand(5437845))];
g_lListeners += [llListen(llList2Integer(g_lChannels, -1), "", llGetOwner(), "")];
g_lItems += [sItemName];
g_lTypes += [sType];


llDialog(llGetOwner(), "[OpenCollar Installer]\nCurrent Item: "+sItemName+"\n\n* Install\t\t- This optional item is not installed. If you wish to install, select this item\n* Skip\t\t- Skip and do not install this optional item", ["Install", "Skip"], llList2Integer(g_lChannels, -1));
} else if(sCmd == "PROMPT_REMOVE"){

g_lChannels += [llRound(llFrand(5437845))];
g_lListeners += [llListen(llList2Integer(g_lChannels, -1), "", llGetOwner(), "")];
g_lItems += [sItemName];
g_lTypes += [sType];


llDialog(llGetOwner(), "[OpenCollar Installer]\nCurrent Item: "+sItemName+"\n\n* Remove\t\t- This optional item is currently installed. If you wish to uninstall, select this option\n* Skip\t\t- Skip and do not change this optional item", ["Remove", "Skip"], llList2Integer(g_lChannels, -1));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/installer/oc_installer_sys.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ ReadName() {
}

SetFloatText() {
llSetText(g_sObjectType+"\n\n "+g_sName+"\nBuild Version: "+g_sBuildVersion, <1,1,1>, 1.0);
llSetText(g_sObjectType+"\n\n "+g_sName/*+"\nBuild Version: "+g_sBuildVersion*/, <1,1,1>, 1.0);
}

Particles(key kTarget) {
Expand Down
5 changes: 3 additions & 2 deletions src/installer/oc_update_shim.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ default {

listen(integer iChannel, string sWho, key kID, string sMsg) {
if (llGetOwnerKey(kID) != llGetOwner()) return;
//llSay(0, "FROM UPDATER: "+sMsg);

list lParts = llParseString2List(sMsg, ["|"], []);
if (llGetListLength(lParts) == 4) {
Expand Down Expand Up @@ -206,10 +207,10 @@ default {
} else if (sMode == "OPTIONAL") {
// only update if present but outdated. skip if absent.
if (llGetInventoryType(sName) == INVENTORY_NONE) {
sCmd = "SKIP";
sCmd = "PROMPT_INSTALL";
} else {
if (llGetInventoryKey(sName) == kUUID && kUUID != NULL_KEY) {
sCmd = "SKIP";
sCmd = "PROMPT_REMOVE";
} else {
// we have it but it's the wrong version. delete and get new one.
llRemoveInventory(sName);
Expand Down
52 changes: 52 additions & 0 deletions src/remote/oc_remote.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,43 @@ string BTN_TEXTURE = "da46036f-7f4d-59e5-3fcf-a43d692e3ea7";
integer BTN_XS = 3;
integer BTN_YS = 9;

integer UPDATE_AVAILABLE=FALSE;
integer g_iAmNewer=FALSE;
string NEW_VERSION = "";
string HUD_VERSION = "8.0.1000";

key g_kUpdateCheck = NULL_KEY;
DoCheckUpdate(){
g_kUpdateCheck = llHTTPRequest("https://raw.githubusercontent.com/OpenCollarTeam/OpenCollar/master/web/remote.txt",[],"");
}

Compare(string V1, string V2){
NEW_VERSION=V2;

if(V1==V2){
UPDATE_AVAILABLE=FALSE;
return;
}
V1 = llDumpList2String(llParseString2List(V1, ["."],[]),"");
V2 = llDumpList2String(llParseString2List(V2, ["."],[]), "");
integer iV1 = (integer)V1;
integer iV2 = (integer)V2;

if(iV1 < iV2){
UPDATE_AVAILABLE=TRUE;
g_iAmNewer=FALSE;
} else if(iV1 == iV2) return;
else if(iV1 > iV2){
UPDATE_AVAILABLE=FALSE;
g_iAmNewer=TRUE;

llSetText("", <1,0,0>,1);
}
}
string MajorMinor(){
list lTmp = llParseString2List(HUD_VERSION,["."],[]);
return llList2String(lTmp,0)+"."+llList2String(lTmp,1);
}
integer g_iVertical = TRUE; // can be vertical?
integer g_iLayout = 1; // 0 - Horisontal, 1 - Vertical

Expand Down Expand Up @@ -483,12 +519,14 @@ default
llOwnerSay("HUD is ready with "+(string)llGetFreeMemory()+"b free memory");
g_lFavorites = [(string)llGetOwner()];
llMessageLinked(LINK_SET,-10,"","");
DoCheckUpdate();
}

attach(key id){
if(id!=NULL_KEY){
Recalc();
llOwnerSay("Ready");
DoCheckUpdate();
}
}

Expand All @@ -502,6 +540,7 @@ default
on_rez(integer iRez){
Recalc();
llOwnerSay("Ready");
DoCheckUpdate();
}

no_sensor()
Expand Down Expand Up @@ -671,6 +710,19 @@ default
g_kProfilePic=NULL_KEY;
llOwnerSay("Error when retrieving profile picture");
}
} else if(kReq == g_kUpdateCheck){
if(iStat==200){
Compare(HUD_VERSION, sBody);
if(g_iAmNewer){
llOwnerSay("Your current remote version is newer than the release version");
}

if(UPDATE_AVAILABLE){
llOwnerSay("UPDATE AVAILABLE: A new remote update is available. Please obtain it from OpenCollar");
}
}else{
llOwnerSay("An error was detected while checking for an update. The server returned a invalid status code");
}
}
}

Expand Down
1 change: 1 addition & 0 deletions web/ao.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.1
2 changes: 1 addition & 1 deletion web/dev_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.0400
8.0.1000
2 changes: 1 addition & 1 deletion web/remote.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6
8.0.1000
2 changes: 1 addition & 1 deletion web/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4
8.0.1000
1 change: 0 additions & 1 deletion web/~ao

This file was deleted.

0 comments on commit 56f493e

Please sign in to comment.