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:
parent
ef3adcce5e
commit
2488349a1b
26 changed files with 500 additions and 203 deletions
|
@ -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
|
||||
*/
|
||||
|
||||
|
||||
integer OLD_HELPER_METHOD;
|
||||
key key_request;
|
||||
string url = "https://avsitter.com/settings.php"; // the settings dump service remains up for AVsitter customers. settings clear periodically.
|
||||
|
@ -46,6 +46,7 @@ list chosen_animations;
|
|||
string cache;
|
||||
string webkey;
|
||||
integer webcount;
|
||||
|
||||
string FormatFloat(float f, integer num_decimals)
|
||||
{
|
||||
float rounding = (float)(".5e-" + (string)num_decimals) - 5e-07;
|
||||
|
@ -67,6 +68,7 @@ string FormatFloat(float f, integer num_decimals)
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
web(integer force)
|
||||
{
|
||||
if (llStringLength(llEscapeURL(cache)) > 1024 || force)
|
||||
|
@ -81,6 +83,7 @@ web(integer force)
|
|||
cache = "";
|
||||
}
|
||||
}
|
||||
|
||||
Readout_Say(string say)
|
||||
{
|
||||
string objectname = llGetObjectName();
|
||||
|
@ -91,6 +94,7 @@ Readout_Say(string say)
|
|||
say = "";
|
||||
web(FALSE);
|
||||
}
|
||||
|
||||
stop_all_anims(key id)
|
||||
{
|
||||
list animations = llGetAnimationList(id);
|
||||
|
@ -100,14 +104,17 @@ stop_all_anims(key id)
|
|||
llMessageLinked(LINK_THIS, 90002, llList2String(animations, i), id);
|
||||
}
|
||||
}
|
||||
|
||||
list order_buttons(list buttons)
|
||||
{
|
||||
return llList2List(buttons, -3, -1) + llList2List(buttons, -6, -4) + llList2List(buttons, -9, -7) + llList2List(buttons, -12, -10);
|
||||
}
|
||||
|
||||
string strReplace(string str, string search, string replace)
|
||||
{
|
||||
return llDumpList2String(llParseStringKeepNulls((str = "") + str, [search], []), replace);
|
||||
}
|
||||
|
||||
preview_anim(string anim, key id)
|
||||
{
|
||||
if (id)
|
||||
|
@ -116,6 +123,7 @@ preview_anim(string anim, key id)
|
|||
llMessageLinked(LINK_THIS, 90001, anim, id);
|
||||
}
|
||||
}
|
||||
|
||||
list get_choices()
|
||||
{
|
||||
integer my_number_per_page = number_per_page;
|
||||
|
@ -129,7 +137,28 @@ list get_choices()
|
|||
integer end = start + my_number_per_page;
|
||||
if (adding == "[FACE]")
|
||||
{
|
||||
list facial_anim_list = ["none", "express_afraid_emote", "express_anger_emote", "express_laugh_emote", "express_bored_emote", "express_cry_emote", "express_embarrassed_emote", "express_sad_emote", "express_toothsmile", "express_smile", "express_surprise_emote", "express_worry_emote", "express_repulsed_emote", "express_shrug_emote", "express_wink_emote", "express_disdain", "express_frown", "express_kiss", "express_open_mouth", "express_tongue_out"];
|
||||
list facial_anim_list =
|
||||
[ "none"
|
||||
, "express_afraid_emote"
|
||||
, "express_anger_emote"
|
||||
, "express_laugh_emote"
|
||||
, "express_bored_emote"
|
||||
, "express_cry_emote"
|
||||
, "express_embarrassed_emote"
|
||||
, "express_sad_emote"
|
||||
, "express_toothsmile"
|
||||
, "express_smile"
|
||||
, "express_surprise_emote"
|
||||
, "express_worry_emote"
|
||||
, "express_repulsed_emote"
|
||||
, "express_shrug_emote"
|
||||
, "express_wink_emote"
|
||||
, "express_disdain"
|
||||
, "express_frown"
|
||||
, "express_kiss"
|
||||
, "express_open_mouth"
|
||||
, "express_tongue_out"
|
||||
];
|
||||
i = llGetListLength(facial_anim_list);
|
||||
options = llList2List(facial_anim_list, start, end - 1);
|
||||
}
|
||||
|
@ -154,10 +183,12 @@ list get_choices()
|
|||
menu_pages = llCeil((float)i / my_number_per_page);
|
||||
return options;
|
||||
}
|
||||
|
||||
ask_anim()
|
||||
{
|
||||
choice_menu(get_choices(), "Choose anim" + sitter_text(sitter_count) + ":");
|
||||
}
|
||||
|
||||
choice_menu(list options, string menu_text)
|
||||
{
|
||||
last_text = menu_text;
|
||||
|
@ -196,6 +227,7 @@ choice_menu(list options, string menu_text)
|
|||
}
|
||||
llDialog(controller, menu_text, order_buttons(menu_items), comm_channel);
|
||||
}
|
||||
|
||||
new_menu()
|
||||
{
|
||||
menu_page = 0;
|
||||
|
@ -208,15 +240,18 @@ new_menu()
|
|||
string menu_text = "\nWhat would you like to create?\n";
|
||||
llDialog(controller, menu_text, order_buttons(menu_items), comm_channel);
|
||||
}
|
||||
|
||||
end_helper_mode()
|
||||
{
|
||||
llRegionSay(comm_channel, "DONEA");
|
||||
helper_mode = FALSE;
|
||||
}
|
||||
|
||||
Out(string out)
|
||||
{
|
||||
llOwnerSay(llGetScriptName() + "[" + version + "] " + out);
|
||||
}
|
||||
|
||||
integer get_number_of_scripts()
|
||||
{
|
||||
integer i;
|
||||
|
@ -224,6 +259,7 @@ integer get_number_of_scripts()
|
|||
;
|
||||
return i;
|
||||
}
|
||||
|
||||
string convert_to_world_positions(integer num)
|
||||
{
|
||||
list details = llGetObjectDetails(llGetLinkKey(llGetLinkNumber()), [OBJECT_POS, OBJECT_ROT]);
|
||||
|
@ -231,10 +267,12 @@ string convert_to_world_positions(integer num)
|
|||
vector target_pos = llList2Vector(POS_LIST, num) * llList2Rot(details, 1) + llList2Vector(details, 0);
|
||||
return (string)target_pos + "|" + (string)target_rot;
|
||||
}
|
||||
|
||||
string sitter_text(integer sitter)
|
||||
{
|
||||
return " for SITTER " + (string)sitter;
|
||||
}
|
||||
|
||||
remove_script(string reason)
|
||||
{
|
||||
string message = "\n" + llGetScriptName() + " ==Script Removed==\n\n" + reason;
|
||||
|
@ -242,6 +280,7 @@ remove_script(string reason)
|
|||
llInstantMessage(llGetOwner(), message);
|
||||
llRemoveInventory(llGetScriptName());
|
||||
}
|
||||
|
||||
done_choosing_anims()
|
||||
{
|
||||
string adding_text = llList2String(llParseString2List(adding, ["[", "]"], []), 0);
|
||||
|
@ -254,6 +293,7 @@ done_choosing_anims()
|
|||
}
|
||||
llTextBox(controller, "\nType a menu name for " + adding_text + text, comm_channel);
|
||||
}
|
||||
|
||||
camera_menu()
|
||||
{
|
||||
string text = "\nCamera:\n\n";
|
||||
|
@ -267,6 +307,7 @@ camera_menu()
|
|||
}
|
||||
llDialog(controller, text, ["[BACK]", "[SAVE]", "[CLEAR]"], comm_channel);
|
||||
}
|
||||
|
||||
unsit_all()
|
||||
{
|
||||
integer i = llGetNumberOfPrims();
|
||||
|
@ -277,6 +318,7 @@ unsit_all()
|
|||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
toggle_helper_mode()
|
||||
{
|
||||
helper_mode = (!helper_mode);
|
||||
|
@ -308,6 +350,7 @@ toggle_helper_mode()
|
|||
end_helper_mode();
|
||||
}
|
||||
}
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
|
@ -332,6 +375,7 @@ default
|
|||
comm_channel -= 1000000000;
|
||||
}
|
||||
}
|
||||
|
||||
link_message(integer sender, integer num, string msg, key id)
|
||||
{
|
||||
integer one = (integer)msg;
|
||||
|
@ -571,6 +615,7 @@ default
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
changed(integer change)
|
||||
{
|
||||
if (change & CHANGED_LINK)
|
||||
|
@ -594,6 +639,7 @@ default
|
|||
llResetScript();
|
||||
}
|
||||
}
|
||||
|
||||
run_time_permissions(integer perm)
|
||||
{
|
||||
if (llGetPermissions() & PERMISSION_TRACK_CAMERA)
|
||||
|
@ -613,6 +659,7 @@ default
|
|||
camera_menu();
|
||||
}
|
||||
}
|
||||
|
||||
listen(integer chan, string name, key id, string msg)
|
||||
{
|
||||
if (chan == chat_channel)
|
||||
|
@ -859,6 +906,7 @@ default
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
on_rez(integer x)
|
||||
{
|
||||
llResetScript();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue