diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/scripting')
5 files changed, 18 insertions, 35 deletions
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs index fc193f5..56f5c0b 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs | |||
@@ -26,13 +26,10 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | |||
32 | // Compilation stuff | ||
33 | using System.CodeDom; | ||
34 | using System.CodeDom.Compiler; | 29 | using System.CodeDom.Compiler; |
30 | using System.Collections.Generic; | ||
35 | using Microsoft.CSharp; | 31 | using Microsoft.CSharp; |
32 | using OpenSim.Framework.Console; | ||
36 | 33 | ||
37 | namespace OpenSim.Region.Enviorment.Scripting | 34 | namespace OpenSim.Region.Enviorment.Scripting |
38 | { | 35 | { |
@@ -60,10 +57,10 @@ namespace OpenSim.Region.Enviorment.Scripting | |||
60 | 57 | ||
61 | if (compilerResults.Errors.Count > 0) | 58 | if (compilerResults.Errors.Count > 0) |
62 | { | 59 | { |
63 | OpenSim.Framework.Console.MainLog.Instance.Error("Compile errors"); | 60 | MainLog.Instance.Error("Compile errors"); |
64 | foreach (CompilerError error in compilerResults.Errors) | 61 | foreach (CompilerError error in compilerResults.Errors) |
65 | { | 62 | { |
66 | OpenSim.Framework.Console.MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); | 63 | MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); |
67 | } | 64 | } |
68 | } | 65 | } |
69 | else | 66 | else |
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs index e6d66eb..2cea6e0 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs | |||
@@ -26,13 +26,10 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | |||
32 | // Compilation stuff | ||
33 | using System.CodeDom; | ||
34 | using System.CodeDom.Compiler; | 29 | using System.CodeDom.Compiler; |
30 | using System.Collections.Generic; | ||
35 | using Microsoft.JScript; | 31 | using Microsoft.JScript; |
32 | using OpenSim.Framework.Console; | ||
36 | 33 | ||
37 | namespace OpenSim.Region.Enviorment.Scripting | 34 | namespace OpenSim.Region.Enviorment.Scripting |
38 | { | 35 | { |
@@ -60,10 +57,10 @@ namespace OpenSim.Region.Enviorment.Scripting | |||
60 | 57 | ||
61 | if (compilerResults.Errors.Count > 0) | 58 | if (compilerResults.Errors.Count > 0) |
62 | { | 59 | { |
63 | OpenSim.Framework.Console.MainLog.Instance.Error("Compile errors"); | 60 | MainLog.Instance.Error("Compile errors"); |
64 | foreach (CompilerError error in compilerResults.Errors) | 61 | foreach (CompilerError error in compilerResults.Errors) |
65 | { | 62 | { |
66 | OpenSim.Framework.Console.MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); | 63 | MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); |
67 | } | 64 | } |
68 | } | 65 | } |
69 | else | 66 | else |
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Script.cs b/OpenSim/Region/Environment/Scenes/scripting/Script.cs index 1e64675..8029883 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/Script.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/Script.cs | |||
@@ -25,13 +25,6 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | |||
32 | using OpenSim.Framework.Console; | ||
33 | using OpenSim.Framework; | ||
34 | using OpenSim.Region.Environment; | ||
35 | using OpenSim.Region.Environment.Scenes; | 28 | using OpenSim.Region.Environment.Scenes; |
36 | 29 | ||
37 | namespace OpenSim.Region.Enviorment.Scripting | 30 | namespace OpenSim.Region.Enviorment.Scripting |
@@ -54,7 +47,7 @@ namespace OpenSim.Region.Enviorment.Scripting | |||
54 | public void Initialise(ScriptInfo scriptInfo) | 47 | public void Initialise(ScriptInfo scriptInfo) |
55 | { | 48 | { |
56 | script = scriptInfo; | 49 | script = scriptInfo; |
57 | script.events.OnFrame += new OpenSim.Region.Environment.Scenes.EventManager.OnFrameDelegate(events_OnFrame); | 50 | script.events.OnFrame += new EventManager.OnFrameDelegate(events_OnFrame); |
58 | script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence); | 51 | script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence); |
59 | } | 52 | } |
60 | 53 | ||
diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs index 522a572..d984d60 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs | |||
@@ -25,12 +25,8 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | |||
32 | using OpenSim.Region.Environment.Scenes; | ||
33 | using OpenSim.Framework.Console; | 28 | using OpenSim.Framework.Console; |
29 | using OpenSim.Region.Environment.Scenes; | ||
34 | 30 | ||
35 | namespace OpenSim.Region.Enviorment.Scripting | 31 | namespace OpenSim.Region.Enviorment.Scripting |
36 | { | 32 | { |
@@ -52,7 +48,7 @@ namespace OpenSim.Region.Enviorment.Scripting | |||
52 | { | 48 | { |
53 | world = scene; | 49 | world = scene; |
54 | events = world.eventManager; | 50 | events = world.eventManager; |
55 | logger = OpenSim.Framework.Console.MainLog.Instance; | 51 | logger = MainLog.Instance; |
56 | } | 52 | } |
57 | } | 53 | } |
58 | } | 54 | } |
diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs index eb1c1d9..1d47c24 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs | |||
@@ -25,16 +25,16 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | ||
29 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
30 | using System.Text; | 29 | using OpenSim.Framework.Console; |
30 | using OpenSim.Region.Environment.Scenes; | ||
31 | 31 | ||
32 | namespace OpenSim.Region.Enviorment.Scripting | 32 | namespace OpenSim.Region.Enviorment.Scripting |
33 | { | 33 | { |
34 | public class ScriptManager | 34 | public class ScriptManager |
35 | { | 35 | { |
36 | List<IScript> scripts = new List<IScript>(); | 36 | List<IScript> scripts = new List<IScript>(); |
37 | OpenSim.Region.Environment.Scenes.Scene scene; | 37 | Scene scene; |
38 | Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>(); | 38 | Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>(); |
39 | 39 | ||
40 | private void LoadFromCompiler(Dictionary<string, IScript> compiledscripts) | 40 | private void LoadFromCompiler(Dictionary<string, IScript> compiledscripts) |
@@ -42,14 +42,14 @@ namespace OpenSim.Region.Enviorment.Scripting | |||
42 | foreach (KeyValuePair<string, IScript> script in compiledscripts) | 42 | foreach (KeyValuePair<string, IScript> script in compiledscripts) |
43 | { | 43 | { |
44 | ScriptInfo scriptInfo = new ScriptInfo(scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. | 44 | ScriptInfo scriptInfo = new ScriptInfo(scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. |
45 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Loading " + script.Key); | 45 | MainLog.Instance.Verbose("Loading " + script.Key); |
46 | script.Value.Initialise(scriptInfo); | 46 | script.Value.Initialise(scriptInfo); |
47 | scripts.Add(script.Value); | 47 | scripts.Add(script.Value); |
48 | } | 48 | } |
49 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Finished loading " + compiledscripts.Count.ToString() + " script(s)"); | 49 | MainLog.Instance.Verbose("Finished loading " + compiledscripts.Count.ToString() + " script(s)"); |
50 | } | 50 | } |
51 | 51 | ||
52 | public ScriptManager(OpenSim.Region.Environment.Scenes.Scene world) | 52 | public ScriptManager(Scene world) |
53 | { | 53 | { |
54 | scene = world; | 54 | scene = world; |
55 | 55 | ||
@@ -82,7 +82,7 @@ namespace OpenSim.Region.Enviorment.Scripting | |||
82 | break; | 82 | break; |
83 | 83 | ||
84 | default: | 84 | default: |
85 | OpenSim.Framework.Console.MainLog.Instance.Error("Unknown script command"); | 85 | MainLog.Instance.Error("Unknown script command"); |
86 | break; | 86 | break; |
87 | } | 87 | } |
88 | } | 88 | } |