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)
This commit is contained in:
MW
2007-09-04 13:43:56 +00:00
parent 94b1d3c128
commit bfd36e2e83
28 changed files with 661 additions and 228 deletions

View File

@@ -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<bool, string>(Compile));
m_scene.RegisterAPIMethod("API_AddExtensionScript", new ModuleAPIMethod1<bool, IScript>(AddPreCompiledScript));
m_scene.RegisterAPIMethod("API_CompileExtensionScript", new ModuleAPIMethod1<bool, string>(Compile));
m_scene.RegisterAPIMethod("API_AddExtensionScript", new ModuleAPIMethod1<bool, IScript>(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<string, IScriptCompiler> 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<string,IScript> compile(string filename);
Dictionary<string, IScript> compile(string filename);
string FileExt();
}
}