diff options
Diffstat (limited to '')
3 files changed, 95 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs index c4b2729..ce033ad 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs | |||
@@ -1843,6 +1843,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1843 | return m_LSL_Functions.llStringTrim(src, type); | 1843 | return m_LSL_Functions.llStringTrim(src, type); |
1844 | } | 1844 | } |
1845 | 1845 | ||
1846 | public LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args) | ||
1847 | { | ||
1848 | return m_LSL_Functions.llGetObjectDetails(id, args); | ||
1849 | } | ||
1850 | |||
1846 | // | 1851 | // |
1847 | // OpenSim Functions | 1852 | // OpenSim Functions |
1848 | // | 1853 | // |
@@ -2339,6 +2344,15 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2339 | public const int DEBUG_CHANNEL = 0x7FFFFFFF; | 2344 | public const int DEBUG_CHANNEL = 0x7FFFFFFF; |
2340 | public const int PUBLIC_CHANNEL = 0x00000000; | 2345 | public const int PUBLIC_CHANNEL = 0x00000000; |
2341 | 2346 | ||
2347 | public const int OBJECT_NAME = 1; | ||
2348 | public const int OBJECT_DESC = 2; | ||
2349 | public const int OBJECT_POS = 3; | ||
2350 | public const int OBJECT_ROT = 4; | ||
2351 | public const int OBJECT_VELOCITY = 5; | ||
2352 | public const int OBJECT_OWNER = 6; | ||
2353 | public const int OBJECT_GROUP = 7; | ||
2354 | public const int OBJECT_CREATOR = 8; | ||
2355 | |||
2342 | // Can not be public const? | 2356 | // Can not be public const? |
2343 | public vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); | 2357 | public vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); |
2344 | public rotation ZERO_ROTATION = new rotation(0.0, 0, 0.0, 1.0); | 2358 | public rotation ZERO_ROTATION = new rotation(0.0, 0, 0.0, 1.0); |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 85017373..d1b87db 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -4532,6 +4532,86 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4532 | return src; | 4532 | return src; |
4533 | } | 4533 | } |
4534 | 4534 | ||
4535 | public LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args) | ||
4536 | { | ||
4537 | LSL_Types.list ret = new LSL_Types.list(); | ||
4538 | LLUUID key = new LLUUID(); | ||
4539 | if (LLUUID.TryParse(id, out key)) | ||
4540 | { | ||
4541 | if (World.m_innerScene.ScenePresences.ContainsKey(key)) | ||
4542 | { | ||
4543 | ScenePresence av = World.m_innerScene.ScenePresences[key]; | ||
4544 | foreach(object o in args.Data) | ||
4545 | { | ||
4546 | switch(o.ToString()) | ||
4547 | { | ||
4548 | case "1": | ||
4549 | ret.Add(av.Firstname + " " + av.Lastname); | ||
4550 | break; | ||
4551 | case "2": | ||
4552 | ret.Add(""); | ||
4553 | break; | ||
4554 | case "3": | ||
4555 | ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z)); | ||
4556 | break; | ||
4557 | case "4": | ||
4558 | ret.Add(new LSL_Types.Quaternion((double)av.Rotation.x, (double)av.Rotation.y, (double)av.Rotation.z, (double)av.Rotation.w)); | ||
4559 | break; | ||
4560 | case "5": | ||
4561 | ret.Add(new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z)); | ||
4562 | break; | ||
4563 | case "6": | ||
4564 | ret.Add(id); | ||
4565 | break; | ||
4566 | case "7": | ||
4567 | ret.Add(LLUUID.Zero.ToString()); | ||
4568 | break; | ||
4569 | case "8": | ||
4570 | ret.Add(LLUUID.Zero.ToString()); | ||
4571 | break; | ||
4572 | } | ||
4573 | } | ||
4574 | return ret; | ||
4575 | } | ||
4576 | SceneObjectPart obj = World.GetSceneObjectPart(key); | ||
4577 | if (obj != null) | ||
4578 | { | ||
4579 | foreach(object o in args.Data) | ||
4580 | { | ||
4581 | switch(o.ToString()) | ||
4582 | { | ||
4583 | case "1": | ||
4584 | ret.Add(obj.Name); | ||
4585 | break; | ||
4586 | case "2": | ||
4587 | ret.Add(obj.Description); | ||
4588 | break; | ||
4589 | case "3": | ||
4590 | ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X,obj.AbsolutePosition.Y,obj.AbsolutePosition.Z)); | ||
4591 | break; | ||
4592 | case "4": | ||
4593 | ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W)); | ||
4594 | break; | ||
4595 | case "5": | ||
4596 | ret.Add(new LSL_Types.Vector3(obj.Velocity.X, obj.Velocity.Y, obj.Velocity.Z)); | ||
4597 | break; | ||
4598 | case "6": | ||
4599 | ret.Add(obj.OwnerID.ToString()); | ||
4600 | break; | ||
4601 | case "7": | ||
4602 | ret.Add(obj.GroupID.ToString()); | ||
4603 | break; | ||
4604 | case "8": | ||
4605 | ret.Add(obj.CreatorID.ToString()); | ||
4606 | break; | ||
4607 | } | ||
4608 | } | ||
4609 | return ret; | ||
4610 | } | ||
4611 | } | ||
4612 | return new LSL_Types.list(); | ||
4613 | } | ||
4614 | |||
4535 | // | 4615 | // |
4536 | // OpenSim functions | 4616 | // OpenSim functions |
4537 | // | 4617 | // |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs index cecda07..c8b02da 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs | |||
@@ -635,6 +635,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
635 | //wiki list llGetParcelDetails(vector pos, list params) | 635 | //wiki list llGetParcelDetails(vector pos, list params) |
636 | LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param); | 636 | LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param); |
637 | string llStringTrim(string src, int type); | 637 | string llStringTrim(string src, int type); |
638 | LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args); | ||
638 | //OpenSim functions | 639 | //OpenSim functions |
639 | string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); | 640 | string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); |
640 | string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, | 641 | string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, |