Comment and formatting changes; no actual code changes.

- Add spaces between functions.
- Add comments on numeric codes and a few others.
- Reformat lists and one function.
- Remove spaces at EOL.
- Use actual copyright symbol.
This commit is contained in:
Sei Lisa 2017-08-14 19:19:48 +02:00 committed by Sei-Lisa
parent ef3adcce5e
commit 2488349a1b
26 changed files with 500 additions and 203 deletions

View file

@ -1,19 +1,20 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (c) the AVsitter Contributors (http://avsitter.github.io)
* Copyright © the AVsitter Contributors (http://avsitter.github.io)
* AVsitter™ is a trademark. For trademark use policy see:
* https://avsitter.github.io/TRADEMARK.mediawiki
*
*
* Please consider supporting continued development of AVsitter and
* receive automatic updates and other benefits! All details and user
* receive automatic updates and other benefits! All details and user
* instructions can be found at http://avsitter.github.io
*/
string notecard_basename = "AVpos";
string name = "Anim";
Readout_Say(string say)
{
llSleep(0.2);
@ -22,6 +23,7 @@ Readout_Say(string say)
llRegionSayTo(llGetOwner(), 0, "◆" + say);
llSetObjectName(objectname);
}
default
{
state_entry()

View file

@ -1,17 +1,17 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (c) the AVsitter Contributors (http://avsitter.github.io)
* Copyright © the AVsitter Contributors (http://avsitter.github.io)
* AVsitter™ is a trademark. For trademark use policy see:
* https://avsitter.github.io/TRADEMARK.mediawiki
*
*
* Please consider supporting continued development of AVsitter and
* receive automatic updates and other benefits! All details and user
* receive automatic updates and other benefits! All details and user
* instructions can be found at http://avsitter.github.io
*/
float version = 1.2;
string notecard_name = "AVpos";
string url = "https://avsitter.com/settings.php"; // the settings dump service remains up for AVsitter customers. settings clear periodically.
@ -24,14 +24,18 @@ vector pos_offset;
string cache;
string webkey;
integer webcount;
web(string say, integer force){
cache+=say;
if(llStringLength(llEscapeURL(cache))>1024 || force){
web(string say, integer force)
{
cache += say;
if (llStringLength(llEscapeURL(cache)) > 1024 || force)
{
webcount++;
llHTTPRequest(url, [HTTP_METHOD,"POST",HTTP_MIMETYPE,"application/x-www-form-urlencoded",HTTP_VERIFY_CERT,FALSE], "w="+webkey+"&c="+(string)webcount+"&t="+llEscapeURL(cache));
cache="";
llHTTPRequest(url, [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/x-www-form-urlencoded", HTTP_VERIFY_CERT, FALSE], "w=" + webkey + "&c=" + (string)webcount + "&t=" + llEscapeURL(cache));
cache = "";
}
}
integer IsVector(string s)
{
list split = llParseString2List(s, [" "], ["<", ">", ","]);
@ -39,6 +43,7 @@ integer IsVector(string s)
return FALSE;
return !((string)((vector)s) == (string)((vector)((string)llListInsertList(split, ["-"], 5))));
}
string FormatFloat(float f, integer num_decimals)
{
float rounding = (float)(".5e-" + (string)num_decimals) - 5e-07;
@ -60,10 +65,12 @@ string FormatFloat(float f, integer num_decimals)
}
return ret;
}
instructions()
{
llOwnerSay("\n\nINSTRUCTIONS:\n\nFOR MOVING ALL POSE & PROP POSITIONS BY AN OFFSET:\nManual Position: specify a position offset on channel 5, and positions will be converted by that offset. E.g. /5 <0,0,1.5>\nManual Rotation: specify a rotation offset on channel 6 (in degrees), and rotations will be converted by that offset, relative to the prim center. E.g. /6 <0,0,180>\n\nFOR RELOCATING SCRIPTS TO NEW PRIM:\n1. Unlink your object and re-link so that the prim you want to move the animations from is the root prim, then place this script inside the root prim.\n2. Touch the prim you want to locate the poses to. This prim should be empty or contain a script with llPassTouches(TRUE);\n3. The script will read out the notecard in chat, with pos/rot modified to the prim you touched.\n\nHave Fun! :)\n");
}
cut_above_text()
{
webkey = (string)llGenerateKey();
@ -72,12 +79,14 @@ cut_above_text()
Readout_Say("--✄--COPY BELOW INTO \"AVpos\" NOTECARD--✄--");
Readout_Say("");
}
cut_below_text()
{
Readout_Say("");
Readout_Say("--✄--COPY ABOVE INTO \"AVpos\" NOTECARD--✄--");
Readout_Say("");
}
Readout_Say(string say)
{
llSleep(0.1);
@ -85,8 +94,9 @@ Readout_Say(string say)
llSetObjectName("");
llRegionSayTo(llGetOwner(), 0, "◆" + say);
llSetObjectName(objectname);
web(say+"\n",FALSE);
web(say + "\n", FALSE);
}
integer check_in_root()
{
if (llGetLinkNumber() > 1 || llGetInventoryType("AVpos") != INVENTORY_NOTECARD)
@ -100,6 +110,7 @@ integer check_in_root()
}
return TRUE;
}
default
{
state_entry()
@ -109,6 +120,7 @@ default
llListen(5, "", llGetOwner(), "");
llListen(6, "", llGetOwner(), "");
}
touch_start(integer touched)
{
check_in_root();
@ -122,6 +134,7 @@ default
notecard_query = llGetNotecardLine(notecard_name, notecard_line);
}
}
listen(integer chan, string name, key id, string msg)
{
if (chan == 5)
@ -155,6 +168,7 @@ default
}
}
}
dataserver(key query_id, string data)
{
if (query_id == notecard_query)

View file

@ -1,21 +1,22 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (c) the AVsitter Contributors (http://avsitter.github.io)
* Copyright © the AVsitter Contributors (http://avsitter.github.io)
* AVsitter™ is a trademark. For trademark use policy see:
* https://avsitter.github.io/TRADEMARK.mediawiki
*
*
* Please consider supporting continued development of AVsitter and
* receive automatic updates and other benefits! All details and user
* receive automatic updates and other benefits! All details and user
* instructions can be found at http://avsitter.github.io
*/
Owner_Say(string say)
{
llOwnerSay(llGetScriptName() + ": " + say);
}
default
{
state_entry()

View file

@ -1,17 +1,17 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (c) the AVsitter Contributors (http://avsitter.github.io)
* Copyright © the AVsitter Contributors (http://avsitter.github.io)
* AVsitter™ is a trademark. For trademark use policy see:
* https://avsitter.github.io/TRADEMARK.mediawiki
*
*
* Please consider supporting continued development of AVsitter and
* receive automatic updates and other benefits! All details and user
* receive automatic updates and other benefits! All details and user
* instructions can be found at http://avsitter.github.io
*/
string product = "AVsitter2 MLP converter";
string version = "2.2";
string notecard_basename = "AVpos";
@ -25,6 +25,7 @@ integer animator_count;
integer animator_total;
list ommit = ["default", "stand"];
integer verbose = 0;
Out(integer level, string out)
{
if (verbose >= level)
@ -32,6 +33,7 @@ Out(integer level, string out)
llOwnerSay(llGetScriptName() + "[" + version + "] " + out);
}
}
string FormatFloat(float f, integer num_decimals)
{
float rounding = (float)(".5e-" + (string)num_decimals) - 5e-07;
@ -53,6 +55,7 @@ string FormatFloat(float f, integer num_decimals)
}
return ret;
}
finish()
{
if (llSubStringIndex(llGetObjectName(), "Utilities") == -1) // remove it except from Utilities box
@ -61,6 +64,7 @@ finish()
llRemoveInventory(llGetScriptName());
}
}
get_notecards()
{
integer i;
@ -77,6 +81,7 @@ get_notecards()
}
}
}
Readout_Say(string say)
{
string objectname = llGetObjectName();
@ -84,6 +89,7 @@ Readout_Say(string say)
llRegionSayTo(llGetOwner(), 0, "◆" + say);
llSetObjectName(objectname);
}
default
{
state_entry()
@ -105,6 +111,7 @@ default
finish();
}
}
dataserver(key query_id, string data)
{
if (query_id == notecard_query)

View file

@ -1,26 +1,28 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (c) the AVsitter Contributors (http://avsitter.github.io)
* Copyright © the AVsitter Contributors (http://avsitter.github.io)
* AVsitter™ is a trademark. For trademark use policy see:
* https://avsitter.github.io/TRADEMARK.mediawiki
*
*
* Please consider supporting continued development of AVsitter and
* receive automatic updates and other benefits! All details and user
* receive automatic updates and other benefits! All details and user
* instructions can be found at http://avsitter.github.io
*/
string notecard_basename = "AVpos";
integer variable1;
key notecard_query;
list ALL_USED_ANIMATIONS;
list UNUSED_ANIMS;
Owner_Say(string say)
{
llOwnerSay(llGetScriptName() + ": " + say);
}
finish()
{
Owner_Say("Check complete, removing script.");
@ -31,6 +33,7 @@ finish()
llRemoveInventory(llGetScriptName());
}
}
default
{
state_entry()
@ -51,6 +54,7 @@ default
}
}
}
dataserver(key query_id, string data)
{
if (query_id == notecard_query)
@ -100,6 +104,7 @@ default
}
}
}
listen(integer chan, string name, key id, string msg)
{
if (msg == "YES")
@ -116,6 +121,7 @@ default
}
finish();
}
timer()
{
Owner_Say("timeout");

View file

@ -3,23 +3,26 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (c) the AVsitter Contributors (http://avsitter.github.io)
* Copyright © the AVsitter Contributors (http://avsitter.github.io)
* AVsitter™ is a trademark. For trademark use policy see:
* https://avsitter.github.io/TRADEMARK.mediawiki
*
*
* Please consider supporting continued development of AVsitter and
* receive automatic updates and other benefits! All details and user
* instructions can be found at http://avsitter.github.io
*/
/*
* Simple script used for updating a large number of furniture items at once
* This script goes in each furniture prim that expects an update from the sender
* will auto-delete if a non-admin avatar rezzes the furniture
*/
integer pin = -29752;
// Enter the list of allowed avatar UUIDs here.
list admin_avatars = ["b30c9262-9abf-4cd1-9476-adcf5723c029", "f2e0ed5e-6592-4199-901d-a659c324ca94"];
default
{
state_entry()
@ -38,6 +41,7 @@ default
llSetRemoteScriptAccessPin(pin);
llListen(pin, "", "", "");
}
timer()
{
if (llGetLinkNumber() == 0 || llGetLinkNumber() == 1 && llGetInventoryType("[AV]object") != INVENTORY_SCRIPT)
@ -49,6 +53,7 @@ default
}
llSetTimerEvent(10);
}
on_rez(integer start)
{
if (start)
@ -61,6 +66,7 @@ default
llRemoveInventory(llGetScriptName());
}
}
listen(integer chan, string name, key id, string msg)
{
if (llGetOwnerKey(id) == llGetOwner())
@ -84,6 +90,7 @@ default
}
}
}
changed(integer change)
{
if (change & CHANGED_OWNER)

View file

@ -1,24 +1,24 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (c) the AVsitter Contributors (http://avsitter.github.io)
* Copyright © the AVsitter Contributors (http://avsitter.github.io)
* AVsitter™ is a trademark. For trademark use policy see:
* https://avsitter.github.io/TRADEMARK.mediawiki
*
*
* Please consider supporting continued development of AVsitter and
* receive automatic updates and other benefits! All details and user
* receive automatic updates and other benefits! All details and user
* instructions can be found at http://avsitter.github.io
*/
/*
* Simple script used for updating a large number of furniture items at once
* This script goes in a "sender" prim along with the latest copies of the
* (not running) scripts and inventory objects (e.g. prop objects)
* This script goes in a "sender" prim along with the latest copies of the
* (not running) scripts and inventory objects (e.g. prop objects)
* Touching the sender will shout in a radius and update all prims that respond.
*/
integer pin = -29752;
string receiver_script = "update receiver (auto removing)";
list objects_to_update;
@ -26,12 +26,13 @@ list objects_files;
integer menu_handle;
key av;
integer listenhandle;
particles_on(key target)
{
llParticleSystem([
PSYS_PART_FLAGS, 0 | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_FOLLOW_VELOCITY_MASK | PSYS_PART_EMISSIVE_MASK | PSYS_PART_TARGET_POS_MASK,
PSYS_SRC_PATTERN, 0 | PSYS_SRC_PATTERN_DROP,
PSYS_PART_START_ALPHA, 1.00000,
PSYS_PART_START_ALPHA, 1.0,
PSYS_PART_END_ALPHA, 1,
PSYS_PART_START_COLOR, <1, 0, 0>,
PSYS_PART_END_COLOR, <0, 0, 1>,
@ -41,32 +42,35 @@ particles_on(key target)
PSYS_SRC_MAX_AGE, 0,
PSYS_SRC_ACCEL, <0, 0, 0>,
PSYS_SRC_BURST_PART_COUNT, 250,
PSYS_SRC_BURST_RADIUS, 0.00000,
PSYS_SRC_BURST_RADIUS, 0.0,
PSYS_SRC_BURST_RATE, 0.05766,
PSYS_SRC_BURST_SPEED_MIN, 0.07813,
PSYS_SRC_BURST_SPEED_MAX, 0.15625,
PSYS_SRC_INNERANGLE, 0.09375,
PSYS_SRC_OUTERANGLE, 0.00000,
PSYS_SRC_OUTERANGLE, 0.0,
PSYS_SRC_OMEGA, <0, 0, 0>,
PSYS_SRC_TEXTURE, (key)"",
PSYS_SRC_TARGET_KEY, target
]);
}
default
{
state_entry()
{
llParticleSystem([]);
listenhandle=llListen(pin, "", "", "");
listenhandle = llListen(pin, "", "", "");
}
on_rez(integer x)
{
llResetScript();
}
timer()
{
llSetTimerEvent(0);
llListenRemove(listenhandle);
llSetTimerEvent(0);
llListenRemove(listenhandle);
llRegionSayTo(av, 0, "Found " + (string)llGetListLength(objects_to_update) + " objects...");
integer i;
for (i = 0; i < llGetListLength(objects_to_update); i++)
@ -146,6 +150,7 @@ default
llRegionSayTo(av, 0, "Updating Complete!");
llResetScript();
}
touch_start(integer touched)
{
if (llDetectedKey(0) == llGetOwner() || llSameGroup(llDetectedKey(0)))
@ -167,6 +172,7 @@ default
llSay(pin, "OBJECT_SEARCH|" + llDumpList2String(items, "|"));
}
}
listen(integer chan, string name, key id, string msg)
{
if (llGetOwnerKey(id) == llGetOwner())