Cosmetic changes to AVprop (no code changes)

Add vertical space between functions and between events; format the attachment points list; add inline comments indicating the meaning of the 90xxx codes.
This commit is contained in:
Sei Lisa 2017-08-04 14:24:39 +02:00
parent 1f53bac37d
commit 5b6cd5763b
3 changed files with 127 additions and 23 deletions

View file

@ -31,6 +31,7 @@ integer prop_point;
integer experience_denied_reason;
key originalowner;
key give_prop_warning_request;
unsit_all()
{
integer i = llGetNumberOfPrims();
@ -40,7 +41,9 @@ unsit_all()
i--;
}
}
integer verbose = 5;
Out(integer level, string out)
{
if (verbose >= level)
@ -48,11 +51,13 @@ Out(integer level, string out)
llOwnerSay(llGetScriptName() + "[" + version + "] " + out);
}
}
default
{
state_entry()
{
}
on_rez(integer start)
{
if (start)
@ -61,6 +66,7 @@ default
}
}
}
state prop
{
state_entry()
@ -93,6 +99,7 @@ state prop
llSetClickAction(CLICK_ACTION_TOUCH);
}
}
attach(key id)
{
if (comm_channel)
@ -120,6 +127,7 @@ state prop
}
}
}
touch_start(integer touched)
{
if ((!llGetAttached()) && (prop_type == 2 || prop_type == 1))
@ -127,6 +135,7 @@ state prop
llRequestExperiencePermissions(llDetectedKey(0), "");
}
}
run_time_permissions(integer permissions)
{
if (permissions & PERMISSION_ATTACH)
@ -146,6 +155,7 @@ state prop
llDie();
}
}
experience_permissions(key target_id)
{
if (llGetAttached())
@ -157,12 +167,14 @@ state prop
llAttachToAvatarTemp(prop_point);
}
}
experience_permissions_denied(key agent_id, integer reason)
{
originalowner = llGetOwner();
experience_denied_reason = reason;
llRequestPermissions(agent_id, PERMISSION_ATTACH);
}
on_rez(integer start)
{
if (!llGetAttached())
@ -170,6 +182,7 @@ state prop
state restart_prop;
}
}
listen(integer channel, string name, key id, string message)
{
list data = llParseString2List(message, ["|"], []);
@ -232,6 +245,7 @@ state prop
}
}
}
state restart_prop
{
state_entry()