diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime')
6 files changed, 161 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs new file mode 100644 index 0000000..4132dfa --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Runtime.Remoting.Lifetime; | ||
30 | using System.Threading; | ||
31 | using System.Reflection; | ||
32 | using System.Collections; | ||
33 | using System.Collections.Generic; | ||
34 | using OpenSim.Framework; | ||
35 | using OpenSim.Region.Framework.Interfaces; | ||
36 | using OpenSim.Region.ScriptEngine.Interfaces; | ||
37 | using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; | ||
38 | using integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||
39 | using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; | ||
40 | using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | ||
41 | using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||
42 | using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | ||
43 | using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||
44 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | ||
45 | using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||
46 | |||
47 | namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | ||
48 | { | ||
49 | public partial class ScriptBaseClass : MarshalByRefObject | ||
50 | { | ||
51 | public ICM_Api m_CM_Functions; | ||
52 | |||
53 | public void ApiTypeCM(IScriptApi api) | ||
54 | { | ||
55 | if (!(api is ICM_Api)) | ||
56 | return; | ||
57 | |||
58 | m_CM_Functions = (ICM_Api)api; | ||
59 | } | ||
60 | |||
61 | public string cmDetectedCountry(int num) | ||
62 | { | ||
63 | return m_CM_Functions.cmDetectedCountry(num); | ||
64 | } | ||
65 | |||
66 | public string cmGetAgentCountry(key key) | ||
67 | { | ||
68 | return m_CM_Functions.cmGetAgentCountry(key); | ||
69 | } | ||
70 | } | ||
71 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs index 9615315..943d7a2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Diagnostics; //for [DebuggerNonUserCode] | ||
30 | using System.Reflection; | 31 | using System.Reflection; |
31 | using System.Runtime.Remoting.Lifetime; | 32 | using System.Runtime.Remoting.Lifetime; |
32 | using OpenSim.Region.ScriptEngine.Shared; | 33 | using OpenSim.Region.ScriptEngine.Shared; |
@@ -132,6 +133,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
132 | return (eventFlags); | 133 | return (eventFlags); |
133 | } | 134 | } |
134 | 135 | ||
136 | [DebuggerNonUserCode] | ||
135 | public void ExecuteEvent(string state, string FunctionName, object[] args) | 137 | public void ExecuteEvent(string state, string FunctionName, object[] args) |
136 | { | 138 | { |
137 | // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory. | 139 | // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory. |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 5a53e15..4ce3cf1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | |||
@@ -94,6 +94,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
94 | public const int AGENT_CROUCHING = 1024; | 94 | public const int AGENT_CROUCHING = 1024; |
95 | public const int AGENT_BUSY = 2048; | 95 | public const int AGENT_BUSY = 2048; |
96 | public const int AGENT_ALWAYS_RUN = 4096; | 96 | public const int AGENT_ALWAYS_RUN = 4096; |
97 | public const int AGENT_MALE = 8192; | ||
97 | 98 | ||
98 | //Particle Systems | 99 | //Particle Systems |
99 | public const int PSYS_PART_INTERP_COLOR_MASK = 1; | 100 | public const int PSYS_PART_INTERP_COLOR_MASK = 1; |
@@ -282,6 +283,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
282 | public const int CHANGED_REGION_START = 1024; //LL Changed the constant from CHANGED_REGION_RESTART | 283 | public const int CHANGED_REGION_START = 1024; //LL Changed the constant from CHANGED_REGION_RESTART |
283 | public const int CHANGED_MEDIA = 2048; | 284 | public const int CHANGED_MEDIA = 2048; |
284 | public const int CHANGED_ANIMATION = 16384; | 285 | public const int CHANGED_ANIMATION = 16384; |
286 | public const int CHANGED_POSITION = 32768; | ||
285 | public const int TYPE_INVALID = 0; | 287 | public const int TYPE_INVALID = 0; |
286 | public const int TYPE_INTEGER = 1; | 288 | public const int TYPE_INTEGER = 1; |
287 | public const int TYPE_FLOAT = 2; | 289 | public const int TYPE_FLOAT = 2; |
@@ -568,6 +570,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
568 | public const int PRIM_MEDIA_PERM_OWNER = 1; | 570 | public const int PRIM_MEDIA_PERM_OWNER = 1; |
569 | public const int PRIM_MEDIA_PERM_GROUP = 2; | 571 | public const int PRIM_MEDIA_PERM_GROUP = 2; |
570 | public const int PRIM_MEDIA_PERM_ANYONE = 4; | 572 | public const int PRIM_MEDIA_PERM_ANYONE = 4; |
573 | |||
574 | public const int PRIM_PHYSICS_SHAPE_TYPE = 30; | ||
575 | public const int PRIM_PHYSICS_SHAPE_PRIM = 0; | ||
576 | public const int PRIM_PHYSICS_SHAPE_CONVEX = 2; | ||
577 | public const int PRIM_PHYSICS_SHAPE_NONE = 1; | ||
578 | |||
579 | public const int PRIM_PHYSICS_MATERIAL = 31; | ||
580 | public const int DENSITY = 1; | ||
581 | public const int FRICTION = 2; | ||
582 | public const int RESTITUTION = 4; | ||
583 | public const int GRAVITY_MULTIPLIER = 8; | ||
571 | 584 | ||
572 | // extra constants for llSetPrimMediaParams | 585 | // extra constants for llSetPrimMediaParams |
573 | public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0); | 586 | public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0); |
@@ -640,5 +653,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
640 | public static readonly LSLInteger RCERR_UNKNOWN = -1; | 653 | public static readonly LSLInteger RCERR_UNKNOWN = -1; |
641 | public static readonly LSLInteger RCERR_SIM_PERF_LOW = -2; | 654 | public static readonly LSLInteger RCERR_SIM_PERF_LOW = -2; |
642 | public static readonly LSLInteger RCERR_CAST_TIME_EXCEEDED = 3; | 655 | public static readonly LSLInteger RCERR_CAST_TIME_EXCEEDED = 3; |
656 | |||
657 | public const int KFM_MODE = 1; | ||
658 | public const int KFM_LOOP = 1; | ||
659 | public const int KFM_REVERSE = 3; | ||
660 | public const int KFM_FORWARD = 0; | ||
661 | public const int KFM_PING_PONG = 2; | ||
662 | public const int KFM_DATA = 2; | ||
663 | public const int KFM_TRANSLATION = 2; | ||
664 | public const int KFM_ROTATION = 1; | ||
665 | public const int KFM_COMMAND = 0; | ||
666 | public const int KFM_CMD_PLAY = 0; | ||
667 | public const int KFM_CMD_STOP = 1; | ||
668 | public const int KFM_CMD_PAUSE = 2; | ||
643 | } | 669 | } |
644 | } | 670 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index f8e3c36..bf58d13 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Diagnostics; //for [DebuggerNonUserCode] | ||
29 | using System.Runtime.Remoting.Lifetime; | 30 | using System.Runtime.Remoting.Lifetime; |
30 | using System.Threading; | 31 | using System.Threading; |
31 | using System.Reflection; | 32 | using System.Reflection; |
@@ -164,6 +165,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
164 | m_LSL_Functions.llBreakLink(linknum); | 165 | m_LSL_Functions.llBreakLink(linknum); |
165 | } | 166 | } |
166 | 167 | ||
168 | public LSL_List llCastRay(LSL_Vector start, LSL_Vector end, LSL_List options) | ||
169 | { | ||
170 | return m_LSL_Functions.llCastRay(start, end, options); | ||
171 | } | ||
172 | |||
167 | public LSL_Integer llCeil(double f) | 173 | public LSL_Integer llCeil(double f) |
168 | { | 174 | { |
169 | return m_LSL_Functions.llCeil(f); | 175 | return m_LSL_Functions.llCeil(f); |
@@ -314,6 +320,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
314 | m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel); | 320 | m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel); |
315 | } | 321 | } |
316 | 322 | ||
323 | [DebuggerNonUserCode] | ||
317 | public void llDie() | 324 | public void llDie() |
318 | { | 325 | { |
319 | m_LSL_Functions.llDie(); | 326 | m_LSL_Functions.llDie(); |
@@ -464,6 +471,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
464 | return m_LSL_Functions.llGetFreeMemory(); | 471 | return m_LSL_Functions.llGetFreeMemory(); |
465 | } | 472 | } |
466 | 473 | ||
474 | public LSL_Integer llGetUsedMemory() | ||
475 | { | ||
476 | return m_LSL_Functions.llGetUsedMemory(); | ||
477 | } | ||
478 | |||
467 | public LSL_Integer llGetFreeURLs() | 479 | public LSL_Integer llGetFreeURLs() |
468 | { | 480 | { |
469 | return m_LSL_Functions.llGetFreeURLs(); | 481 | return m_LSL_Functions.llGetFreeURLs(); |
@@ -849,6 +861,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
849 | return m_LSL_Functions.llGiveMoney(destination, amount); | 861 | return m_LSL_Functions.llGiveMoney(destination, amount); |
850 | } | 862 | } |
851 | 863 | ||
864 | public LSL_String llTransferLindenDollars(string destination, int amount) | ||
865 | { | ||
866 | return m_LSL_Functions.llTransferLindenDollars(destination, amount); | ||
867 | } | ||
868 | |||
852 | public void llGodLikeRezObject(string inventory, LSL_Vector pos) | 869 | public void llGodLikeRezObject(string inventory, LSL_Vector pos) |
853 | { | 870 | { |
854 | m_LSL_Functions.llGodLikeRezObject(inventory, pos); | 871 | m_LSL_Functions.llGodLikeRezObject(inventory, pos); |
@@ -1563,6 +1580,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1563 | m_LSL_Functions.llSetPos(pos); | 1580 | m_LSL_Functions.llSetPos(pos); |
1564 | } | 1581 | } |
1565 | 1582 | ||
1583 | public LSL_Integer llSetRegionPos(LSL_Vector pos) | ||
1584 | { | ||
1585 | return m_LSL_Functions.llSetRegionPos(pos); | ||
1586 | } | ||
1587 | |||
1566 | public void llSetPrimitiveParams(LSL_List rules) | 1588 | public void llSetPrimitiveParams(LSL_List rules) |
1567 | { | 1589 | { |
1568 | m_LSL_Functions.llSetPrimitiveParams(rules); | 1590 | m_LSL_Functions.llSetPrimitiveParams(rules); |
@@ -1798,6 +1820,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1798 | m_LSL_Functions.llTargetRemove(number); | 1820 | m_LSL_Functions.llTargetRemove(number); |
1799 | } | 1821 | } |
1800 | 1822 | ||
1823 | public void llTeleportAgent(string agent, string simname, LSL_Vector pos, LSL_Vector lookAt) | ||
1824 | { | ||
1825 | m_LSL_Functions.llTeleportAgent(agent, simname, pos, lookAt); | ||
1826 | } | ||
1827 | |||
1801 | public void llTeleportAgentHome(string agent) | 1828 | public void llTeleportAgentHome(string agent) |
1802 | { | 1829 | { |
1803 | m_LSL_Functions.llTeleportAgentHome(agent); | 1830 | m_LSL_Functions.llTeleportAgentHome(agent); |
@@ -1913,9 +1940,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1913 | return m_LSL_Functions.llClearLinkMedia(link, face); | 1940 | return m_LSL_Functions.llClearLinkMedia(link, face); |
1914 | } | 1941 | } |
1915 | 1942 | ||
1916 | public void print(string str) | 1943 | public LSL_Integer llGetLinkNumberOfSides(LSL_Integer link) |
1944 | { | ||
1945 | return m_LSL_Functions.llGetLinkNumberOfSides(link); | ||
1946 | } | ||
1947 | |||
1948 | public void llSetKeyframedMotion(LSL_List frames, LSL_List options) | ||
1949 | { | ||
1950 | m_LSL_Functions.llSetKeyframedMotion(frames, options); | ||
1951 | } | ||
1952 | |||
1953 | public void llSetPhysicsMaterial(int material_bits, float material_gravity_modifier, float material_restitution, float material_friction, float material_density) | ||
1917 | { | 1954 | { |
1918 | m_LSL_Functions.print(str); | 1955 | m_LSL_Functions.llSetPhysicsMaterial(material_bits, material_gravity_modifier, material_restitution, material_friction, material_density); |
1919 | } | 1956 | } |
1920 | } | 1957 | } |
1921 | } | 1958 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs index 143b497..2e27f16 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs | |||
@@ -72,9 +72,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
72 | { | 72 | { |
73 | return m_LS_Functions.lsSetWindlightSceneTargeted(rules, target); | 73 | return m_LS_Functions.lsSetWindlightSceneTargeted(rules, target); |
74 | } | 74 | } |
75 | |||
75 | public void lsClearWindlightScene() | 76 | public void lsClearWindlightScene() |
76 | { | 77 | { |
77 | m_LS_Functions.lsClearWindlightScene(); | 78 | m_LS_Functions.lsClearWindlightScene(); |
78 | } | 79 | } |
80 | |||
81 | public LSL_List cmGetWindlightScene(LSL_List rules) | ||
82 | { | ||
83 | return m_LS_Functions.lsGetWindlightScene(rules); | ||
84 | } | ||
85 | |||
86 | public int cmSetWindlightScene(LSL_List rules) | ||
87 | { | ||
88 | return m_LS_Functions.lsSetWindlightScene(rules); | ||
89 | } | ||
90 | |||
91 | public int cmSetWindlightSceneTargeted(LSL_List rules, key target) | ||
92 | { | ||
93 | return m_LS_Functions.lsSetWindlightSceneTargeted(rules, target); | ||
94 | } | ||
95 | |||
96 | public void cmClearWindlightScene() | ||
97 | { | ||
98 | m_LS_Functions.lsClearWindlightScene(); | ||
99 | } | ||
79 | } | 100 | } |
80 | } | 101 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs index edbbc2a..b138da3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | |||
@@ -33,6 +33,7 @@ using System.Threading; | |||
33 | using System.Reflection; | 33 | using System.Reflection; |
34 | using System.Collections; | 34 | using System.Collections; |
35 | using System.Collections.Generic; | 35 | using System.Collections.Generic; |
36 | using System.Diagnostics; //for [DebuggerNonUserCode] | ||
36 | using OpenSim.Region.ScriptEngine.Interfaces; | 37 | using OpenSim.Region.ScriptEngine.Interfaces; |
37 | using OpenSim.Region.ScriptEngine.Shared; | 38 | using OpenSim.Region.ScriptEngine.Shared; |
38 | using OpenSim.Region.ScriptEngine.Shared.Api.Runtime; | 39 | using OpenSim.Region.ScriptEngine.Shared.Api.Runtime; |
@@ -90,6 +91,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
90 | return (int)m_Executor.GetStateEventFlags(state); | 91 | return (int)m_Executor.GetStateEventFlags(state); |
91 | } | 92 | } |
92 | 93 | ||
94 | [DebuggerNonUserCode] | ||
93 | public void ExecuteEvent(string state, string FunctionName, object[] args) | 95 | public void ExecuteEvent(string state, string FunctionName, object[] args) |
94 | { | 96 | { |
95 | m_Executor.ExecuteEvent(state, FunctionName, args); | 97 | m_Executor.ExecuteEvent(state, FunctionName, args); |