Added per skin lsl highlighting and move function color to an actual color

This commit is contained in:
Drake Arconis
2013-03-12 00:46:18 -04:00
parent e93bddcbed
commit aac7fa84c2
4 changed files with 87 additions and 56 deletions

View File

@@ -319,9 +319,15 @@ LLScriptEdCore::LLScriptEdCore(
tooltips.push_back(desc);
}
}
LLColor3 color(0.5f, 0.0f, 0.15f);
mEditor->loadKeywords(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keywords.ini"), funcs, tooltips, color);
LLColor3 color = vec4to3(gColors.getColor("LSLFunctionColor"));
std::string keywords_ini = gDirUtilp->getExpandedFilename(LL_PATH_TOP_SKIN, "keywords.ini");
if(!LLFile::isfile(keywords_ini))
{
keywords_ini = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "keywords.ini");
}
mEditor->loadKeywords(keywords_ini, funcs, tooltips, color);
std::vector<std::string> primary_keywords;
std::vector<std::string> secondary_keywords;

View File

@@ -233,4 +233,7 @@
<PathfindingLinksetBeaconColor value="0, 0, 255, 204" />
<PathfindingCharacterBeaconColor value="255, 0, 0, 204" />
<!-- LSL colors -->
<LSLFunctionColor value="102, 217, 239, 0" />
</settings>

View File

@@ -217,5 +217,7 @@
<MultiSliderTrackColor value="30, 30, 30, 255"/>
<MultiSliderThumbCenterSelectedColor value="255, 50, 50, 255"/>
<MultiSliderTriangleColor value="255, 255, 50, 255"/>
<!-- LSL colors -->
<LSLFunctionColor value="102, 217, 239, 0" />
</settings>

View File

@@ -1,12 +1,12 @@
llkeywords version 2
# sections
[word .84, .48, .48]
[word .648, .882, .179]
default Name of default state that all scripts must have
state Keyword to indicate state block or state transition
# data types
[word .57, .83, .52]
[word .398, .847, .933]
integer Integer type
float Floating-point type
string String type
@@ -17,7 +17,7 @@ list List of various data types
quaternion Rotation type of 4 floats. Used to represent rotation.:Access components by .x, .y, .z, or .w
# events
[word .47, .62, .91]
[word .398, .847, .933]
state_entry state_entry():Triggered on any state transition and startup
state_exit state_exit():Triggered on any state transition
touch_start touch_start(integer num_detected):Triggered by the start of agent clicking on task
@@ -56,7 +56,7 @@ transaction_result transaction_result(key id, integer success, string data):Tri
path_update path_update(integer type, list reserved):Triggered when the state of a pathfinder character changes. Note; "list reserved" is not currently used
# integer constants
[word .48, .72, .84]
[word .679, .503, .996]
TRUE Integer constant for Boolean operations
FALSE Integer constant for Boolean operations
STATUS_PHYSICS Passed in the llSetStatus library function. If TRUE, object moves physically
@@ -119,7 +119,7 @@ AGENT_ALWAYS_RUN Returned by llGetAgentInfo if the Agent has 'Always Run' enable
AGENT_AUTOPILOT Returned by llGetAgentInfo if the Agent is under autopilot control
AGENT_LIST_PARCEL Passed to llGetAgentList to return only agents on the same parcel where the script is running
AGENT_LIST_PARCEL_OWNER Passed to llGetAgentList to return only agents on any parcel in the region where the parcel owner is the same as the owner of the parcel under the scripted object
AGENT_LIST_PARCEL_OWNER Passed to llGetAgentList to return only agents on any parcel in the region where the parcel owner is the same as the owner of the parcel under the scripted object
AGENT_LIST_REGION Passed to llGetAgentList to return any/all agents in the region
PSYS_PART_FLAGS
@@ -177,9 +177,18 @@ OBJECT_TOTAL_SCRIPT_COUNT Gets the number of scripts, both running and stopped,
OBJECT_SCRIPT_MEMORY Gets the total amount of script memory allocated to the object or agent, in bytes.
OBJECT_SCRIPT_TIME Gets the total amount of average script CPU time used by the object or agent, in seconds.
OBJECT_PRIM_EQUIVALENCE Gets the prim equivalence of the object.
OBJECT_SERVER_COST Used with llGetObjectDetails to get the server cost.
OBJECT_SERVER_COST Used with llGetObjectDetails to get the server cost.
OBJECT_STREAMING_COST Used with llGetObjectDetails to get the streaming (download) cost.
OBJECT_PHYSICS_COST Used with llGetObjectDetails to get the physics cost.
OBJECT_PHYSICS_COST Used with llGetObjectDetails to get the physics cost.
OBJECT_PATHFINDING_TYPE Used with llGetObjectDetails to get an object's pathfinding settings.
OPT_UNKNOWN Returned object pathfinding type by llGetObjectDetails for attachments, Linden trees and grass.
OPT_LEGACY_LINKSET Returned object pathfinding type by llGetObjectDetails for movable obstacles, movable phantoms, physical, and volumedetect objects.
OPT_AVATAR Returned object pathfinding type by llGetObjectDetails for avatars.
OPT_PATHFINDING_CHARACTER Returned object pathfinding type by llGetObjectDetails for pathfinding characters.
OPT_WALKABLE Returned object pathfinding type by llGetObjectDetails for walkable objects.
OPT_STATIC_OBSTACLE Returned object pathfinding type by llGetObjectDetails for static obstacles.
OPT_MATERIAL_VOLUME Returned object pathfinding type by llGetObjectDetails for material volumes.
OPT_EXCLUSION_VOLUME Returned object pathfinding type by llGetObjectDetails for exclusion volumes.
# some vehicle params
VEHICLE_TYPE_NONE Used with llSetVehicleType to turn off vehicle support
@@ -298,9 +307,8 @@ ATTACH_HUD_CENTER_2 Passed to llAttachToAvatar to attach task to center 2 hud ar
ATTACH_HUD_TOP_CENTER Passed to llAttachToAvatar to attach task to top center hud area
ATTACH_HUD_TOP_LEFT Passed to llAttachToAvatar to attach task to top left hud area
ATTACH_HUD_TOP_RIGHT Passed to llAttachToAvatar to attach task to top right hud area
##The following attachment points exist only as numbers thus far, but will be ready when the time comes.
#ATTACH_NECK Passed to llAttachToAvatar to attach task to neck
#ATTACH_ROOT Passed to llAttachToAvatar to attach task to avatar center/root
ATTACH_NECK Passed to llAttachToAvatar to attach task to neck
ATTACH_AVATAR_CENTER Passed to llAttachToAvatar to attach task to avatar center
LAND_LEVEL Passed to llModifyLand to level terrain
LAND_RAISE Passed to llModifyLand to raise terrain
@@ -367,8 +375,8 @@ REMOTE_DATA_REQUEST Value of event_type in remote_event if XML-RPC request is re
REMOTE_DATA_REPLY Value of event_type in remote_event if XML-RPC reply is received
PRIM_NAME For primitive name (from server v1.40 onwards). Followed by a string.
PRIM_DESC For primitive description (from server v1.40 onwards). Followed by a string.
PRIM_NAME Sets the prim's name
PRIM_DESC Sets the prim's description
PRIM_TYPE Followed by PRIM_TYPE_BOX, PRIM_TYPE_CYLINDER, PRIM_TYPE_PRISM, PRIM_TYPE_SPHERE, PRIM_TYPE_TORUS, PRIM_TYPE_TUBE, or PRIM_TYPE_SCULPT and their arguments
PRIM_MATERIAL Followed by PRIM_MATERIAL_STONE, PRIM_MATERIAL_METAL, PRIM_MATERIAL_GLASS, PRIM_MATERIAL_WOOD, PRIM_MATERIAL_FLESH, PRIM_MATERIAL_PLASTIC, or PRIM_MATERIAL_RUBBER
PRIM_PHYSICS Sets physics to TRUE or FALSE
@@ -390,12 +398,9 @@ PRIM_GLOW Followed by an integer face, and a float from 0.0 to 1.0 specifying
PRIM_POS_LOCAL Sets the prim's local position
PRIM_ROT_LOCAL Sets the prim's local rotation
PRIM_OMEGA Makes the object spin at the specified axis and rate
PRIM_LINK_TARGET Used to get or set multiple links with a single PrimParameters call
PRIM_LINK_TARGET Used to get or set multiple links with a single PrimParameters call.
PRIM_SLICE Get and set the 'slice' parameter of all shapes. Takes a vector parameter of the form <start_slice, end_slice, 0>
PROFILE_NONE Disables profiling
PROFILE_SCRIPT_MEMORY Enables memory profiling
PRIM_TYPE_BOX Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
PRIM_TYPE_CYLINDER Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
PRIM_TYPE_PRISM Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
@@ -608,6 +613,9 @@ STATUS_NOT_SUPPORTED Feature not supported
STATUS_INTERNAL_ERROR An internal error occurred
STATUS_WHITELIST_FAILED URL failed to pass whitelist
PROFILE_NONE Disables profiling
PROFILE_SCRIPT_MEMORY Enables memory profiling
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_DETECT_PHANTOM Option for llCastRay() followed with TRUE to detect phantom AND volume detect objects, FASLE otherwise.
RC_GET_LINK_NUM Flag used in the RC_DATA_FLAGS mask to get link numbers in llCastRay() results.
@@ -636,11 +644,12 @@ FRICTION For use with llSetPhysicsMaterial() as a bitwise value in its materi
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.
SIM_STAT_PCT_CHARS_STEPPED Option for llGetSimStats() to return the % of pathfinding characters skipped each frame, averaged over the last minute.
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_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.
KFM_CMD_SET_MODE TODO: add documentation
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_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.
@@ -650,23 +659,26 @@ KFM_DATA Option for llSetKeyframedMotion(), followed by a bitwise combination
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.
CHARACTER_CMD_STOP TODO: add documentation
CHARACTER_CMD_JUMP TODO: add documentation
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_DESIRED_SPEED TODO: add documentation
CHARACTER_RADIUS TODO: add documentation
CHARACTER_LENGTH TODO: add documentation
CHARACTER_ORIENTATION TODO: add documentation
CHARACTER_AVOIDANCE_MODE TODO: add documentation
PURSUIT_OFFSET TODO: add documentation
REQUIRE_LINE_OF_SIGHT TODO: add documentation
PURSUIT_FUZZ_FACTOR TODO: add documentation
PURSUIT_INTERCEPT TODO: add documentation
FORCE_DIRECT_PATH TODO: add documentation
VERTICAL TODO: add documentation
HORIZONTAL TODO: add documentation
CHARACTER_DESIRED_SPEED Speed of pursuit in meters per second.
CHARACTER_RADIUS Set collision capsule radius.
CHARACTER_LENGTH Set collision capsule length.
CHARACTER_ORIENTATION Set the character orientation.
CHARACTER_AVOIDANCE_MODE Allows you to specify that a character should not try to avoid other characters, should not try to avoid dynamic obstacles (relatively fast moving objects and avatars), or both.
CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES Defines if a character will attempt to catch up lost time if pathfinding performance is low.
PURSUIT_OFFSET Used with llPursue(). Go to a position offset from the target.
REQUIRE_LINE_OF_SIGHT Used with llPursue(). Define whether the character needs a physical line-of-sight to give chase. When enabled, the character will not pick a new target position while there is a something solid between the character and the target object/agent.
PURSUIT_FUZZ_FACTOR Used with llPursue(). Selects a random destination near the PURSUIT_OFFSET. The valid fuzz factor range is from 0 to 1, where 1 is most random. This option requires a nonzero PURSUIT_OFFSET.
PURSUIT_INTERCEPT Used with llPursue(). Define whether the character attempts to predict the target's future location.
PURSUIT_GOAL_TOLERANCE Used with llPursue(). Defines approximately how close the character must be to the current goal to consider itself to be at the desired position. The valid range is from 0.25 to 10m.
VERTICAL Constant to indicate that the orientation of the capsule for a Pathfinding character is vertical.
HORIZONTAL Constant to indicate that the orientation of the capsule for a Pathfinding character is horizontal.
AVOID_CHARACTERS TODO: add documentation
AVOID_DYNAMIC_OBSTACLES TODO: add documentation
AVOID_NONE TODO: add documentation
PU_EVADE_HIDDEN Triggered when an llEvade character thinks it has hidden from its pursuer.
PU_EVADE_SPOTTED Triggered when an llEvade character switches from hiding to running
@@ -678,30 +690,38 @@ PU_FAILURE_TARGET_GONE Target (for llPursue or llEvade) can no longer
PU_FAILURE_UNREACHABLE Goal is no longer reachable for some reason - e.g., an obstacle blocks the path.
PU_GOAL_REACHED Character has reached the goal and will stop or choose a new goal (if wandering).
PU_SLOWDOWN_DISTANCE_REACHED Character is near current goal.
PU_FAILURE_NO_NAVMESH Triggered if no navmesh is available for the region.
PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED Triggered when a character enters a region with dynamic pathfinding disabled.
PU_FAILURE_PARCEL_UNREACHABLE Triggered when a character failed to enter a parcel because it is not allowed to enter, e.g. because the parcel is already full or because object entry was disabled after the navmesh was baked.
CHARACTER_TYPE TODO: add documentation
CHARACTER_TYPE_A TODO: add documentation
CHARACTER_TYPE_B TODO: add documentation
CHARACTER_TYPE_C TODO: add documentation
CHARACTER_TYPE_D TODO: add documentation
CHARACTER_TYPE_NONE TODO: add documentation
CHARACTER_TYPE Specifies which walkability coefficient will be used by this character.
CHARACTER_TYPE_A Used for character types that you prefer move in a way consistent with humanoids.
CHARACTER_TYPE_B Used for character types that you prefer move in a way consistent with wild animals or off road vehicles.
CHARACTER_TYPE_C Used for mechanical character types or road going vehicles.
CHARACTER_TYPE_D Used for character types that are not consistent with the A, B, or C type.
CHARACTER_TYPE_NONE Used to set no specific character type.
TRAVERSAL_TYPE TODO: add documentation
TRAVERSAL_TYPE Controls the speed at which characters moves on terrain that is less than 100% walkable will move faster (e.g., a cat crossing a street) or slower (e.g., a car driving in a swamp).
TRAVERSAL_TYPE_SLOW TODO: add documentation
TRAVERSAL_TYPE_FAST TODO: add documentation
TRAVERSAL_TYPE_NONE TODO: add documentation
CHARACTER_MAX_ACCEL TODO: add documentation
CHARACTER_MAX_DECEL TODO: add documentation
CHARACTER_MAX_ANGULAR_SPEED TODO: add documentation
CHARACTER_MAX_ANGULAR_ACCEL TODO: add documentation
CHARACTER_MAX_ACCEL The character's maximum acceleration rate.
CHARACTER_MAX_DECEL The character's maximum deceleration rate.
CHARACTER_MAX_ANGULAR_SPEED TODO: add documentation
CHARACTER_MAX_ANGULAR_ACCEL TODO: add documentation
CHARACTER_TURN_SPEED_MULTIPLIER TODO: add documentation
CHARACTER_DESIRED_TURN_SPEED TODO: add documentation
CHARACTER_MAX_TURN_RADIUS TODO: add documentation
CHARACTER_DESIRED_TURN_SPEED The character's maximum speed while turning--note that this is only loosely enforced (i.e., a character may turn at higher speeds under certain conditions)
CHARACTER_MAX_TURN_RADIUS The character's turn radius when traveling at CHARACTER_DESIRED_TURN_SPEED.
CHARACTER_MAX_SPEED The character's maximum speed. Affects speed when avoiding dynamic obstacles and when traversing low-walkability objects in TRAVERSAL_TYPE_FAST mode.
PATROL_PAUSE_AT_WAYPOINTS Used with llPatrolPoints(). Defines if characters slow down and momentarily pause at each waypoint.
WANDER_PAUSE_AT_WAYPOINTS Used with llWanderWithin(). Defines if characters should pause after reaching each wander waypoint.
# --- OpenSim and Aurora-Sim constants Below ---
# OpenSim Constants (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\LSL_Constants.cs)
# Constants for cmWindlight (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\CM_Constants.cs)
CHANGED_ANIMATION OpenSim change event animation change detection.
CHANGED_ANIMATION OpenSim change event animation change detection.
CAMERA_FOCUS_OFFSET_X OpenSim enhancement for llSetCameraParams(), adjusts the camera focus x position relative to the target. (float)
CAMERA_FOCUS_OFFSET_Y OpenSim enhancement for llSetCameraParams(), adjusts the camera focus y position relative to the target. (float)
CAMERA_FOCUS_OFFSET_Z OpenSim enhancement for llSetCameraParams(), adjusts the camera focus z position relative to the target. (float)
@@ -820,7 +840,7 @@ BOT_FOLLOW_TRIGGER_HERE_EVENT value 1.
BOT_FOLLOW_FLAG_FORCEDIRECTPATH value 4.
# string constants
[word .48, .72, .84]
[word .679, .503, .996]
NULL_KEY Indicates an empty key
EOF Indicates the last line of a notecard was read
TEXTURE_BLANK UUID for the "Blank" texture
@@ -833,7 +853,7 @@ URL_REQUEST_GRANTED Used with http_request when a public URL is successfully gr
URL_REQUEST_DENIED Used with http_request when a public URL is not available
# float constants
[word .48, .72, .84]
[word .679, .503, .996]
PI 3.1415926535897932384626433832795
TWO_PI 6.283185307179586476925286766559
PI_BY_TWO 1.5707963267948966192313216916398
@@ -842,13 +862,13 @@ RAD_TO_DEG To convert from radians to degrees
SQRT2 1.4142135623730950488016887242097
# compound constants
[word .48, .72, .84]
[word .679, .503, .996]
ZERO_VECTOR <0.0, 0.0, 0.0>
ZERO_ROTATION <0.0, 0.0, 0.0, 1.0>
# flow control keywords
[word .47, .62, .91]
[word .972, .148, .445]
for for loop:for (initializer; test; iteration):{: statements:}
do do loop:do:{: statements:} while (test);
while while loop:while (test):{ statements:}
@@ -858,17 +878,17 @@ jump jump statement:jump label;:
return Leave current function or event handler
# flow control label
[line .47, .62, .91]
[line .972, .148, .445]
@ Label:Target for jump statement
# Comment
[one_sided_delimiter .86, .69, .50]
[one_sided_delimiter .457, .441, .367]
// Comment:Non-functional commentary or disabled code
[two_sided_delimiter_esc .86, .69, .50]
[two_sided_delimiter_esc .457, .441, .367]
/* */ Comment:Non-functional commentary or disabled code
# String literals
[two_sided_delimiter_esc .57, .83, .52]
[two_sided_delimiter_esc .989, .855, .453]
" " String literal
#functions are supplied by the program now