aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/scripting
diff options
context:
space:
mode:
authorlbsa712007-07-03 14:37:29 +0000
committerlbsa712007-07-03 14:37:29 +0000
commit9b6b6d05d45cf0f754a0b26bf6240ef50be66563 (patch)
tree8d72120aac2184c5ed4c5ab5f6b673ef496a0803 /OpenSim/Region/Environment/Scenes/scripting
parent* Completed conceptual LlsdMethod - everything resides in SimpleApp pending g... (diff)
downloadopensim-SC_OLD-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.zip
opensim-SC_OLD-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.gz
opensim-SC_OLD-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.bz2
opensim-SC_OLD-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.xz
* Optimized usings (the 'LL ate my scripts' commit)
* added some licensing info
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/scripting')
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs11
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs11
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Script.cs9
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs14
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*/
28using System; 28using System;
29using System.Collections.Generic;
30using System.Text;
31
32// Compilation stuff
33using System.CodeDom;
34using System.CodeDom.Compiler; 29using System.CodeDom.Compiler;
30using System.Collections.Generic;
35using Microsoft.CSharp; 31using Microsoft.CSharp;
32using OpenSim.Framework.Console;
36 33
37namespace OpenSim.Region.Enviorment.Scripting 34namespace 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*/
28using System; 28using System;
29using System.Collections.Generic;
30using System.Text;
31
32// Compilation stuff
33using System.CodeDom;
34using System.CodeDom.Compiler; 29using System.CodeDom.Compiler;
30using System.Collections.Generic;
35using Microsoft.JScript; 31using Microsoft.JScript;
32using OpenSim.Framework.Console;
36 33
37namespace OpenSim.Region.Enviorment.Scripting 34namespace 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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32using OpenSim.Framework.Console;
33using OpenSim.Framework;
34using OpenSim.Region.Environment;
35using OpenSim.Region.Environment.Scenes; 28using OpenSim.Region.Environment.Scenes;
36 29
37namespace OpenSim.Region.Enviorment.Scripting 30namespace 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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32using OpenSim.Region.Environment.Scenes;
33using OpenSim.Framework.Console; 28using OpenSim.Framework.Console;
29using OpenSim.Region.Environment.Scenes;
34 30
35namespace OpenSim.Region.Enviorment.Scripting 31namespace 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*/
28using System;
29using System.Collections.Generic; 28using System.Collections.Generic;
30using System.Text; 29using OpenSim.Framework.Console;
30using OpenSim.Region.Environment.Scenes;
31 31
32namespace OpenSim.Region.Enviorment.Scripting 32namespace 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 }