Added LSL script editor support for new json functions/constants

meow-7.2.2
Ansariel 2013-05-15 11:18:30 +02:00
parent ae0adea224
commit 8aa64bc1c4
3 changed files with 38 additions and 1 deletions

View File

@ -541,6 +541,13 @@ void LLScriptLibrary::init()
addFunction(0.f, 0.f, dummy_func, "llGetAnimationOverride", "s", "s");
addFunction(0.f, 0.f, dummy_func, "llResetAnimationOverride", NULL, "s");
// Server RC LeTigre/BlueSteel/Magnum 13.05.14.275813 new functions
addFunction(0.f, 0.f, dummy_func, "llJson2List", "l", "s");
addFunction(0.f, 0.f, dummy_func, "llList2Json", "s", "sl");
addFunction(0.f, 0.f, dummy_func, "llJsonGetValue", "s", "sl");
addFunction(0.f, 0.f, dummy_func, "llJsonSetValue", "s", "sls");
addFunction(0.f, 0.f, dummy_func, "llJsonValueType", "s", "sl");
// </FS:Ansariel> According to Kelly Linden we don't need to obey the function ID order in the viewer!
// <FS:CR> Opensim/Aurora scripting functions - Please add Second Life LSL functions above this line!

View File

@ -706,7 +706,17 @@ PURSUIT_GOAL_TOLERANCE Used with llPursue(). Defines approximately how close th
CHARACTER_CMD_STOP Used with llExecCharacterCmd(). Makes the character jump.
CHARACTER_CMD_SMOOTH_STOP Used with llExecCharacterCmd(). Stops any current pathfinding operation in a smooth like fashion.
CHARACTER_CMD_JUMP Used with llExecCharacterCmd(). Stops any current pathfinding operation.
CHARACTER_CMD_JUMP Used with llExecCharacterCmd(). Stops any current pathfinding operation.
JSON_INVALID Returned by llJsonGetValue and llJsonValueType if the specifiers to do specify a valid in the json value.
JSON_OBJECT Represents a json datatype represented in LSL as a strided list of name/value pairs
JSON_ARRAY Represents a json datatype mappable to the LSL datatype "list"
JSON_NUMBER Represents a json datatype mappable to the LSL datatypes "integer" and "float"
JSON_STRING Represents a json datatype mappable to the LSL datatype "string"
JSON_TRUE Represents the constant "true" of a json value.
JSON_FALSE Represents the constant "false" of a json value.
JSON_NULL Represents the constant "null" of a json value.
JSON_APPEND Used with llJsonSetValue as a specifier to indicate appending the value to the end of the array at that level.
# </FS:Ansariel> Manually added constants
# <FS:Ansariel> Partially commented out because they have been added manually with a custom description

View File

@ -2177,6 +2177,26 @@ Returns a string that is the name of the animation that is being used for the sp
llResetAnimationOverride(string anim_state)
Resets the animation override of the specified animation state (anim_state) to the corresponding default value.
</string>
<string name="LSLTipText_llJson2List" translate="false">
list llJson2List(string json)
Converts the top level of the json string to a list.
</string>
<string name="LSLTipText_llList2Json" translate="false">
string llList2Json(string type, list values)
Converts either a strided list of key:value pairs to a JSON_OBJECT or a list of values to a JSON_ARRAY
</string>
<string name="LSLTipText_llJsonGetValue" translate="false">
string llJsonGetValue(string json, list specifiers)
Gets the value indicated by specifiers from the json string.
</string>
<string name="LSLTipText_llJsonSetValue" translate="false">
string llJsonSetValue(string json, list specifiers, string value)
Returns a new json string that is the json given with the value indicated by specifiers set to value.
</string>
<string name="LSLTipText_llJsonValueType" translate="false">
string llJsonValueType(string json, list specifiers)
Returns the type constant for the value in json indicated by specifiers.
</string>
<!-- END FS:Ansariel: LSL function tooltip help texts manually added -->