Add code that forces an error if compiled in LSO to all scripts

This should prevent accidents when saving in inventory in the official viewer.
This commit is contained in:
Sei Lisa 2018-05-18 00:28:02 +02:00 committed by Sei-Lisa
parent 9c84243390
commit f1ec6bde26
22 changed files with 46 additions and 32 deletions

View file

@ -24,7 +24,7 @@ integer notecard_section;
integer SCRIPT_CHANNEL;
string myPose;
key mySitter;
list camera_triggers;
list camera_triggers = [myPose]; //OSS::list camera_triggers; // Force error in LSO
list camera_settings;
integer lastByButton = -1;
string lastPose;
@ -109,6 +109,7 @@ default
state_entry()
{
camera_triggers = [];
SCRIPT_CHANNEL = (integer)llGetSubString(llGetScriptName(), llSubStringIndex(llGetScriptName(), " "), 99999);
notecard_key = llGetInventoryKey(notecard_name);
if (llGetInventoryType(notecard_name) == INVENTORY_NOTECARD)

View file

@ -19,6 +19,7 @@
integer COMM_CHANNEL = -57841689;
integer comm_handle;
list A = [comm_handle]; //OSS::list A; // Force error if not compiled in Mono
list findPrimsWithSubstring(string name)
{

View file

@ -77,7 +77,7 @@ integer COMM_CHANNEL = -57841689;
integer comm_handle;
key avatar;
list links;
list ring_prims;
list ring_prims = [avatar]; //OSS::list ring_prims; // Force error if not compiled in Mono
integer all_poses = -2; // cache the position of the "*" if it exists, for performance
goChain(list new_links)

View file

@ -27,7 +27,7 @@ list XCITE_TILT;
integer TIMER_DEFAULT = 30;
string CURRENT_POSE;
list TIMERS;
list SITTERS;
list SITTERS = [CURRENT_POSE]; //OSS::list SITTERS; // Force error if not compiled in Mono
integer DEBUG;
Out(integer level, string out)

View file

@ -27,7 +27,7 @@ key SLAVE;
string menu;
integer menuPage;
list folderPath;
list folderOptions;
list folderOptions = [menu]; //OSS::list folderOptions; // Force error in LSO
list folderNamesFullLength;
list CLOTHING_LAYERS = ["gloves", "jacket", "pants", "shirt", "shoes", "skirt", "socks", "underpants", "undershirt", "", "", "", "", "alpha", "tattoo"];
list ATTACHMENT_POINTS = ["", "chest", "skull", "left shoulder", "right shoulder", "left hand", "right hand", "left foot", "right foot", "spine", "pelvis", "mouth", "chin", "left ear", "right ear", "left eyeball", "right eyeball", "nose", "r upper arm", "r forearm", "l upper arm", "l forearm", "right hip", "r upper leg", "r lower leg", "left hip", "l upper leg", "l lower leg", "stomach", "left pec", "right pec", "", "", "", "", "", "", "", "", "neck", "root"];

View file

@ -49,7 +49,7 @@ integer SEARCHhandle;
integer CHECKhandle;
integer ASKROLEhandle;
list DETECTED_AVATAR_SHORTNAMES;
list DETECTED_AVATAR_KEYS;
list DETECTED_AVATAR_KEYS = [WAITPOSE]; //OSS::list DETECTED_AVATAR_KEYS; // Force error in LSO
integer awaiting_results;
string baseCaptureRestrictions = "@unsit=n";
string baseReleaseRestrictions = "@unsit=force";

View file

@ -22,7 +22,7 @@ list DESIGNATIONS_NOW;
key CONTROLLER = NULL_KEY;
integer KEY_TAKEN;
string CONTROLLER_NAME;
list SITTERS_MENUKEYS;
list SITTERS_MENUKEYS = [CONTROLLER_NAME]; //OSS::list SITTERS_MENUKEYS; // Force error in LSO
list SITTERS_SHORTNAMES;
integer menu_channel;
integer menu_handle;

View file

@ -57,7 +57,7 @@ list anim_animsequences;
list running_uuid;
list running_sequence_indexes;
list running_pointers;
list SITTERS;
list SITTERS = [key_request]; //OSS::list SITTERS; // Force error in LSO
list SITTER_POSES;
integer get_number_of_scripts()

View file

@ -29,7 +29,7 @@ string last_menu_avatar;
integer menu_channel;
key notecard_key;
key notecard_query;
list MENU_LIST;
list MENU_LIST = [custom_text]; //OSS::list MENU_LIST; // Force error in LSO
list DATA_LIST;
integer MTYPE;
integer LMSOURCE = 0; //lmsource self = 0, lmsource linkset = 1
@ -314,6 +314,7 @@ default
{
remove_script("Use only one copy of this script!");
}
MENU_LIST = [];
check_avsit();
notecard_key = llGetInventoryKey(notecard_name);
Out(0, "Loading...");

View file

@ -25,6 +25,7 @@ integer experience_denied_reason;
key originalowner;
key parentkey;
key give_prop_warning_request;
list A = [parentkey]; //OSS::list A; // Force error in LSO
unsit_all()
{
@ -90,7 +91,9 @@ state prop
}
//LSL::
parentkey = llList2String(llGetObjectDetails(llGetKey(), [OBJECT_REZZER_KEY]), 0);
parentkey = llList2String(llGetObjectDetails(llGetKey(), [OBJECT_REZZER_KEY]) + A, 0);
A = [];
if(llGetStartParameter() && !llList2Integer(llGetObjectDetails(parentkey, [OBJECT_ATTACHED_POINT]), 0))
{
llSetTimerEvent(10);

View file

@ -34,7 +34,7 @@ list prop_groups;
list prop_points;
list sequential_prop_groups;
integer HAVENTNAGGED = TRUE;
list SITTERS;
list SITTERS = [key_request]; //OSS::list SITTERS; // Force error in LSO
list SITTER_POSES;
list ATTACH_POINTS =
[ ATTACH_CHEST, "chest"

View file

@ -28,7 +28,7 @@ list SEQUENCE_DATA_ACTIONS;
list SEQUENCE_DATA_DATAS;
string CURRENT_SEQUENCE_NAME;
list CURRENT_SEQUENCE_ACTIONS;
list CURRENT_SEQUENCE_DATAS;
list CURRENT_SEQUENCE_DATAS = [CURRENT_SEQUENCE_NAME]; //OSS::list CURRENT_SEQUENCE_DATAS; // Force error in LSO
integer SEQUENCE_LINKNUMBER = 90210;
integer SEQUENCE_POINTER = -1;
integer sequence_running;

View file

@ -17,9 +17,9 @@
string product = "AVsitter2 MLP converter";
string version = "2.2";
string notecard_basename = "AVpos";
list NOTECARDS;
list PROPS_NOTECARDS;
string notecard_name;
list NOTECARDS = [notecard_name]; //OSS::list NOTECARDS; // Force error in LSO
list PROPS_NOTECARDS;
key notecard_query;
integer notecard_line;
integer notecard_pointer;
@ -98,6 +98,7 @@ default
{
Out(0, "Reading MLP notecards...");
Readout_Say(" ");
NOTECARDS = [];
get_notecards();
if (llGetListLength(NOTECARDS) > 0)
{

View file

@ -17,7 +17,7 @@
string notecard_basename = "AVpos";
integer variable1;
key notecard_query;
list ALL_USED_ANIMS;
list ALL_USED_ANIMS = [notecard_query]; //OSS::list ALL_USED_ANIMS; // Force error in LSO
list UNUSED_ANIMS;
integer NOT_FOUND_COUNT;
integer IS_VARIABLE_SPEED_SUBMENU;
@ -43,6 +43,7 @@ default
{
state_entry()
{
ALL_USED_ANIMS = [];
if (llGetInventoryType(notecard_basename) == INVENTORY_NOTECARD)
{
Owner_Say(" ");
@ -65,9 +66,9 @@ default
if (query_id == notecard_query)
{
if (data == EOF)
{
{
if(!NOT_FOUND_COUNT){
Owner_Say("All anims referenced in the notecard were accounted for.");
Owner_Say("All anims referenced in the notecard were accounted for.");
}
else{
Owner_Say("Anims were used in the notecard but not found in inventory!");
@ -78,7 +79,7 @@ default
integer index;
integer isVariableSpeed;
string anim_basename = llGetInventoryName(INVENTORY_ANIMATION, i);
if(llListFindList(["+","-"], [llGetSubString(anim_basename, -1, -1)]) != -1)
{
index = llListFindList(ALL_USED_ANIMS, [llDeleteSubString(anim_basename,-1,-1)]);
@ -89,9 +90,9 @@ default
isVariableSpeed=TRUE;
}
}
index = llListFindList(ALL_USED_ANIMS, [anim_basename]);
if (index == -1 && llGetInventoryName(INVENTORY_ANIMATION, i) != "AVhipfix")
{
Owner_Say("Animation '" + llGetInventoryName(INVENTORY_ANIMATION, i) + "' found in inventory but not used in notecard!");
@ -138,7 +139,7 @@ default
Owner_Say("Variable-Speed Animation '" + llList2String(anims, i) + "-' not found in inventory!");
}
}
integer index = llListFindList(ALL_USED_ANIMS,[llList2String(anims, i)]);
if(index == -1){ //only add to the list if the anim has not appeared before
ALL_USED_ANIMS += llList2String(anims, i);
@ -146,9 +147,9 @@ default
}
else if(IS_VARIABLE_SPEED_SUBMENU == TRUE){
// prevent variable-Speed anims from being incorrectly tagged as surplus in cases where: they are included in multiple submenus/sitters and where only in some places the submenus aren't set as Variable-Speed submenus.
// ensure it stays TRUE if ANY of the submenus that the anim is used in are set as Variable-Speed submenus.
// ensure it stays TRUE if ANY of the submenus that the anim is used in are set as Variable-Speed submenus.
VARIABLE_SPEED_ANIMS=llListReplaceList(VARIABLE_SPEED_ANIMS,[TRUE],index,index);
}
}
}
}
else if (command == "MENU" || command == "SITTER")

View file

@ -16,10 +16,9 @@
/*
* Things not implemented:
* ~ perms of the object
* ~ creator of the object
* ~ which platform/world (OpenSim/SL)
*/
* ~ which platform/world (OpenSim/SL) and version
*/
integer sendToSupport=FALSE;
integer sendItems = TRUE;

View file

@ -44,7 +44,7 @@ integer adding_item_type;
string last_text;
integer menu_pages;
integer number_per_page = 9;
list chosen_animations;
list chosen_animations = [last_text]; //OSS::list chosen_animations; // Force error in LSO
string cache;
string webkey;
integer webcount;

View file

@ -30,6 +30,7 @@ vector default_size = <0.12,0.12,3.5>;
key key_request;
vector my_pos;
rotation my_rot;
list A = [CURRENT_AV]; // Force error in LSO //OSS::
stop_all_anims()
{
@ -70,7 +71,8 @@ set_text()
setup()
{
alpha = llList2Float(llGetPrimitiveParams([PRIM_COLOR, 0]), 1);
CURRENT_AV = "";
CURRENT_AV = llList2Key(A, 0); //OSS::CURRENT_AV = "";
A = []; //OSS::
vector size = default_size;
if (llGetCreator() != llGetInventoryCreator(llGetScriptName()))
{

View file

@ -24,10 +24,10 @@ integer active_script_channel;
integer menu_channel;
integer menu_handle;
list SIT_TYPES = ["ALL", "OWNER", "GROUP"];
list MENU_TYPES = ["ALL", "OWNER", "GROUP"];
integer SIT_INDEX;
integer MENU_INDEX;
string lastmenu;
list MENU_TYPES = [lastmenu]; //OSS::list MENU_TYPES; // Force error in LSO
integer pass_security(key id, string context)
{
@ -134,6 +134,7 @@ default
{
state_entry()
{
MENU_TYPES = SIT_TYPES;
llMessageLinked(LINK_SET, 90202, (string)check_for_RLV(), "");
}

View file

@ -16,6 +16,8 @@
string script_basename = "[AV]sitA";
string menu_script = "[AV]menu";
key A;
list B = [A]; //OSS::list B; // Force error in LSO
default
{
@ -23,7 +25,8 @@ default
{
if (llGetInventoryType(script_basename) != INVENTORY_SCRIPT && llGetInventoryType(menu_script) != INVENTORY_SCRIPT)
{
llMessageLinked(LINK_ALL_OTHERS, 90005, "", llDetectedKey(0));
llMessageLinked(LINK_ALL_OTHERS, 90005, llList2String(B, 0), llDetectedKey(0));
B = [];
}
}
}

View file

@ -27,7 +27,7 @@ string adjust_script = "[AV]adjuster";
string helper_object = "[AV]helper";
string CUSTOM_TEXT;
list SITTERS;
list SYNCS;
list SYNCS = [CUSTOM_TEXT]; //OSS::list SYNCS; // Force error in LSO
integer menu_channel;
integer menu_handle;
integer menu_type;
@ -97,6 +97,7 @@ default
menu_handle = llListen(menu_channel, "", "", "");
llListenControl(menu_handle, FALSE);
integer i;
SYNCS = [];
for (i = 0; i < get_number_of_scripts(); i++)
{
SITTERS += NULL_KEY;

View file

@ -27,7 +27,6 @@ list SITTERS;
integer SWAPPED;
key MY_SITTER;
key CONTROLLER;
list SITTER_INFO;
string CUSTOM_TEXT;
list ADJUST_MENU;
integer SET = -1;
@ -51,6 +50,7 @@ string FIRST_MALE_ANIMATION_SEQUENCE;
string FEMALE_POSENAME;
string FIRST_FEMALE_ANIMATION_SEQUENCE;
string CURRENT_ANIMATION_FILENAME;
list SITTER_INFO = [FIRST_POSENAME]; //OSS::list SITTER_INFO; // Force error in LSO
integer SEQUENCE_POINTER;
vector FIRST_POSITION;
vector FIRST_ROTATION;

View file

@ -33,7 +33,7 @@ string ADJUST_MENU;
string SITTER_INFO;
list MENU_LIST;
list DATA_LIST;
list POS_ROT_LIST;
list POS_ROT_LIST = [CUSTOM_TEXT]; //OSS::list POS_ROT_LIST; // Force error in LSO
integer helper_mode;
integer has_RLV;
integer ANIM_INDEX;