aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ScriptEngine/Shared
diff options
context:
space:
mode:
authorMelanie2009-10-27 20:28:12 +0000
committerMelanie2009-10-27 20:28:12 +0000
commit0d37883bfdb1c8e15187f63f170765c7909a6650 (patch)
tree25a5d722292d038d1ca314199b29efed54aed426 /OpenSim/ScriptEngine/Shared
parentMerge branch 'master' into vehicles (diff)
parentRemove the rest of SECS. It was never used, except by an experimental version (diff)
downloadopensim-SC-0d37883bfdb1c8e15187f63f170765c7909a6650.zip
opensim-SC-0d37883bfdb1c8e15187f63f170765c7909a6650.tar.gz
opensim-SC-0d37883bfdb1c8e15187f63f170765c7909a6650.tar.bz2
opensim-SC-0d37883bfdb1c8e15187f63f170765c7909a6650.tar.xz
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/ScriptEngine/Shared')
-rw-r--r--OpenSim/ScriptEngine/Shared/EventParams.cs82
-rw-r--r--OpenSim/ScriptEngine/Shared/IScriptCommandProvider.cs37
-rw-r--r--OpenSim/ScriptEngine/Shared/IScriptCompiler.cs40
-rw-r--r--OpenSim/ScriptEngine/Shared/IScriptEngine.cs49
-rw-r--r--OpenSim/ScriptEngine/Shared/IScriptEngineComponent.cs36
-rw-r--r--OpenSim/ScriptEngine/Shared/IScriptEngineRegionComponent.cs34
-rw-r--r--OpenSim/ScriptEngine/Shared/IScriptEventProvider.cs38
-rw-r--r--OpenSim/ScriptEngine/Shared/IScriptExecutor.cs39
-rw-r--r--OpenSim/ScriptEngine/Shared/IScriptLoader.cs36
-rw-r--r--OpenSim/ScriptEngine/Shared/IScriptScheduler.cs41
-rw-r--r--OpenSim/ScriptEngine/Shared/Properties/AssemblyInfo.cs63
-rw-r--r--OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs120
-rw-r--r--OpenSim/ScriptEngine/Shared/ScriptMetaData.cs95
-rw-r--r--OpenSim/ScriptEngine/Shared/ScriptStructure.cs137
14 files changed, 0 insertions, 847 deletions
diff --git a/OpenSim/ScriptEngine/Shared/EventParams.cs b/OpenSim/ScriptEngine/Shared/EventParams.cs
deleted file mode 100644
index 28eaa58..0000000
--- a/OpenSim/ScriptEngine/Shared/EventParams.cs
+++ /dev/null
@@ -1,82 +0,0 @@
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
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenMetaverse;
32using OpenSim.Region.ScriptEngine.Shared;
33using log4net;
34using System.Reflection;
35
36namespace OpenSim.ScriptEngine.Shared
37{
38 /// <summary>
39 /// Holds all the data required to execute a scripting event.
40 /// </summary>
41 public class EventParams
42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 public string EventName;
45 public Object[] Params;
46 public Region.ScriptEngine.Shared.DetectParams[] DetectParams;
47 public uint LocalID;
48 public UUID ItemID;
49
50 public EventParams(uint localID, UUID itemID, string eventName, Object[] eventParams, DetectParams[] detectParams)
51 {
52 LocalID = localID;
53 ItemID = itemID;
54 EventName = eventName;
55 Params = eventParams;
56 DetectParams = detectParams;
57 }
58 public EventParams(uint localID, string eventName, Object[] eventParams, DetectParams[] detectParams)
59 {
60 LocalID = localID;
61 EventName = eventName;
62 Params = eventParams;
63 DetectParams = detectParams;
64 }
65 public void test(params object[] args)
66 {
67 string functionName = "test";
68 test2(functionName, args);
69 }
70 public void test2(string functionName, params object[] args)
71 {
72 String logMessage = functionName;
73 foreach (object arg in args)
74 {
75 logMessage +=", "+arg;
76 }
77 m_log.Debug(logMessage);
78 }
79
80
81 }
82}
diff --git a/OpenSim/ScriptEngine/Shared/IScriptCommandProvider.cs b/OpenSim/ScriptEngine/Shared/IScriptCommandProvider.cs
deleted file mode 100644
index b2498d6..0000000
--- a/OpenSim/ScriptEngine/Shared/IScriptCommandProvider.cs
+++ /dev/null
@@ -1,37 +0,0 @@
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
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.ScriptEngine.Shared
33{
34 public interface IScriptCommandProvider : ScriptAssemblies.ICommandProvider
35 {
36 }
37}
diff --git a/OpenSim/ScriptEngine/Shared/IScriptCompiler.cs b/OpenSim/ScriptEngine/Shared/IScriptCompiler.cs
deleted file mode 100644
index 57249fd..0000000
--- a/OpenSim/ScriptEngine/Shared/IScriptCompiler.cs
+++ /dev/null
@@ -1,40 +0,0 @@
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 */
27using System;
28using System.Collections.Generic;
29using System.Reflection;
30using System.Text;
31using ScriptAssemblies;
32
33namespace OpenSim.ScriptEngine.Shared
34{
35 public interface IScriptCompiler : IScriptEngineComponent
36 {
37 string Compile(ScriptMetaData scriptMetaData, ref string script);
38 string PreProcessScript(ref string script);
39 }
40} \ No newline at end of file
diff --git a/OpenSim/ScriptEngine/Shared/IScriptEngine.cs b/OpenSim/ScriptEngine/Shared/IScriptEngine.cs
deleted file mode 100644
index 3acd1d5..0000000
--- a/OpenSim/ScriptEngine/Shared/IScriptEngine.cs
+++ /dev/null
@@ -1,49 +0,0 @@
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 */
27using System;
28using System.Collections.Generic;
29using System.Text;
30using Nini.Config;
31using OpenSim.Region.Framework.Interfaces;
32using OpenSim.Region.Framework.Scenes;
33
34namespace OpenSim.ScriptEngine.Shared
35{
36 public interface IScriptEngine
37 {
38 //string[] ComponentNames { get; }
39 //Dictionary<string, IScriptEngineComponent> Components { get; }
40 //void InitializeComponents();
41 void Initialise(Scene scene, IConfigSource source);
42 void PostInitialise();
43 void Close();
44 string Name { get; }
45 // string Name { get; }
46 //void Initialize();
47 //void Close();
48 }
49} \ No newline at end of file
diff --git a/OpenSim/ScriptEngine/Shared/IScriptEngineComponent.cs b/OpenSim/ScriptEngine/Shared/IScriptEngineComponent.cs
deleted file mode 100644
index 0959b53..0000000
--- a/OpenSim/ScriptEngine/Shared/IScriptEngineComponent.cs
+++ /dev/null
@@ -1,36 +0,0 @@
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 */
27using System;
28using System.Collections.Generic;
29using System.Text;
30
31namespace OpenSim.ScriptEngine.Shared
32{
33 public interface IScriptEngineComponent
34 {
35 }
36} \ No newline at end of file
diff --git a/OpenSim/ScriptEngine/Shared/IScriptEngineRegionComponent.cs b/OpenSim/ScriptEngine/Shared/IScriptEngineRegionComponent.cs
deleted file mode 100644
index eeb86c1..0000000
--- a/OpenSim/ScriptEngine/Shared/IScriptEngineRegionComponent.cs
+++ /dev/null
@@ -1,34 +0,0 @@
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
28namespace OpenSim.ScriptEngine.Shared
29{
30 public interface IScriptEngineRegionComponent
31 {
32 void Initialize(RegionInfoStructure currentRegion);
33 }
34}
diff --git a/OpenSim/ScriptEngine/Shared/IScriptEventProvider.cs b/OpenSim/ScriptEngine/Shared/IScriptEventProvider.cs
deleted file mode 100644
index b796a4b..0000000
--- a/OpenSim/ScriptEngine/Shared/IScriptEventProvider.cs
+++ /dev/null
@@ -1,38 +0,0 @@
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
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.ScriptEngine.Shared
33{
34 public interface IScriptEventProvider : IScriptEngineComponent, IScriptEngineRegionComponent
35 {
36
37 }
38} \ No newline at end of file
diff --git a/OpenSim/ScriptEngine/Shared/IScriptExecutor.cs b/OpenSim/ScriptEngine/Shared/IScriptExecutor.cs
deleted file mode 100644
index a48c7e5..0000000
--- a/OpenSim/ScriptEngine/Shared/IScriptExecutor.cs
+++ /dev/null
@@ -1,39 +0,0 @@
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 */
27using System;
28using System.Collections.Generic;
29using System.Text;
30using OpenSim.ScriptEngine.Shared;
31
32namespace OpenSim.ScriptEngine.Shared
33{
34 public interface IScriptExecutor : IScriptEngineComponent, IScriptEngineRegionComponent
35 {
36 void ExecuteCommand(ref ScriptStructure scriptContainer, EventParams p);
37 void ExecuteCommand(EventParams p);
38 }
39} \ No newline at end of file
diff --git a/OpenSim/ScriptEngine/Shared/IScriptLoader.cs b/OpenSim/ScriptEngine/Shared/IScriptLoader.cs
deleted file mode 100644
index 6beea17..0000000
--- a/OpenSim/ScriptEngine/Shared/IScriptLoader.cs
+++ /dev/null
@@ -1,36 +0,0 @@
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
28using OpenSim.ScriptEngine.Shared;
29
30namespace OpenSim.ScriptEngine.Shared
31{
32 public interface IScriptLoader: IScriptEngineComponent
33 {
34 ScriptAssemblies.IScript LoadScript(ScriptStructure script);
35 }
36} \ No newline at end of file
diff --git a/OpenSim/ScriptEngine/Shared/IScriptScheduler.cs b/OpenSim/ScriptEngine/Shared/IScriptScheduler.cs
deleted file mode 100644
index cf1f1ab..0000000
--- a/OpenSim/ScriptEngine/Shared/IScriptScheduler.cs
+++ /dev/null
@@ -1,41 +0,0 @@
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 */
27using System;
28using System.Collections.Generic;
29using System.Text;
30using OpenMetaverse;
31using OpenSim.ScriptEngine.Shared;
32
33namespace OpenSim.ScriptEngine.Shared
34{
35 public interface IScriptScheduler : IScriptEngineComponent
36 {
37 void AddScript(ScriptStructure script);
38 void Removecript(uint id, UUID itemID);
39 void Close();
40 }
41} \ No newline at end of file
diff --git a/OpenSim/ScriptEngine/Shared/Properties/AssemblyInfo.cs b/OpenSim/ScriptEngine/Shared/Properties/AssemblyInfo.cs
deleted file mode 100644
index 4ce44ed..0000000
--- a/OpenSim/ScriptEngine/Shared/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,63 +0,0 @@
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
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices;
31
32// General Information about an assembly is controlled through the following
33// set of attributes. Change these attribute values to modify the information
34// associated with an assembly.
35[assembly: AssemblyTitle("OpenSim.ScriptEngine.Shared")]
36[assembly: AssemblyDescription("")]
37[assembly: AssemblyConfiguration("")]
38[assembly: AssemblyCompany("http://opensimulator.org")]
39[assembly: AssemblyProduct("OpenSim.ScriptEngine.Shared")]
40[assembly: AssemblyCopyright("Copyright © Microsoft 2008")]
41[assembly: AssemblyTrademark("")]
42[assembly: AssemblyCulture("")]
43
44// Setting ComVisible to false makes the types in this assembly not visible
45// to COM components. If you need to access a type in this assembly from
46// COM, set the ComVisible attribute to true on that type.
47[assembly: ComVisible(false)]
48
49// The following GUID is for the ID of the typelib if this project is exposed to COM
50[assembly: Guid("ea77002b-c967-4368-ace9-6533f8147d4b")]
51
52// Version information for an assembly consists of the following four values:
53//
54// Major Version
55// Minor Version
56// Build Number
57// Revision
58//
59// You can specify all the values or you can default the Build and Revision Numbers
60// by using the '*' as shown below:
61// [assembly: AssemblyVersion("0.6.5.*")]
62[assembly: AssemblyVersion("0.6.5.*")]
63[assembly: AssemblyFileVersion("0.6.5.0")]
diff --git a/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs b/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs
deleted file mode 100644
index 64b33d4..0000000
--- a/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs
+++ /dev/null
@@ -1,120 +0,0 @@
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
28using System;
29using System.Collections.Generic;
30using System.Reflection;
31using log4net;
32using Nini.Config;
33using OpenSim.Region.Framework.Scenes;
34using OpenSim.Region.ScriptEngine.Shared;
35using OpenSim.ScriptEngine.Shared;
36using EventParams = OpenSim.ScriptEngine.Shared.EventParams;
37
38namespace OpenSim.ScriptEngine.Shared
39{
40 public struct RegionInfoStructure
41 {
42 public Scene Scene;
43 public IConfigSource ConfigSource;
44
45 public IScriptLoader ScriptLoader;
46 public Dictionary<string, IScriptEventProvider> EventProviders;
47 public Dictionary<string, IScriptExecutor> Executors;
48 public Dictionary<string, IScriptCompiler> Compilers;
49 public Dictionary<string, IScriptScheduler> Schedulers;
50 public Dictionary<string, IScriptCommandProvider> CommandProviders;
51
52 public void Executors_Execute(EventParams p)
53 {
54 // Execute a command on all executors
55 lock (Executors)
56 {
57 foreach (IScriptExecutor exec in Executors.Values)
58 {
59 exec.ExecuteCommand(p);
60 }
61 }
62 }
63 public void Executors_Execute(ScriptStructure scriptContainer, EventParams p)
64 {
65 // Execute a command on all executors
66 lock (Executors)
67 {
68 foreach (IScriptExecutor exec in Executors.Values)
69 {
70 exec.ExecuteCommand(ref scriptContainer, p);
71 }
72 }
73 }
74
75 public IScriptCompiler FindCompiler(ScriptMetaData scriptMetaData)
76 {
77 string compiler = "Compiler_LSL";
78 if (scriptMetaData.ContainsKey("Compiler"))
79 compiler = scriptMetaData["Compiler"];
80
81 lock (Compilers)
82 {
83 if (!Compilers.ContainsKey(compiler))
84 throw new Exception("Requested script compiler \"" + compiler + "\" does not exist.");
85
86 return Compilers[compiler];
87 }
88 }
89
90 public IScriptScheduler FindScheduler(ScriptMetaData scriptMetaData)
91 {
92 string scheduler = "Scheduler";
93 if (scriptMetaData.ContainsKey("Scheduler"))
94 scheduler = scriptMetaData["Scheduler"];
95
96 lock (Schedulers)
97 {
98 if (!Schedulers.ContainsKey(scheduler))
99 throw new Exception("Requested script scheduler \"" + scheduler + "\" does not exist.");
100
101 return Schedulers[scheduler];
102 }
103 }
104
105 //public Assembly[] GetCommandProviderAssemblies()
106 //{
107 // lock (CommandProviders)
108 // {
109 // Assembly[] ass = new Assembly[CommandProviders.Count];
110 // int i = 0;
111 // foreach (string key in CommandProviders.Keys)
112 // {
113 // ass[i] = CommandProviders[key].GetType().Assembly;
114 // i++;
115 // }
116 // return ass;
117 // }
118 //}
119 }
120} \ No newline at end of file
diff --git a/OpenSim/ScriptEngine/Shared/ScriptMetaData.cs b/OpenSim/ScriptEngine/Shared/ScriptMetaData.cs
deleted file mode 100644
index e351632..0000000
--- a/OpenSim/ScriptEngine/Shared/ScriptMetaData.cs
+++ /dev/null
@@ -1,95 +0,0 @@
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 */
27using System;
28using System.Collections.Generic;
29
30namespace OpenSim.ScriptEngine.Shared
31{
32 public class ScriptMetaData: Dictionary<string, string>
33 {
34 private static readonly char[] LineSeparator = "\r\n".ToCharArray();
35 private static readonly char[] Separator = { ':' };
36 public static ScriptMetaData Extract(ref string Script)
37 {
38 ScriptMetaData ret = new ScriptMetaData();
39 if (string.IsNullOrEmpty(Script))
40 return ret;
41
42 // Process it line by line
43 string Line = "";
44 for (int i = 0; i < Script.Length + 1; i++)
45 {
46 // Found a line separator?
47 if (i < Script.Length
48 && Script[i] != LineSeparator[0]
49 && Script[i] != LineSeparator[1])
50 {
51 // No, not end of line. Add to current line
52 Line += Script[i];
53 }
54 else
55 {
56 // Extract MetaData from this line. Returns False if not found.
57 if (!_GetMetaFromLine(ret, Line))
58 continue;
59 // Empty for next round
60 Line = "";
61 }
62 }
63 return ret;
64 }
65
66 private static bool _GetMetaFromLine(ScriptMetaData ret, string line)
67 {
68 line = line.Trim();
69
70 // Empty line? We may find more later
71 if (line == "")
72 return true;
73
74 // Is this a comment? If not, then return false
75 if (!line.StartsWith("//"))
76 return false;
77
78 // It is a comment
79 string[] keyval = line.Split(Separator, 2, StringSplitOptions.None);
80 keyval[0] = keyval[0].Substring(2, keyval[0].Length - 2).Trim();
81 keyval[1] = keyval[1].Trim();
82
83 // Add it
84 if (keyval[0] != "")
85 if (!ret.ContainsKey(keyval[0]))
86 {
87 //m_log.DebugFormat("[DotNetEngine] Script metadata: Key: \"{0}\", Value: \"{1}\".", keyval[0], keyval[1]);
88 ret.Add(keyval[0], keyval[1]);
89 }
90
91 return true;
92 }
93
94 }
95} \ No newline at end of file
diff --git a/OpenSim/ScriptEngine/Shared/ScriptStructure.cs b/OpenSim/ScriptEngine/Shared/ScriptStructure.cs
deleted file mode 100644
index 1095a8b..0000000
--- a/OpenSim/ScriptEngine/Shared/ScriptStructure.cs
+++ /dev/null
@@ -1,137 +0,0 @@
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
28using System;
29using System.Collections.Generic;
30using System.Reflection;
31using System.Text;
32using log4net;
33using OpenMetaverse;
34using OpenSim.Region.ScriptEngine.Interfaces;
35using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
36using OpenSim.ScriptEngine.Shared;
37
38namespace OpenSim.ScriptEngine.Shared
39{
40 public struct ScriptStructure
41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43
44 public RegionInfoStructure RegionInfo;
45 public ScriptMetaData ScriptMetaData;
46
47 public ScriptAssemblies.IScript ScriptObject;
48 public string State;
49 public bool Running;
50 public bool Disabled;
51 public string Source;
52 public int StartParam;
53 public AppDomain AppDomain;
54 public Dictionary<string, IScriptApi> Apis;
55 public Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> LineMap;
56 public uint LocalID;
57 public UUID ItemID;
58 public string AssemblyFileName;
59
60 public string ScriptID { get { return LocalID.ToString() + "." + ItemID.ToString(); } }
61 public string Name { get { return "Script:" + ScriptID; } }
62 private bool Initialized;
63 private Dictionary<string, Delegate> InternalFunctions;
64 public string AssemblyName;
65
66 public void ExecuteEvent(EventParams p)
67 {
68 ExecuteMethod(p, true);
69 }
70
71 public void ExecuteMethod(EventParams p)
72 {
73 ExecuteMethod(p, false);
74 }
75 private void ExecuteMethod(EventParams p, bool isEvent)
76 {
77 // First time initialization?
78 if (!Initialized)
79 {
80 Initialized = true;
81 CacheInternalFunctions();
82 }
83
84 lock (InternalFunctions)
85 {
86 // Make function name
87 string FunctionName;
88 if (isEvent)
89 FunctionName = State + "_event_" + p.EventName;
90 else
91 FunctionName = p.EventName;
92
93 // Check if this function exist
94 if (!InternalFunctions.ContainsKey(FunctionName))
95 {
96 // TODO: Send message in-world
97 m_log.ErrorFormat("[{0}] Script function \"{1}\" was not found.", Name, FunctionName);
98 return;
99 }
100
101 // Execute script function
102 try
103 {
104 InternalFunctions[FunctionName].DynamicInvoke(p.Params);
105 }
106 catch (Exception e)
107 {
108 m_log.ErrorFormat("[{0}] Execute \"{1}\" failed: {2}", Name, FunctionName, e.ToString());
109 }
110 }
111 }
112
113 /// <summary>
114 /// Cache functions into a dictionary with delegates. Should be faster than reflection.
115 /// </summary>
116 private void CacheInternalFunctions()
117 {
118 Type scriptObjectType = ScriptObject.GetType();
119 InternalFunctions = new Dictionary<string, Delegate>();
120
121 MethodInfo[] methods = scriptObjectType.GetMethods();
122 lock (InternalFunctions)
123 {
124 // Read all methods into a dictionary
125 foreach (MethodInfo mi in methods)
126 {
127 // TODO: We don't support overloading
128 if (!InternalFunctions.ContainsKey(mi.Name))
129 InternalFunctions.Add(mi.Name, Delegate.CreateDelegate(scriptObjectType, ScriptObject, mi));
130 else
131 m_log.ErrorFormat("[{0}] Error: Script function \"{1}\" is already added. We do not support overloading.",
132 Name, mi.Name);
133 }
134 }
135 }
136 }
137}