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,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 = "AVsitter™ Security 2.2";
string script_basename = "[AV]sitA";
string menucontrol_script = "[AV]root-control";
@ -26,6 +26,7 @@ list MENU_TYPES = ["ALL", "OWNER", "GROUP"];
integer SIT_INDEX;
integer MENU_INDEX;
string lastmenu;
integer pass_security(key id, string context)
{
integer ALLOWED = FALSE;
@ -47,6 +48,7 @@ integer pass_security(key id, string context)
}
return ALLOWED;
}
check_sitters()
{
integer i = llGetNumberOfPrims();
@ -61,14 +63,17 @@ check_sitters()
i--;
}
}
back_to_adjust(integer SCRIPT_CHANNEL, key sitter)
{
llMessageLinked(LINK_SET, 90101, (string)SCRIPT_CHANNEL + "|[ADJUST]", sitter);
}
list order_buttons(list menu_items)
{
return llList2List(menu_items, -3, -1) + llList2List(menu_items, -6, -4) + llList2List(menu_items, -9, -7) + llList2List(menu_items, -12, -10);
}
register_touch(key id, integer animation_menu_function, integer active_prim, integer giveFailedMessage)
{
if (pass_security(id, "MENU"))
@ -94,11 +99,13 @@ register_touch(key id, integer animation_menu_function, integer active_prim, int
llDialog(id, product + "\n\nSorry, Menu access is set to: " + llList2String(MENU_TYPES, MENU_INDEX), [], -164289491);
}
}
main_menu()
{
dialog("Sit access: " + llList2String(SIT_TYPES, SIT_INDEX) + "\nMenu access: " + llList2String(MENU_TYPES, MENU_INDEX) + "\n\nChange security settings:", ["[BACK]", "Sit", "Menu"]);
lastmenu = "";
}
dialog(string text, list menu_items)
{
llListenRemove(menu_handle);
@ -106,6 +113,7 @@ dialog(string text, list menu_items)
llDialog(llGetOwner(), product + "\n\n" + text, order_buttons(menu_items), menu_channel);
llSetTimerEvent(600);
}
integer check_for_RLV()
{
if (llGetInventoryType(RLV_script) == INVENTORY_SCRIPT)
@ -114,17 +122,20 @@ integer check_for_RLV()
}
return FALSE;
}
default
{
state_entry()
{
llMessageLinked(LINK_SET, 90202, (string)check_for_RLV(), "");
}
timer()
{
llSetTimerEvent(0);
llListenRemove(menu_handle);
}
link_message(integer sender, integer num, string msg, key id)
{
if (num == 90201)
@ -162,6 +173,7 @@ default
llListenRemove(menu_handle);
}
}
listen(integer listen_channel, string name, key id, string msg)
{
if (msg == "Sit")
@ -198,6 +210,7 @@ default
}
llListenRemove(menu_handle);
}
changed(integer change)
{
if (change & CHANGED_LINK)
@ -205,6 +218,7 @@ default
check_sitters();
}
}
touch_end(integer touched)
{
if (check_for_RLV() || llGetAgentSize(llGetLinkKey(llGetNumberOfPrims())) != ZERO_VECTOR)