aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs
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/RegionInfoStructure.cs
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/RegionInfoStructure.cs')
-rw-r--r--OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs120
1 files changed, 0 insertions, 120 deletions
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