aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs22
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs2
4 files changed, 19 insertions, 20 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
index e3013c9..fc38ef2 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
@@ -30,10 +30,10 @@ using System.CodeDom.Compiler;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Globalization; 31using System.Globalization;
32using System.IO; 32using System.IO;
33using System.Reflection;
34using Microsoft.CSharp; 33using Microsoft.CSharp;
35using Microsoft.VisualBasic;
36using Microsoft.JScript; 34using Microsoft.JScript;
35using Microsoft.VisualBasic;
36using OpenSim.Region.Environment.Interfaces;
37 37
38namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL 38namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
39{ 39{
@@ -62,8 +62,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
62 private bool WriteScriptSourceToDebugFile; 62 private bool WriteScriptSourceToDebugFile;
63 private bool CompileWithDebugInformation; 63 private bool CompileWithDebugInformation;
64 private bool CleanUpOldScriptsOnStartup; 64 private bool CleanUpOldScriptsOnStartup;
65 private System.Collections.Generic.Dictionary<string, Boolean> AllowedCompilers = new Dictionary<string, bool>(StringComparer.CurrentCultureIgnoreCase); 65 private Dictionary<string, bool> AllowedCompilers = new Dictionary<string, bool>(StringComparer.CurrentCultureIgnoreCase);
66 private System.Collections.Generic.Dictionary<string, enumCompileType> LanguageMapping = new Dictionary<string, enumCompileType>(StringComparer.CurrentCultureIgnoreCase); 66 private Dictionary<string, enumCompileType> LanguageMapping = new Dictionary<string, enumCompileType>(StringComparer.CurrentCultureIgnoreCase);
67 67
68 private string FilePrefix; 68 private string FilePrefix;
69 private string ScriptEnginesPath = "ScriptEngines"; 69 private string ScriptEnginesPath = "ScriptEngines";
@@ -276,7 +276,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
276 if (enableCommanderLSL == true && l == enumCompileType.cs) 276 if (enableCommanderLSL == true && l == enumCompileType.cs)
277 { 277 {
278 foreach (KeyValuePair<string, 278 foreach (KeyValuePair<string,
279 OpenSim.Region.Environment.Interfaces.ICommander> com 279 ICommander> com
280 in m_scriptEngine.World.GetCommanders()) 280 in m_scriptEngine.World.GetCommanders())
281 { 281 {
282 compileScript = com.Value.GenerateRuntimeAPI() + compileScript; 282 compileScript = com.Value.GenerateRuntimeAPI() + compileScript;
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
index 20c108d..0025b26 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
@@ -26,9 +26,9 @@
26* 26*
27*/ 27*/
28 28
29using System;
29using System.Collections.Generic; 30using System.Collections.Generic;
30using System.Text.RegularExpressions; 31using System.Text.RegularExpressions;
31using System;
32 32
33namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL 33namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
34{ 34{
@@ -61,7 +61,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
61 public string Convert(string Script) 61 public string Convert(string Script)
62 { 62 {
63 quotes.Clear(); 63 quotes.Clear();
64 string Return = System.String.Empty; 64 string Return = String.Empty;
65 Script = " \r\n" + Script; 65 Script = " \r\n" + Script;
66 66
67 // 67 //
@@ -77,12 +77,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
77 // temporarily replace quotes so we can work our magic on the script without 77 // temporarily replace quotes so we can work our magic on the script without
78 // always considering if we are inside our outside quotes's 78 // always considering if we are inside our outside quotes's
79 // TODO: Does this work on half-quotes in strings? ;) 79 // TODO: Does this work on half-quotes in strings? ;)
80 string _Script = System.String.Empty; 80 string _Script = String.Empty;
81 string C; 81 string C;
82 bool in_quote = false; 82 bool in_quote = false;
83 bool quote_replaced = false; 83 bool quote_replaced = false;
84 string quote_replacement_string = "Q_U_O_T_E_REPLACEMENT_"; 84 string quote_replacement_string = "Q_U_O_T_E_REPLACEMENT_";
85 string quote = System.String.Empty; 85 string quote = String.Empty;
86 bool last_was_escape = false; 86 bool last_was_escape = false;
87 int quote_replaced_count = 0; 87 int quote_replaced_count = 0;
88 for (int p = 0; p < Script.Length; p++) 88 for (int p = 0; p < Script.Length; p++)
@@ -101,7 +101,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
101 } 101 }
102 else 102 else
103 { 103 {
104 if (quote == System.String.Empty) 104 if (quote == String.Empty)
105 { 105 {
106 // We didn't replace quote, probably because of empty string? 106 // We didn't replace quote, probably because of empty string?
107 _Script += quote_replacement_string + 107 _Script += quote_replacement_string +
@@ -111,7 +111,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
111 quotes.Add( 111 quotes.Add(
112 quote_replacement_string + 112 quote_replacement_string +
113 quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]), quote); 113 quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]), quote);
114 quote = System.String.Empty; 114 quote = String.Empty;
115 } 115 }
116 break; 116 break;
117 } 117 }
@@ -155,10 +155,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
155 // 155 //
156 int ilevel = 0; 156 int ilevel = 0;
157 int lastlevel = 0; 157 int lastlevel = 0;
158 string ret = System.String.Empty; 158 string ret = String.Empty;
159 string cache = System.String.Empty; 159 string cache = String.Empty;
160 bool in_state = false; 160 bool in_state = false;
161 string current_statename = System.String.Empty; 161 string current_statename = String.Empty;
162 for (int p = 0; p < Script.Length; p++) 162 for (int p = 0; p < Script.Length; p++)
163 { 163 {
164 C = Script.Substring(p, 1); 164 C = Script.Substring(p, 1);
@@ -319,9 +319,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
319 { 319 {
320 state_events.Add(statea, convertnametoFlag(eventa)); 320 state_events.Add(statea, convertnametoFlag(eventa));
321 } 321 }
322 System.Console.WriteLine("State:" + statea + ", event: " + eventa); 322 Console.WriteLine("State:" + statea + ", event: " + eventa);
323 } 323 }
324 System.Console.WriteLine("Matches:" + eventmatches.GetUpperBound(0)); 324 Console.WriteLine("Matches:" + eventmatches.GetUpperBound(0));
325 // Add namespace, class name and inheritance 325 // Add namespace, class name and inheritance
326 326
327 // Looking *ONLY* for state entry events 327 // Looking *ONLY* for state entry events
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
index 6f2dbad..99efed3 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
@@ -28,13 +28,12 @@
28/* Original code: Tedd Hansen */ 28/* Original code: Tedd Hansen */
29using System; 29using System;
30using Nini.Config; 30using Nini.Config;
31using OpenSim.Framework.Console;
32using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
33 32
34namespace OpenSim.Region.ScriptEngine.DotNetEngine 33namespace OpenSim.Region.ScriptEngine.DotNetEngine
35{ 34{
36 [Serializable] 35 [Serializable]
37 public class ScriptEngine : OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptEngine 36 public class ScriptEngine : Common.ScriptEngineBase.ScriptEngine
38 { 37 {
39 // We need to override a few things for our DotNetEngine 38 // We need to override a few things for our DotNetEngine
40 public override void Initialise(Scene scene, IConfigSource config) 39 public override void Initialise(Scene scene, IConfigSource config)
@@ -43,7 +42,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
43 InitializeEngine(scene, config, true, GetScriptManager()); 42 InitializeEngine(scene, config, true, GetScriptManager());
44 } 43 }
45 44
46 public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager() 45 public override Common.ScriptEngineBase.ScriptManager _GetScriptManager()
47 { 46 {
48 return new ScriptManager(this); 47 return new ScriptManager(this);
49 } 48 }
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index 05a2d06..e242748 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -34,7 +34,7 @@ using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase;
34 34
35namespace OpenSim.Region.ScriptEngine.DotNetEngine 35namespace OpenSim.Region.ScriptEngine.DotNetEngine
36{ 36{
37 public class ScriptManager : OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager 37 public class ScriptManager : Common.ScriptEngineBase.ScriptManager
38 { 38 {
39 public ScriptManager(Common.ScriptEngineBase.ScriptEngine scriptEngine) 39 public ScriptManager(Common.ScriptEngineBase.ScriptEngine scriptEngine)
40 : base(scriptEngine) 40 : base(scriptEngine)