Updated LSL syntax highlighting; Fixes FIRE-4697, FIRE-4417, FIRE-4695

meow-7.2.2
Ansariel 2012-01-31 20:05:58 +01:00
parent 677c59941f
commit d156037ca5
3 changed files with 231 additions and 0 deletions

View File

@ -469,6 +469,47 @@ void LLScriptLibrary::init()
// IF YOU ADD NEW SCRIPT CALLS, YOU MUST PUT THEM AT THE END OF THIS LIST.
// Otherwise the bytecode numbers for each call will be wrong, and all
// existing scripts will crash.
// <FS:Ansariel> According to Kelly Linden we don't need to obey the function ID order in the viewer!
// Server v11.08.10.238207 new functions:
addFunction(10.f, 0.f, dummy_func, "llSetMemoryLimit", "i", "i");
addFunction(10.f, 0.f, dummy_func, "llGetMemoryLimit", "i", NULL);
addFunction(10.f, 0.f, dummy_func, "llSetLinkMedia", "i", "iil");
addFunction(10.f, 0.f, dummy_func, "llGetLinkMedia", "l", "iil");
addFunction(10.f, 0.f, dummy_func, "llClearLinkMedia", "i", "ii");
addFunction(10.f, 0.f, dummy_func, "llSetLinkCamera", NULL, "ivv");
addFunction(10.f, 0.f, dummy_func, "llSetContentType", NULL, "ki");
addFunction(10.f, 0.f, dummy_func, "llLinkSitTarget", NULL, "ivq");
addFunction(10.f, 0.f, dummy_func, "llAvatarOnLinkSitTarget", "k", "i");
addFunction(10.f, 0.f, dummy_func, "llSetVelocity", NULL, "vi");
// Server v11.09.09.240509 new functions:
addFunction(10.f, 0.f, dummy_func, "llCastRay", "l", "vvl");
addFunction(10.f, 0.f, dummy_func, "llGetMassMKS", "f", NULL);
addFunction(10.f, 0.f, dummy_func, "llSetPhysicsMaterial", NULL, "iffff");
addFunction(10.f, 0.f, dummy_func, "llGetPhysicsMaterial", "l", NULL);
// Server v11.10.18.243270 new functions:
addFunction(10.f, 0.f, dummy_func, "llManageEstateAccess", "i", "ik");
// Server RC magnum v11.10.31.244254 new function:
addFunction(10.f, 0.f, dummy_func, "llSetKeyframedMotion", NULL, "ll");
// Server RC Le Tigre v11.10.30.245889 new function:
addFunction(10.f, 0.f, dummy_func, "llTransferLindenDollars", "k", "ki");
// Server new function 2011-12-13:
addFunction(10.f, 0.f, dummy_func, "llGetParcelMusicURL", "s", NULL);
// Missing script functions as of 2011-12-13
addFunction(10.f, 0.f, dummy_func, "llScriptProfiler", NULL, "i");
addFunction(10.f, 0.f, dummy_func, "llGetSPMaxMemory", "i", NULL);
addFunction(10.f, 0.f, dummy_func, "llGetUsedMemory", "i", NULL);
addFunction(10.f, 0.f, dummy_func, "llSetAngularVelocity", NULL, "vi");
// Server 12.01.24.248357 new functions
addFunction(0.f, 0.f, dummy_func, "llSetRegionPos", "i", "v");
// </FS:Ansariel> According to Kelly Linden we don't need to obey the function ID order in the viewer!
}
LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &), const char *name, const char *ret_type, const char *args, BOOL god_only)

View File

@ -52,6 +52,9 @@ remote_data remote_data(integer event_type, key channel, key message_id, str
http_response http_response(key request_id, integer status, list metadata, string body):Triggered when task receives a response to one of its llHTTPRequests
http_request http_request(key id, string method, string body):Triggered when task receives an http request against a public URL
# <FS:Ansariel> Added manually
transaction_result transaction_result(key id, integer success, string data): Triggered when L$ is given to task
# integer constants
[word .1, .1, .5]
TRUE Integer constant for Boolean operations
@ -589,6 +592,64 @@ STATUS_NOT_SUPPORTED Feature not supported
STATUS_INTERNAL_ERROR An internal error occurred
STATUS_WHITELIST_FAILED URL failed to pass whitelist
# <FS:Ansariel> Manually added constants
KFM_COMMAND Option for llSetKeyframedMotion(), followed by one of KFM_CMD_STOP, KFM_CMD_PLAY, KFM_CMD_PAUSE. Note that KFM_COMMAND must be the only option in the list, and cannot be specified in the same function call that sets the keyframes list.
KFM_MODE Option for llSetKeyframedMotion(), used to specify the playback mode, followed by one of KFM_FORWARD, KFM_LOOP, KFM_PING_PONG or KFM_REVERSE.
KFM_DATA Option for llSetKeyframedMotion(), followed by a bitwise combination of KFM_TRANSLATION and KFM_ROTATION. If you specify one or the other, you should only include translations or rotations in your keyframe list.
KFM_FORWARD Option for llSetKeyframedMotion(), used after KFM_MODE to specify the forward playback mode.
KFM_LOOP Option for llSetKeyframedMotion(), used after KFM_MODE to specify the loop playback mode.
KFM_PING_PONG Option for llSetKeyframedMotion(), used after KFM_MODE to specify the ping pong playback mode.
KFM_REVERSE Option for llSetKeyframedMotion(), used after KFM_MODE to specify the reverse playback mode.
KFM_ROTATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_TRANSLATION.
KFM_TRANSLATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_ROTATION.
KFM_CMD_PLAY Option for llSetKeyframedMotion(), used after KFM_COMMAND to play the motion.
KFM_CMD_STOP Option for llSetKeyframedMotion(), used after KFM_COMMAND to stop the motion.
KFM_CMD_PAUSE Option for llSetKeyframedMotion(), used after KFM_COMMAND to pause the motion.
ESTATE_ACCESS_ALLOWED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's allowed residents list.
ESTATE_ACCESS_ALLOWED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's allowed residents list.
ESTATE_ACCESS_ALLOWED_GROUP_ADD Used with llManageEstateAccess to add a group to this estate's allowed groups list.
ESTATE_ACCESS_ALLOWED_GROUP_REMOVE Used with llManageEstateAccess to remove a group from this estate's allowed groups list.
ESTATE_ACCESS_BANNED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's banned residents list.
ESTATE_ACCESS_BANNED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's banned residents list.
OBJECT_PHYSICS_COST Used with llGetObjectDetails to get the physics cost.
OBJECT_PRIM_EQUIVALENCE Used with llGetObjectDetails to get the prim equivalence.
OBJECT_SERVER_COST Used with llGetObjectDetails to get the server cost.
OBJECT_STREAMING_COST Used with llGetObjectDetails to get the streaming (download) cost.
PRIM_PHYSICS_SHAPE_TYPE For primitive physics shape type. Followed with either PRIM_PHYSICS_SHAPE_PRIM, PRIM_PHYSICS_SHAPE_NONE or PRIM_PHYSICS_SHAPE_CONVEX.
PRIM_PHYSICS_SHAPE_PRIM Use the normal prim shape for physics (this is the default for all non-mesh objects)
PRIM_PHYSICS_SHAPE_NONE Use the convex hull of the prim shape for physics (this is the default for mesh objects)
PRIM_PHYSICS_SHAPE_CONVEX Ignore this prim in the physics shape. This cannot be applied to the root prim.
DENSITY For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the density.
FRICTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the friction.
RESTITUTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the restitution.
GRAVITY_MULTIPLIER For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the gravity multiplier.
PROFILE_SCRIPT_NONE Disables memory profiling when passed to llScriptProfiler()
PROFILE_SCRIPT_MEMORY Enables memory profiling when passed to llScriptProfiler()
RCERR_UNKNOWN Returned by llCastRay() when the raycast failed for an unspecified reason.
RCERR_SIM_PERF_LOW Returned by llCastRay() when the raycast failed because simulator performance is low.
RCERR_CAST_TIME_EXCEEDED Returned by llCastRay() when the raycast failed because the parcel or agent has exceeded the maximum time allowed for raycasting.
RC_REJECT_TYPES Option for llCastRay() used to ignore specific types of objects, followed with a bitwise combination of RC_REJECT_AGENTS, RC_REJECT_PHYSICAL, RC_REJECT_NONPHYSICAL and RC_REJECT_LAND.
RC_DETECT_PHANTOM Option for llCastRay() followed with TRUE to detect phantom AND volume detect objects, FASLE otherwise.
RC_DATA_FLAGS Option for llCastRay() followed with a bitwise combination of RC_GET_NORMAL, RC_GET_ROOT_KEY and RC_GET_LINK_NUM.
RC_MAX_HITS Option for llCastRay() followed with an integer specifying the maximum number of hits to return (must be <= 256).
RC_REJECT_AGENTS Flag used in the RC_REJECT_TYPES mask to reject agents in llCastRay().
RC_REJECT_PHYSICAL Flag used in the RC_REJECT_TYPES mask to reject physical objects in llCastRay().
RC_REJECT_NONPHYSICAL Flag used in the RC_REJECT_TYPES mask to reject non-physical objects in llCastRay().
RC_REJECT_LAND Flag used in the RC_REJECT_TYPES mask to reject land in llCastRay().
RC_GET_NORMAL Flag used in the RC_DATA_FLAGS mask to get hit normals in llCastRay() results.
RC_GET_ROOT_KEY Flag used in the RC_DATA_FLAGS mask to get root keys in llCastRay() results.
RC_GET_LINK_NUM Flag used in the RC_DATA_FLAGS mask to get link numbers in llCastRay() results.
# </FS:Ansariel> Manually added constants
# string constants
[word .1, .3, .5]
NULL_KEY Indicates an empty key

View File

@ -1947,6 +1947,135 @@ llGetEnv(string name)
Returns a string with the requested data about the region
</string>
<!-- FS:Ansariel: LSL function tooltip help texts manually added -->
<string name="LSLTipText_llSetMemoryLimit" translate="false">
integer llSetMemoryLimit(integer limit)
Request limit bytes to be reserved for this script.
Returns a success/failure flag (STATUS_OK when sucessful, another of the STATUS_* flags on failure) for whether the memory limit was set.
Only relevant for Mono-compiled scripts.
</string>
<string name="LSLTipText_llGetMemoryLimit" translate="false">
integer llGetUsedMemory()
Get the maximum memory a script can use.
Returns the integer amount of memory the script can use in bytes.
</string>
<string name="LSLTipText_llSetLinkMedia" translate="false">
integer llSetLinkMedia(integer link, integer face, list params)
Set the media params for a particular face on the 'link'ed prim without a delay.
Returns an integer that is flag (STATUS_OK when sucessful, another of the STATUS_* flags on failure) which details the success/failure of the operation(s).
Takes the same parameters as llSetPrimMediaParams()
</string>
<string name="LSLTipText_llGetLinkMedia" translate="false">
list llGetLinkMedia(integer link, integer face, list params)
Get the media params for a particular face on a 'link'ed prim(s), given the desired list of named params.
Returns a list of values in the order requested (empty list if no media exists on the face).
Takes the same parameters as llGetPrimMediaParams()
</string>
<string name="LSLTipText_llClearLinkMedia" translate="false">
integer llClearLinkMedia(integer link, integer face)
Clears (deletes) the media and all params from the given face on the linked prim(s).
Returns an integer that is flag (STATUS_OK when sucessful, another of the STATUS_* flags on failure) which details the success/failure of the operation(s).
</string>
<string name="LSLTipText_llSetLinkCamera" translate="false">
llSetLinkCamera(integer link, vector eye, vector at)
Sets the camera eye offset, and the offset that camera is looking at, for avatars that sit on the linked prim.
The two vector parameters are offsets relative to the object's center and expressed in local coordinates.
</string>
<string name="LSLTipText_llSetContentType" translate="false">
llSetContentType(key request_id, integer content_type)
Set the Internet media type of an LSL HTTP server response.
content_type may be one of CONTENT_TYPE_TEXT (default) "text/plain", or CONTENT_TYPE_HTML "text/html", only valid for embedded browsers on content owned by the person viewing. Falls back to "text/plain" otherwise.
</string>
<string name="LSLTipText_llLinkSitTarget" translate="false">
llLinkSitTarget(integer link, vector offset, rotation rot)
Set the sit location for the 'link'ed prim(s). The sit location is relative to the prim's position and rotation.
Equivalent to calling llSitTarget on link prim(s) in the link set.
</string>
<string name="LSLTipText_llAvatarOnLinkSitTarget" translate="false">
key llAvatarOnLinkSitTarget(integer link)
Returns a key that is the UUID of the user seated on the 'link'ed prim.
Equivalent to calling llAvatarOnSitTarget on link prim in the link set.
</string>
<string name="LSLTipText_llSetVelocity" translate="false">
llSetVelocity(vector force, integer local)
Applies velocity with 'force' to object and 'local' a boolean (if TRUE, force is treated as a local directional vector instead of region directional vector).
</string>
<string name="LSLTipText_llSetAngularVelocity" translate="false">
llSetAngularVelocity(vector force, integer local)
Applies rotational velocity with 'force' to object and 'local' a boolean (if TRUE uses local axis, if FALSE uses region axis).
</string>
<string name="LSLTipText_llCastRay" translate="false">
list llCastRay(vector start, vector end, list options)
Cast a ray from start to end and report collision data for intersections with objects.
</string>
<string name="LSLTipText_llGetMassMKS" translate="false">
float llGetMassMKS()
Returns a float that is the mass in kilograms of the object the script is attached to.
</string>
<string name="LSLTipText_llSetPhysicsMaterial" translate="false">
llSetPhysicsMaterial(integer material_bits, float gravity_multiplier, float restitution, float friction, float density)
Sets the physics properties of the object the script is attached to.
material_bits is a bitwise combination of DENSITY, FRICTION, RESTITUTION and GRAVITY_MULTIPLIER, specifying which floats to actually apply.
</string>
<string name="LSLTipText_llGetPhysicsMaterial" translate="false">
list llGetPhysicsMaterial()
Returns a list of the object physics properties: [ float gravity_multiplier, float restitution, float friction, float density ]
</string>
<string name="LSLTipText_llManageEstateAccess" translate="false">
integer llManageEstateAccess(integer action, key id)
To add or remove agents from the estate's agent access or ban lists or groups from the estate's group access list.
Only works for objects owned by the Estate Owner or an Estate Manager.
Returns TRUE if successful and FALSE if throttled, on invalid action, on invalid or null id, or if object owner is not allowed to manage the estate.
'action' can be any of: ESTATE_ACCESS_ALLOWED_[AGENT/GROUP]_[ADD/REMOVE] or ESTATE_ACCESS_BANNED_AGENT_[ADD/REMOVE]
</string>
<string name="LSLTipText_llSetKeyframedMotion" translate="false">
llSetKeyframedMotion(list keyframes, list options)
Specify a list of times, positions, and orientations to be followed by an object.
The object will be smoothly moved between keyframes by the simulator.
list keyframes: strided keyframe list of the form:
- vector position (optional via KFM_TRANSLATION and KFM_DATA)
- rotation orientation (optional via KFM_ROTATION and KFM_DATA)
- float time
list options: modifiers among:
- KFM_COMMAND followed by one of KFM_CMD_PLAY, KFM_CMD_STOP, KFM_CMD_PAUSE.
- KFM_MODE followed by one of KFM_FORWARD, KFM_LOOP, KFM_PING_PONG, KFM_REVERSE.
- KFM_DATA followed by KFM_ROTATION or KFM_TRANSLATION.
Note that if KFM_COMMAND is provided in the options list, it must be the only option in the list, and cannot be specified in the same function call that sets the keyframes list.
</string>
<string name="LSLTipText_llTransferLindenDollars" translate="false">
key llTransferLindenDollars(key id, integer amount)
Attempt to transfer amount of L$ from the owner of the object to 'id'. Requires PERMISSION_DEBIT.
Returns a key used in a matching transaction_result() event for the success or failure of the transfer.
</string>
<string name="LSLTipText_llGetParcelMusicURL" translate="false">
string llGetParcelMusicURL()
Returns the music URL of the object's current parcel if the script owner also owns the parcel.
</string>
<string name="LSLTipText_llScriptProfiler" translate="false">
llScriptProfiler(integer flags)
Enables or disables the scripts profiling state.
Flags can be either of PROFILE_SCRIPT_NONE or PROFILE_SCRIPT_MEMORY.
Applies to Mono-compiled scripts only.
</string>
<string name="LSLTipText_llGetSPMaxMemory" translate="false">
integer llGetSPMaxMemory()
Returns the integer of the most bytes used while llScriptProfiler() was last active.
Only relevant for Mono-compiled scripts.
</string>
<string name="LSLTipText_llGetUsedMemory" translate="false">
integer llGetUsedMemory()
Returns the integer of the number of bytes of memory currently in use by the script.
Only relevant for Mono-compiled scripts.
</string>
<string name="LSLTipText_llSetAngularVelocity" translate="false">
llSetAngularVelocity(vector force, integer local)
Applies rotational velocity to object.
</string>
<string name="LSLTipText_llSetRegionPos" translate="false">
integer llSetRegionPos(vector position)
Tries to moves the entire object so that the root prim is within 0.1m of position.
</string>
<!-- END FS:Ansariel: LSL function tooltip help texts manually added -->
<!-- Avatar busy/away mode -->
<string name="AvatarSetNotAway">Not Away</string>