diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index 435ee08..ad2717c 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
61 | 61 | ||
62 | string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); | 62 | string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); |
63 | string rootPathSE = Path.GetDirectoryName(this.GetType().Assembly.Location); | 63 | string rootPathSE = Path.GetDirectoryName(this.GetType().Assembly.Location); |
64 | Console.WriteLine("Assembly location: " + rootPath); | 64 | //Console.WriteLine("Assembly location: " + rootPath); |
65 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Common.dll")); | 65 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Common.dll")); |
66 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPathSE, "OpenSim.Region.ScriptEngine.DotNetEngine.dll")); | 66 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPathSE, "OpenSim.Region.ScriptEngine.DotNetEngine.dll")); |
67 | 67 | ||
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs index 84fa9eb..7334e6f 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | |||
@@ -4,6 +4,8 @@ using System.Text; | |||
4 | using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler; | 4 | using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler; |
5 | using OpenSim.Region.ScriptEngine.Common; | 5 | using OpenSim.Region.ScriptEngine.Common; |
6 | using System.Threading; | 6 | using System.Threading; |
7 | using System.Reflection; | ||
8 | |||
7 | 9 | ||
8 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | 10 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL |
9 | { | 11 | { |
@@ -46,6 +48,33 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
46 | return; | 48 | return; |
47 | } | 49 | } |
48 | 50 | ||
51 | public void ExecuteEvent(string FunctionName, object[] args) | ||
52 | { | ||
53 | //foreach (MemberInfo mi in this.GetType().GetMembers()) | ||
54 | //{ | ||
55 | //if (mi.ToString().ToLower().Contains("default")) | ||
56 | //{ | ||
57 | // Console.WriteLine("Member found: " + mi.ToString()); | ||
58 | //} | ||
59 | //} | ||
60 | |||
61 | Type type = this.GetType(); | ||
62 | |||
63 | Console.WriteLine("ScriptEngine Invoke: \"" + this.State() + "_event_" + FunctionName + "\""); | ||
64 | |||
65 | try | ||
66 | { | ||
67 | type.InvokeMember(this.State() + "_event_" + FunctionName, BindingFlags.InvokeMethod, null, this, args); | ||
68 | } | ||
69 | catch (Exception e) | ||
70 | { | ||
71 | // TODO: Send to correct place | ||
72 | Console.WriteLine("ScriptEngine Exception attempting to executing script function: " + e.ToString()); | ||
73 | } | ||
74 | |||
75 | |||
76 | } | ||
77 | |||
49 | 78 | ||
50 | 79 | ||
51 | // | 80 | // |