diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime')
6 files changed, 166 insertions, 7 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 b6c21e6..5c6ad8a 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; |
@@ -586,6 +588,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
586 | public const int PRIM_MEDIA_PERM_OWNER = 1; | 588 | public const int PRIM_MEDIA_PERM_OWNER = 1; |
587 | public const int PRIM_MEDIA_PERM_GROUP = 2; | 589 | public const int PRIM_MEDIA_PERM_GROUP = 2; |
588 | public const int PRIM_MEDIA_PERM_ANYONE = 4; | 590 | public const int PRIM_MEDIA_PERM_ANYONE = 4; |
591 | |||
592 | public const int PRIM_PHYSICS_SHAPE_TYPE = 30; | ||
593 | public const int PRIM_PHYSICS_SHAPE_PRIM = 0; | ||
594 | public const int PRIM_PHYSICS_SHAPE_CONVEX = 2; | ||
595 | public const int PRIM_PHYSICS_SHAPE_NONE = 1; | ||
596 | |||
597 | public const int PRIM_PHYSICS_MATERIAL = 31; | ||
598 | public const int DENSITY = 1; | ||
599 | public const int FRICTION = 2; | ||
600 | public const int RESTITUTION = 4; | ||
601 | public const int GRAVITY_MULTIPLIER = 8; | ||
589 | 602 | ||
590 | // extra constants for llSetPrimMediaParams | 603 | // extra constants for llSetPrimMediaParams |
591 | public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0); | 604 | public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0); |
@@ -659,5 +672,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
659 | public static readonly LSLInteger RCERR_UNKNOWN = -1; | 672 | public static readonly LSLInteger RCERR_UNKNOWN = -1; |
660 | public static readonly LSLInteger RCERR_SIM_PERF_LOW = -2; | 673 | public static readonly LSLInteger RCERR_SIM_PERF_LOW = -2; |
661 | public static readonly LSLInteger RCERR_CAST_TIME_EXCEEDED = 3; | 674 | public static readonly LSLInteger RCERR_CAST_TIME_EXCEEDED = 3; |
675 | |||
676 | public const int KFM_MODE = 1; | ||
677 | public const int KFM_LOOP = 1; | ||
678 | public const int KFM_REVERSE = 3; | ||
679 | public const int KFM_FORWARD = 0; | ||
680 | public const int KFM_PING_PONG = 2; | ||
681 | public const int KFM_DATA = 2; | ||
682 | public const int KFM_TRANSLATION = 2; | ||
683 | public const int KFM_ROTATION = 1; | ||
684 | public const int KFM_COMMAND = 0; | ||
685 | public const int KFM_CMD_PLAY = 0; | ||
686 | public const int KFM_CMD_STOP = 1; | ||
687 | public const int KFM_CMD_PAUSE = 2; | ||
662 | } | 688 | } |
663 | } | 689 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index c0bf29c..2d23d30 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(); |
@@ -474,6 +481,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
474 | return m_LSL_Functions.llGetFreeMemory(); | 481 | return m_LSL_Functions.llGetFreeMemory(); |
475 | } | 482 | } |
476 | 483 | ||
484 | public LSL_Integer llGetUsedMemory() | ||
485 | { | ||
486 | return m_LSL_Functions.llGetUsedMemory(); | ||
487 | } | ||
488 | |||
477 | public LSL_Integer llGetFreeURLs() | 489 | public LSL_Integer llGetFreeURLs() |
478 | { | 490 | { |
479 | return m_LSL_Functions.llGetFreeURLs(); | 491 | return m_LSL_Functions.llGetFreeURLs(); |
@@ -579,6 +591,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
579 | return m_LSL_Functions.llGetMass(); | 591 | return m_LSL_Functions.llGetMass(); |
580 | } | 592 | } |
581 | 593 | ||
594 | public LSL_Float llGetMassMKS() | ||
595 | { | ||
596 | return m_LSL_Functions.llGetMassMKS(); | ||
597 | } | ||
598 | |||
582 | public LSL_Integer llGetMemoryLimit() | 599 | public LSL_Integer llGetMemoryLimit() |
583 | { | 600 | { |
584 | return m_LSL_Functions.llGetMemoryLimit(); | 601 | return m_LSL_Functions.llGetMemoryLimit(); |
@@ -844,11 +861,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
844 | return m_LSL_Functions.llGetUnixTime(); | 861 | return m_LSL_Functions.llGetUnixTime(); |
845 | } | 862 | } |
846 | 863 | ||
847 | public LSL_Integer llGetUsedMemory() | ||
848 | { | ||
849 | return m_LSL_Functions.llGetUsedMemory(); | ||
850 | } | ||
851 | |||
852 | public LSL_Vector llGetVel() | 864 | public LSL_Vector llGetVel() |
853 | { | 865 | { |
854 | return m_LSL_Functions.llGetVel(); | 866 | return m_LSL_Functions.llGetVel(); |
@@ -874,6 +886,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
874 | return m_LSL_Functions.llGiveMoney(destination, amount); | 886 | return m_LSL_Functions.llGiveMoney(destination, amount); |
875 | } | 887 | } |
876 | 888 | ||
889 | public LSL_String llTransferLindenDollars(string destination, int amount) | ||
890 | { | ||
891 | return m_LSL_Functions.llTransferLindenDollars(destination, amount); | ||
892 | } | ||
893 | |||
877 | public void llGodLikeRezObject(string inventory, LSL_Vector pos) | 894 | public void llGodLikeRezObject(string inventory, LSL_Vector pos) |
878 | { | 895 | { |
879 | m_LSL_Functions.llGodLikeRezObject(inventory, pos); | 896 | m_LSL_Functions.llGodLikeRezObject(inventory, pos); |
@@ -1598,6 +1615,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1598 | m_LSL_Functions.llSetPos(pos); | 1615 | m_LSL_Functions.llSetPos(pos); |
1599 | } | 1616 | } |
1600 | 1617 | ||
1618 | public LSL_Integer llSetRegionPos(LSL_Vector pos) | ||
1619 | { | ||
1620 | return m_LSL_Functions.llSetRegionPos(pos); | ||
1621 | } | ||
1622 | |||
1601 | public void llSetPrimitiveParams(LSL_List rules) | 1623 | public void llSetPrimitiveParams(LSL_List rules) |
1602 | { | 1624 | { |
1603 | m_LSL_Functions.llSetPrimitiveParams(rules); | 1625 | m_LSL_Functions.llSetPrimitiveParams(rules); |
@@ -1833,6 +1855,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1833 | m_LSL_Functions.llTargetRemove(number); | 1855 | m_LSL_Functions.llTargetRemove(number); |
1834 | } | 1856 | } |
1835 | 1857 | ||
1858 | public void llTeleportAgent(string agent, string simname, LSL_Vector pos, LSL_Vector lookAt) | ||
1859 | { | ||
1860 | m_LSL_Functions.llTeleportAgent(agent, simname, pos, lookAt); | ||
1861 | } | ||
1862 | |||
1836 | public void llTeleportAgentHome(string agent) | 1863 | public void llTeleportAgentHome(string agent) |
1837 | { | 1864 | { |
1838 | m_LSL_Functions.llTeleportAgentHome(agent); | 1865 | m_LSL_Functions.llTeleportAgentHome(agent); |
@@ -1948,9 +1975,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1948 | return m_LSL_Functions.llClearLinkMedia(link, face); | 1975 | return m_LSL_Functions.llClearLinkMedia(link, face); |
1949 | } | 1976 | } |
1950 | 1977 | ||
1951 | public void print(string str) | 1978 | public LSL_Integer llGetLinkNumberOfSides(LSL_Integer link) |
1979 | { | ||
1980 | return m_LSL_Functions.llGetLinkNumberOfSides(link); | ||
1981 | } | ||
1982 | |||
1983 | public void llSetKeyframedMotion(LSL_List frames, LSL_List options) | ||
1984 | { | ||
1985 | m_LSL_Functions.llSetKeyframedMotion(frames, options); | ||
1986 | } | ||
1987 | |||
1988 | public void llSetPhysicsMaterial(int material_bits, float material_gravity_modifier, float material_restitution, float material_friction, float material_density) | ||
1952 | { | 1989 | { |
1953 | m_LSL_Functions.print(str); | 1990 | m_LSL_Functions.llSetPhysicsMaterial(material_bits, material_gravity_modifier, material_restitution, material_friction, material_density); |
1954 | } | 1991 | } |
1955 | } | 1992 | } |
1956 | } | 1993 | } |
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); |