* minor refactorings

afrisby
lbsa71 2007-08-06 13:01:47 +00:00
parent ea980ca928
commit 1b100e17a5
7 changed files with 14 additions and 14 deletions

View File

@ -75,7 +75,7 @@ namespace OpenSim.Region.Scripting
{
IScript script = (IScript)compilerResults.CompiledAssembly.CreateInstance(pluginType.ToString());
string scriptName = "C#/" + script.getName();
string scriptName = "C#/" + script.Name;
Console.WriteLine("Script: " + scriptName + " loaded.");
if (!scripts.ContainsKey(scriptName))

View File

@ -12,9 +12,9 @@ namespace OpenSim.Region.Scripting.Examples
{
ScriptInfo script;
public string getName()
public string Name
{
return "LSL Export Script 0.1";
get { return "LSL Export Script 0.1"; }
}
public void Initialise(ScriptInfo scriptInfo)

View File

@ -75,7 +75,7 @@ namespace OpenSim.Region.Scripting
{
IScript script = (IScript)compilerResults.CompiledAssembly.CreateInstance(pluginType.ToString());
string scriptName = "JS.NET/" + script.getName();
string scriptName = "JS.NET/" + script.Name;
Console.WriteLine("Script: " + scriptName + " loaded.");
if (!scripts.ContainsKey(scriptName))

View File

@ -91,9 +91,9 @@ namespace OpenSim.Region.Scripting.EmbeddedJVM
}
}
public string getName()
public string Name
{
return "JVM Scripting Engine";
get { return "JVM Scripting Engine"; }
}
public void LoadScript(string script)

View File

@ -25,9 +25,9 @@ namespace OpenSim.Region.Scripting.LSL
scriptInfo = info;
}
public string getName()
public string Name
{
return "LSL Script";
get { return "LSL Script"; }
}
}
}

View File

@ -32,23 +32,23 @@ namespace OpenSim.Region.Scripting
public interface IScript
{
void Initialise(ScriptInfo scriptInfo);
string getName();
string Name { get; }
}
public class TestScript : IScript
{
ScriptInfo script;
public string getName()
public string Name
{
return "TestScript 0.1";
get { return "TestScript 0.1"; }
}
public void Initialise(ScriptInfo scriptInfo)
{
script = scriptInfo;
script.events.OnFrame += new EventManager.OnFrameDelegate(events_OnFrame);
script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence);
script.events.OnFrame += events_OnFrame;
script.events.OnNewPresence += events_OnNewPresence;
}
void events_OnNewPresence(ScenePresence presence)

View File

@ -92,7 +92,7 @@ namespace OpenSim.Region.Scripting
public void AddPreCompiledScript(IScript script)
{
MainLog.Instance.Verbose("Loading script " + script.getName());
MainLog.Instance.Verbose("Loading script " + script.Name);
ScriptInfo scriptInfo = new ScriptInfo(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);