From 1b100e17a59480c6e66c2b8b5735003b0a1083c7 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 6 Aug 2007 13:01:47 +0000 Subject: * minor refactorings --- .../Scripting/Engines/CSharpEngine/CSharpScriptEngine.cs | 2 +- .../Engines/CSharpEngine/Examples/ExportRegionToLSL.cs | 4 ++-- .../Scenes/Scripting/Engines/JScriptEngine/JScriptEngine.cs | 2 +- .../Scenes/Scripting/Engines/JVMEngine/OpenSimJVM.cs | 4 ++-- .../Scenes/Scripting/Engines/LSLEngine/LSLScript.cs | 4 ++-- OpenSim/Region/Environment/Scenes/Scripting/Script.cs | 10 +++++----- OpenSim/Region/Environment/Scenes/Scripting/ScriptManager.cs | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Scripting') diff --git a/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/CSharpScriptEngine.cs b/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/CSharpScriptEngine.cs index b0ccd22..8e1b23e 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/CSharpScriptEngine.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/CSharpScriptEngine.cs @@ -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)) diff --git a/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs b/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs index f753b30..d5566b7 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs @@ -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) diff --git a/OpenSim/Region/Environment/Scenes/Scripting/Engines/JScriptEngine/JScriptEngine.cs b/OpenSim/Region/Environment/Scenes/Scripting/Engines/JScriptEngine/JScriptEngine.cs index af4f8b4..554ffeb 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/Engines/JScriptEngine/JScriptEngine.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/Engines/JScriptEngine/JScriptEngine.cs @@ -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)) diff --git a/OpenSim/Region/Environment/Scenes/Scripting/Engines/JVMEngine/OpenSimJVM.cs b/OpenSim/Region/Environment/Scenes/Scripting/Engines/JVMEngine/OpenSimJVM.cs index 78c6f67..9fb76d4 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/Engines/JVMEngine/OpenSimJVM.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/Engines/JVMEngine/OpenSimJVM.cs @@ -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) diff --git a/OpenSim/Region/Environment/Scenes/Scripting/Engines/LSLEngine/LSLScript.cs b/OpenSim/Region/Environment/Scenes/Scripting/Engines/LSLEngine/LSLScript.cs index 49357f5..6eca69a 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/Engines/LSLEngine/LSLScript.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/Engines/LSLEngine/LSLScript.cs @@ -25,9 +25,9 @@ namespace OpenSim.Region.Scripting.LSL scriptInfo = info; } - public string getName() + public string Name { - return "LSL Script"; + get { return "LSL Script"; } } } } diff --git a/OpenSim/Region/Environment/Scenes/Scripting/Script.cs b/OpenSim/Region/Environment/Scenes/Scripting/Script.cs index 40825c0..fa4bdde 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/Script.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/Script.cs @@ -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) diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptManager.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptManager.cs index 27e831b..3bd395e 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptManager.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptManager.cs @@ -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); -- cgit v1.1