Fix compile chain, and add final FFF version of boards
This commit is contained in:
parent
b1fc57b931
commit
a1a93ea994
17 changed files with 421 additions and 172 deletions
96
LSL/includes/functions.lsl
Normal file
96
LSL/includes/functions.lsl
Normal file
|
@ -0,0 +1,96 @@
|
|||
|
||||
MainMenu(key kAv)
|
||||
{
|
||||
list lAppend = [];
|
||||
// Check against ZNI Support roster
|
||||
integer iAdmin=0;
|
||||
string sAppend;
|
||||
string sTag = llList2String(llGetObjectDetails(kAv,[OBJECT_GROUP_TAG]),0);
|
||||
if(llListFindList(g_lSupport, [(string)kAv])!=-1 || llListFindList(g_lAdminTag, [sTag])!=-1){
|
||||
if(g_kLeasedTo!=NULL)lAppend += ["PermaLease"];
|
||||
iAdmin=1;
|
||||
|
||||
lAppend += ["Import", "Export", "MemStick"];
|
||||
}
|
||||
|
||||
if(llListFindList(g_lManagerTag, [sTag])!=-1)iAdmin=1;
|
||||
|
||||
if(g_kLeasedTo == NULL){
|
||||
lAppend += ["Lease"];
|
||||
}else if(g_kLeasedTo == kAv || iAdmin || g_kOwner == kAv){
|
||||
lAppend += ["End Lease", "Renew", "Set Picture", "Set Owner", "TransferLease", "Set Name", Checkbox(g_iWhiteFrame, "White Frame"), Checkbox(g_iLogo, "Logo"), Checkbox(g_iCustomTextColor, "CustomTxt"), "SetTxtC", "*RESET*"];
|
||||
|
||||
sAppend += "\n* CustomTxt, and SetTxtC relate to custom text colors.";
|
||||
}
|
||||
|
||||
if(g_kLeasedTo != NULL){
|
||||
lAppend += ["TimeRemain", "WhoLeased"];
|
||||
}
|
||||
|
||||
if(g_kOwner!=NULL)sAppend+="\nOwner is : secondlife:///app/agent/"+(string)g_kOwner+"/about";
|
||||
|
||||
Menu(g_kAuthorized, MAIN_MENU_TEXT+sAppend, MAIN_MENU_BUTTONS+lAppend, "menu~main");
|
||||
}
|
||||
Menu(key kAv, string sText, list lButtons, string sIdent)
|
||||
{
|
||||
llMessageLinked(LINK_THIS, LINK_MENU_DISPLAY, llDumpList2String([sIdent, "TRUE", sText, llDumpList2String(lButtons, "~")], "|"), kAv);
|
||||
}
|
||||
GetArbitraryData(key kAv, string sText, string sIdent){
|
||||
llMessageLinked(LINK_THIS, LINK_MENU_DISPLAY, llDumpList2String([sIdent, "FALSE", sText, ""], "|"), kAv);
|
||||
}
|
||||
|
||||
string StripResident(string a)
|
||||
{
|
||||
list lParam = llParseString2List(a,[" ", "."],[]);
|
||||
if(llGetListLength(lParam)==0 || llGetListLength(lParam)==1)return a;
|
||||
|
||||
if(llToLower(llList2String(lParam,1)) == "resident"){
|
||||
lParam = llDeleteSubList(lParam,1,1);
|
||||
}else return a;
|
||||
return llDumpList2String(lParam, " ");
|
||||
}
|
||||
|
||||
Text(){
|
||||
string sColor = GetColorStr(g_iWhiteFrame);
|
||||
g_sName = StripResident(g_sName);
|
||||
if(g_sPreferredName == ""){
|
||||
if(g_sDisplayName != g_sName)
|
||||
llMessageLinked(LINK_SET, 0,"<!c="+sColor+">"+ llGetSubString(g_sDisplayName+" ("+g_sName+")",0,23), "fw_data");
|
||||
else
|
||||
llMessageLinked(LINK_SET,0,"<!c="+sColor+">"+llGetSubString(g_sName,0,23),"fw_data");
|
||||
} else llMessageLinked(LINK_SET,0,"<!c="+sColor+">"+g_sPreferredName, "fw_data");
|
||||
}
|
||||
|
||||
CleanInventory()
|
||||
{
|
||||
list lDefaults = ["Board [ZNI]", "Dialog Module", "Text", "FFF Stall Board Flash Drive [ZNI]", "Update Module [ZNI]"];
|
||||
integer i=0;
|
||||
integer end = llGetInventoryNumber(INVENTORY_ALL);
|
||||
for(i=0;i<end;i++){
|
||||
string sName = llGetInventoryName(INVENTORY_ALL,i);
|
||||
if(llListFindList( lDefaults, [sName] ) == -1) {
|
||||
llRemoveInventory(sName);
|
||||
i=-1;
|
||||
end = llGetInventoryNumber(INVENTORY_ALL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SavePayload(){
|
||||
llRegionSay(0x99f9, llList2Json(JSON_OBJECT, ["op", "request", "get", "kvp_store", "var", "$.FFF."+llGetObjectDesc(), "val", llList2Json(JSON_OBJECT, ["lease", g_kLeasedTo, "texture", g_kTexture, "expire", g_iExpireAt, "owner", g_kOwner, "notif", g_iNotification, "name", g_sPreferredName, "whiteframe", g_iWhiteFrame, "logo", g_iLogo, "transfer", g_kTransferID, "transfer_expire", g_iTransferTimeout, "customtxtcolor", g_vCustomColorText, "usecustomtxt", g_iCustomTextColor])]));
|
||||
}
|
||||
|
||||
DeletePayload(){
|
||||
llRegionSay(0x99f9, llList2Json(JSON_OBJECT, ["op", "request", "get", "kvp_del", "var", "$.FFF."+llGetObjectDesc()]));
|
||||
}
|
||||
|
||||
string GetColorStr(integer iWhite)
|
||||
{
|
||||
if(g_iCustomTextColor){
|
||||
return (((string)g_vCustomColorText.x)+","+((string)g_vCustomColorText.y)+","+((string)g_vCustomColorText.z));
|
||||
}else {
|
||||
if(iWhite)return "0,0,0.5";
|
||||
else return "white"; // black frame
|
||||
}
|
||||
}
|
79
LSL/includes/variables.lsl
Normal file
79
LSL/includes/variables.lsl
Normal file
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
Global variables for stall board
|
||||
*/
|
||||
|
||||
#define DEVELOPER 0
|
||||
|
||||
|
||||
integer g_iWaitFor = 0;
|
||||
key FFF_CIRCLE_LOGO = "f063237e-429b-5e02-dbfb-8a2a69535cdc";
|
||||
key OFFLINE_TEXTURE = "62f26398-4d32-15fb-38d8-d59e31dd0a86";
|
||||
key ONLINE_TEXTURE = "69fdb503-d13b-8b21-98c9-70011db399d3";
|
||||
#if DEVELOPER == 0
|
||||
key AVAILABLE = "8833aa83-b7f1-5c40-f4e8-fdf6d397ef1b";
|
||||
#else
|
||||
key AVAILABLE = "8833aa83-b7f1-5c40-f4e8-fdf6d397ef1b";
|
||||
#endif
|
||||
|
||||
key NO_TEXTURE = "a67ed6f6-dca8-4ce4-a338-13ac5f32e9d0";
|
||||
|
||||
|
||||
list g_lAdminTag = ["FFF Stable Mistress", "FFF Stable Master"];
|
||||
list g_lManagerTag = ["FFF Trainer", "FFF Senior Trainer"];
|
||||
|
||||
|
||||
|
||||
integer LINK_MENU_DISPLAY = 300;
|
||||
integer LINK_MENU_REMOVE = 310;
|
||||
integer LINK_MENU_RETURN = 320;
|
||||
integer LINK_MENU_TIMEOUT = 330;
|
||||
|
||||
string g_sDate;
|
||||
|
||||
list MAIN_MENU_BUTTONS = ["Reboot"];
|
||||
string MAIN_MENU_TEXT = "";
|
||||
string IMPORT_MENU_TEXT = "";
|
||||
|
||||
key g_kInvLoad;
|
||||
key g_kTransferID=NULL_KEY;
|
||||
integer g_iTransferTimeout;
|
||||
integer g_iHaveKVP = 0;
|
||||
integer g_iLastKVPTry;
|
||||
|
||||
|
||||
string HEADER = "FFF Stall Board\n[By ZNI Creations]\nVersion 3.9.0430220029 (Apr 30, 2022)\n \n";
|
||||
|
||||
|
||||
integer g_iAuthorized;
|
||||
key g_kAuthorized;
|
||||
|
||||
key g_kLeasedTo=NULL_KEY;
|
||||
key g_kTexture=NULL_KEY;
|
||||
integer g_iExpireAt;
|
||||
key g_kOwner=NULL_KEY;
|
||||
string g_sPreferredName;
|
||||
integer g_iWhiteFrame = FALSE;
|
||||
|
||||
integer g_iNotification;
|
||||
|
||||
string g_sName;
|
||||
string g_sDisplayName;
|
||||
integer g_iOnline;
|
||||
|
||||
|
||||
integer g_iLogo=1;
|
||||
vector g_vCustomColorText;
|
||||
integer g_iCustomTextColor=FALSE;
|
||||
|
||||
|
||||
|
||||
integer g_iProtocol;
|
||||
integer g_iFill = 0;
|
||||
|
||||
string g_sPayload = "";
|
||||
|
||||
integer g_iNotifFlags; // (may be incompatible!)
|
||||
|
||||
|
||||
string g_sLeasedTo;
|
||||
key g_kTransferDest=NULL_KEY;
|
Loading…
Add table
Add a link
Reference in a new issue