aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs
diff options
context:
space:
mode:
authorlbsa712007-10-30 09:05:31 +0000
committerlbsa712007-10-30 09:05:31 +0000
commit67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch)
tree20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs
parent* Deleted .user file (diff)
downloadopensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz
* Optimized usings
* Shortened type references * Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs')
-rw-r--r--OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs26
1 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs
index 95ab2ca..2778e9c 100644
--- a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs
+++ b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs
@@ -26,27 +26,28 @@
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using Nini.Config;
29using OpenSim.Framework.Console; 30using OpenSim.Framework.Console;
30using OpenSim.Region.Environment.Interfaces; 31using OpenSim.Region.Environment.Interfaces;
31using OpenSim.Region.Environment.Scenes; 32using OpenSim.Region.Environment.Scenes;
32using OpenSim.Region.ExtensionsScriptModule.CSharp; 33using OpenSim.Region.ExtensionsScriptModule.CSharp;
33using OpenSim.Region.ExtensionsScriptModule.JScript; 34using OpenSim.Region.ExtensionsScriptModule.JScript;
34using OpenSim.Region.ExtensionsScriptModule.JVMEngine; 35using OpenSim.Region.ExtensionsScriptModule.JVMEngine;
35using Nini.Config;
36 36
37namespace OpenSim.Region.ExtensionsScriptModule 37namespace OpenSim.Region.ExtensionsScriptModule
38{ 38{
39 public class ScriptManager : IRegionModule, IExtensionScriptModule 39 public class ScriptManager : IRegionModule, IExtensionScriptModule
40 { 40 {
41 readonly List<IScript> scripts = new List<IScript>(); 41 private readonly List<IScript> scripts = new List<IScript>();
42 Scene m_scene; 42 private Scene m_scene;
43 readonly Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>(); 43 private readonly Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>();
44 44
45 private void LoadFromCompiler(Dictionary<string, IScript> compiledscripts) 45 private void LoadFromCompiler(Dictionary<string, IScript> compiledscripts)
46 { 46 {
47 foreach (KeyValuePair<string, IScript> script in compiledscripts) 47 foreach (KeyValuePair<string, IScript> script in compiledscripts)
48 { 48 {
49 ScriptInfo scriptInfo = new ScriptInfo(m_scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. 49 ScriptInfo scriptInfo = new ScriptInfo(m_scene);
50 // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script.
50 MainLog.Instance.Verbose("Loading " + script.Key); 51 MainLog.Instance.Verbose("Loading " + script.Key);
51 script.Value.Initialise(scriptInfo); 52 script.Value.Initialise(scriptInfo);
52 scripts.Add(script.Value); 53 scripts.Add(script.Value);
@@ -70,7 +71,7 @@ namespace OpenSim.Region.ExtensionsScriptModule
70 71
71 public void Initialise(Scene scene, IConfigSource config) 72 public void Initialise(Scene scene, IConfigSource config)
72 { 73 {
73 OpenSim.Framework.Console.MainLog.Instance.Verbose("SCRIPTMODULE", "Initialising Extensions Scripting Module"); 74 MainLog.Instance.Verbose("SCRIPTMODULE", "Initialising Extensions Scripting Module");
74 m_scene = scene; 75 m_scene = scene;
75 76
76 m_scene.RegisterModuleInterface<IExtensionScriptModule>(this); 77 m_scene.RegisterModuleInterface<IExtensionScriptModule>(this);
@@ -78,12 +79,10 @@ namespace OpenSim.Region.ExtensionsScriptModule
78 79
79 public void PostInitialise() 80 public void PostInitialise()
80 { 81 {
81
82 } 82 }
83 83
84 public void Close() 84 public void Close()
85 { 85 {
86
87 } 86 }
88 87
89 public string Name 88 public string Name
@@ -92,8 +91,8 @@ namespace OpenSim.Region.ExtensionsScriptModule
92 } 91 }
93 92
94 public bool IsSharedModule 93 public bool IsSharedModule
95{ 94 {
96 get { return false; } 95 get { return false; }
97 } 96 }
98 97
99 public bool Compile(string filename) 98 public bool Compile(string filename)
@@ -127,7 +126,8 @@ namespace OpenSim.Region.ExtensionsScriptModule
127 public bool AddPreCompiledScript(IScript script) 126 public bool AddPreCompiledScript(IScript script)
128 { 127 {
129 MainLog.Instance.Verbose("Loading script " + script.Name); 128 MainLog.Instance.Verbose("Loading script " + script.Name);
130 ScriptInfo scriptInfo = new ScriptInfo(m_scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. 129 ScriptInfo scriptInfo = new ScriptInfo(m_scene);
130 // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script.
131 script.Initialise(scriptInfo); 131 script.Initialise(scriptInfo);
132 scripts.Add(script); 132 scripts.Add(script);
133 133
@@ -141,9 +141,9 @@ namespace OpenSim.Region.ExtensionsScriptModule
141 bool AddPreCompiledScript(IScript script); 141 bool AddPreCompiledScript(IScript script);
142 } 142 }
143 143
144 interface IScriptCompiler 144 internal interface IScriptCompiler
145 { 145 {
146 Dictionary<string, IScript> compile(string filename); 146 Dictionary<string, IScript> compile(string filename);
147 string FileExt(); 147 string FileExt();
148 } 148 }
149} 149} \ No newline at end of file