summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/lllslconstants.h11
-rw-r--r--indra/lscript/lscript_compile/indra.l10
-rw-r--r--indra/lscript/lscript_library/lscript_library.cpp2
-rw-r--r--indra/newview/app_settings/keywords.ini10
4 files changed, 33 insertions, 0 deletions
diff --git a/indra/llcommon/lllslconstants.h b/indra/llcommon/lllslconstants.h
index 87234a463c..9f6ac1c521 100644
--- a/indra/llcommon/lllslconstants.h
+++ b/indra/llcommon/lllslconstants.h
@@ -146,4 +146,15 @@ const S32 STRING_TRIM_HEAD = 0x01;
const S32 STRING_TRIM_TAIL = 0x02;
const S32 STRING_TRIM = STRING_TRIM_HEAD | STRING_TRIM_TAIL;
+// llGetObjectDetails
+const S32 OBJECT_UNKOWN_DETAIL = -1;
+const S32 OBJECT_NAME = 1;
+const S32 OBJECT_DESC = 2;
+const S32 OBJECT_POS = 3;
+const S32 OBJECT_ROT = 4;
+const S32 OBJECT_VELOCITY = 5;
+const S32 OBJECT_OWNER = 6;
+const S32 OBJECT_GROUP = 7;
+const S32 OBJECT_CREATOR = 8;
+
#endif
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index 2ff1028f74..94cb196aea 100644
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -227,6 +227,16 @@ extern "C" { int yyerror(const char *fmt, ...); }
"CHANGED_REGION" { count(); yylval.ival = 0x100; return(INTEGER_CONSTANT); }
"CHANGED_TELEPORT" { count(); yylval.ival = 0x200; return(INTEGER_CONSTANT); }
+"OBJECT_UNKOWN_DETAIL" { count(); yylval.ival = OBJECT_UNKOWN_DETAIL; return(INTEGER_CONSTANT); }
+"OBJECT_NAME" { count(); yylval.ival = OBJECT_NAME; return(INTEGER_CONSTANT); }
+"OBJECT_DESC" { count(); yylval.ival = OBJECT_DESC; return(INTEGER_CONSTANT); }
+"OBJECT_POS" { count(); yylval.ival = OBJECT_POS; return(INTEGER_CONSTANT); }
+"OBJECT_ROT" { count(); yylval.ival = OBJECT_ROT; return(INTEGER_CONSTANT); }
+"OBJECT_VELOCITY" { count(); yylval.ival = OBJECT_VELOCITY; return(INTEGER_CONSTANT); }
+"OBJECT_OWNER" { count(); yylval.ival = OBJECT_OWNER; return(INTEGER_CONSTANT); }
+"OBJECT_GROUP" { count(); yylval.ival = OBJECT_GROUP; return(INTEGER_CONSTANT); }
+"OBJECT_CREATOR" { count(); yylval.ival = OBJECT_CREATOR; return(INTEGER_CONSTANT); }
+
"TYPE_INTEGER" { count(); yylval.ival = LST_INTEGER; return(INTEGER_CONSTANT); }
"TYPE_FLOAT" { count(); yylval.ival = LST_FLOATINGPOINT; return(INTEGER_CONSTANT); }
"TYPE_STRING" { count(); yylval.ival = LST_STRING; return(INTEGER_CONSTANT); }
diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp
index 46717594de..f3a5e95169 100644
--- a/indra/lscript/lscript_library/lscript_library.cpp
+++ b/indra/lscript/lscript_library/lscript_library.cpp
@@ -406,6 +406,8 @@ void LLScriptLibrary::init()
addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llStringTrim", "s", "si", "string llStringTrim(string src, integer trim_type)\nTrim leading and/or trailing spaces from a string.\nUses trim_type of STRING_TRIM, STRING_TRIM_HEAD or STRING_TRIM_TAIL."));
addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llRegionSay", NULL, "is", "llRegionSay(integer channel, string msg)\nbroadcasts msg to entire region on channel (not 0.)"));
+ addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetObjectDetails", "l", "kl", "list llGetObjectDetails(key id, list params)\nGets the object details specified in params for the object with key id.\nDetails are OBJECT_DETAILS_NAME, _DESCRIPTION, _POS, _ROT, _VELOCITY, _OWNER, _GROUP, _CREATOR."));
+
// energy, sleep, dummy_func, name, return type, parameters, help text, gods-only
// IF YOU ADD NEW SCRIPT CALLS, YOU MUST PUT THEM AT THE END OF THIS LIST.
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini
index c7f8426804..4496ee746f 100644
--- a/indra/newview/app_settings/keywords.ini
+++ b/indra/newview/app_settings/keywords.ini
@@ -149,6 +149,16 @@ PSYS_SRC_PATTERN_ANGLE
PSYS_SRC_PATTERN_ANGLE_CONE
PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
+OBJECT_UNKOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type.
+OBJECT_NAME Used with llGetObjectDetails to get an object's name.
+OBJECT_DESC Used with llGetObjectDetails to get an object's description.
+OBJECT_POS Used with llGetObjectDetails to get an object's position.
+OBJECT_ROT Used with llGetObjectDetails to get an object's rotation.
+OBJECT_VELOCITY Used with llGetObjectDetails to get an object's velocity.
+OBJECT_OWNER Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned.
+OBJECT_GROUP Used with llGetObjectDetails to get an object's group's key.
+OBJECT_CREATOR Used with llGetObjectDetails to get an object's creator's key.
+
# some vehicle params
VEHICLE_TYPE_NONE
VEHICLE_TYPE_SLED