diff options
Some work on Module loading/management.
Some more modules templates classes (hoping that someone will pick some of these and work on implementing them).
Early version of the "Dynamic Texture Module", although currently there are no render modules included (so not really functional without them).
Added osSetDynamicTextureURL script function, for attaching a dynamic texture to a prim.
Some work on the console command handling. Added "change-region <regionname>" and "exit-region" so that after the use of change-region, the commands entered will apply to that region only. Then use exit-region to return to the top level (so commands then function as they did before and either apply to all regions or to the first region) (Note: this hasn't been tested very much)
Diffstat (limited to 'OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs')
-rw-r--r-- | OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs index 6cacf0c..fd59fd3 100644 --- a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs +++ b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
58 | { | 58 | { |
59 | // Default Engines | 59 | // Default Engines |
60 | CSharpScriptEngine csharpCompiler = new CSharpScriptEngine(); | 60 | CSharpScriptEngine csharpCompiler = new CSharpScriptEngine(); |
61 | compilers.Add(csharpCompiler.FileExt(),csharpCompiler); | 61 | compilers.Add(csharpCompiler.FileExt(), csharpCompiler); |
62 | 62 | ||
63 | JScriptEngine jscriptCompiler = new JScriptEngine(); | 63 | JScriptEngine jscriptCompiler = new JScriptEngine(); |
64 | compilers.Add(jscriptCompiler.FileExt(), jscriptCompiler); | 64 | compilers.Add(jscriptCompiler.FileExt(), jscriptCompiler); |
@@ -72,8 +72,8 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
72 | System.Console.WriteLine("Initialising Extensions Scripting Module"); | 72 | System.Console.WriteLine("Initialising Extensions Scripting Module"); |
73 | m_scene = scene; | 73 | m_scene = scene; |
74 | 74 | ||
75 | m_scene.RegisterAPIMethod("API_CompileExtensionScript", new ModuleAPIMethod1<bool, string>(Compile)); | 75 | m_scene.RegisterAPIMethod("API_CompileExtensionScript", new ModuleAPIMethod1<bool, string>(Compile)); |
76 | m_scene.RegisterAPIMethod("API_AddExtensionScript", new ModuleAPIMethod1<bool, IScript>(AddPreCompiledScript)); | 76 | m_scene.RegisterAPIMethod("API_AddExtensionScript", new ModuleAPIMethod1<bool, IScript>(AddPreCompiledScript)); |
77 | } | 77 | } |
78 | 78 | ||
79 | public void PostInitialise() | 79 | public void PostInitialise() |
@@ -91,6 +91,11 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
91 | return "ExtensionsScriptingModule"; | 91 | return "ExtensionsScriptingModule"; |
92 | } | 92 | } |
93 | 93 | ||
94 | public bool IsSharedModule() | ||
95 | { | ||
96 | return false; | ||
97 | } | ||
98 | |||
94 | public bool Compile(string filename) | 99 | public bool Compile(string filename) |
95 | { | 100 | { |
96 | foreach (KeyValuePair<string, IScriptCompiler> compiler in compilers) | 101 | foreach (KeyValuePair<string, IScriptCompiler> compiler in compilers) |
@@ -121,7 +126,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
121 | 126 | ||
122 | public bool AddPreCompiledScript(IScript script) | 127 | public bool AddPreCompiledScript(IScript script) |
123 | { | 128 | { |
124 | MainLog.Instance.Verbose("Loading script " + script.Name); | 129 | MainLog.Instance.Verbose("Loading script " + script.Name); |
125 | 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. | 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. |
126 | script.Initialise(scriptInfo); | 131 | script.Initialise(scriptInfo); |
127 | scripts.Add(script); | 132 | scripts.Add(script); |
@@ -132,7 +137,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
132 | 137 | ||
133 | interface IScriptCompiler | 138 | interface IScriptCompiler |
134 | { | 139 | { |
135 | Dictionary<string,IScript> compile(string filename); | 140 | Dictionary<string, IScript> compile(string filename); |
136 | string FileExt(); | 141 | string FileExt(); |
137 | } | 142 | } |
138 | } | 143 | } |