From bfd36e2e836f92539e68bba077104d5016c5bf8b Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 4 Sep 2007 13:43:56 +0000 Subject: 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 " 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) --- OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs') 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 { // Default Engines CSharpScriptEngine csharpCompiler = new CSharpScriptEngine(); - compilers.Add(csharpCompiler.FileExt(),csharpCompiler); + compilers.Add(csharpCompiler.FileExt(), csharpCompiler); JScriptEngine jscriptCompiler = new JScriptEngine(); compilers.Add(jscriptCompiler.FileExt(), jscriptCompiler); @@ -72,8 +72,8 @@ namespace OpenSim.Region.ExtensionsScriptModule System.Console.WriteLine("Initialising Extensions Scripting Module"); m_scene = scene; - m_scene.RegisterAPIMethod("API_CompileExtensionScript", new ModuleAPIMethod1(Compile)); - m_scene.RegisterAPIMethod("API_AddExtensionScript", new ModuleAPIMethod1(AddPreCompiledScript)); + m_scene.RegisterAPIMethod("API_CompileExtensionScript", new ModuleAPIMethod1(Compile)); + m_scene.RegisterAPIMethod("API_AddExtensionScript", new ModuleAPIMethod1(AddPreCompiledScript)); } public void PostInitialise() @@ -91,6 +91,11 @@ namespace OpenSim.Region.ExtensionsScriptModule return "ExtensionsScriptingModule"; } + public bool IsSharedModule() + { + return false; + } + public bool Compile(string filename) { foreach (KeyValuePair compiler in compilers) @@ -121,7 +126,7 @@ namespace OpenSim.Region.ExtensionsScriptModule public bool AddPreCompiledScript(IScript script) { - MainLog.Instance.Verbose("Loading script " + script.Name); + MainLog.Instance.Verbose("Loading script " + script.Name); 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. script.Initialise(scriptInfo); scripts.Add(script); @@ -132,7 +137,7 @@ namespace OpenSim.Region.ExtensionsScriptModule interface IScriptCompiler { - Dictionary compile(string filename); + Dictionary compile(string filename); string FileExt(); } } -- cgit v1.1