diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs index 062060f..565bfb7 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | |||
@@ -2,6 +2,10 @@ using System; | |||
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler; | 4 | using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler; |
5 | using libsecondlife; | ||
6 | using OpenSim.Region.Environment.Scenes; | ||
7 | using OpenSim.Region.Environment.Scenes.Scripting; | ||
8 | using OpenSim.Framework.Console; | ||
5 | 9 | ||
6 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | 10 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL |
7 | { | 11 | { |
@@ -11,11 +15,17 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
11 | internal OpenSim.Region.Environment.Scenes.Scene World; | 15 | internal OpenSim.Region.Environment.Scenes.Scene World; |
12 | private System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); | 16 | private System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); |
13 | 17 | ||
14 | 18 | IScriptHost m_host; | |
19 | |||
20 | public LSL_BaseClass( IScriptHost host ) | ||
21 | { | ||
22 | m_host = host; | ||
23 | } | ||
24 | |||
15 | public void Start(OpenSim.Region.Environment.Scenes.Scene _World, string FullScriptID) | 25 | public void Start(OpenSim.Region.Environment.Scenes.Scene _World, string FullScriptID) |
16 | { | 26 | { |
17 | World = _World; | 27 | World = _World; |
18 | Console.WriteLine("ScriptEngine", "LSL_BaseClass.Start() called. FullScriptID: " + FullScriptID); | 28 | MainLog.Instance.Notice( "ScriptEngine", "LSL_BaseClass.Start() called. FullScriptID: " + FullScriptID + ": Hosted by [" + m_host.Name + ":" + m_host.UUID + "@"+m_host.AbsolutePosition +"]"); |
19 | 29 | ||
20 | return; | 30 | return; |
21 | } | 31 | } |
@@ -59,8 +69,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
59 | //Common.SendToDebug("INTERNAL FUNCTION llSay(" + (int)channelID + ", \"" + (string)text + "\");"); | 69 | //Common.SendToDebug("INTERNAL FUNCTION llSay(" + (int)channelID + ", \"" + (string)text + "\");"); |
60 | Console.WriteLine("llSay Channel " + channelID + ", Text: \"" + text + "\""); | 70 | Console.WriteLine("llSay Channel " + channelID + ", Text: \"" + text + "\""); |
61 | //type for say is 1 | 71 | //type for say is 1 |
62 | //World.SimChat(enc.GetBytes(text), 1, World.Objects[World.ConvertLocalIDToFullID(MY_OBJECT_ID)], MY_OBJECT_NAME, World.Objects[World.ConvertLocalIDToFullID(MY_OBJECT_ID)]); | 72 | |
73 | LLVector3 fromPos = m_host.AbsolutePosition; // Position of parent | ||
74 | string fromName = m_host.Name; // Name of script parent | ||
75 | LLUUID fromUUID = m_host.UUID; // UUID of parent | ||
76 | |||
77 | World.SimChat( Helpers.StringToField( text ), 1, fromPos, fromName, fromUUID ); | ||
63 | } | 78 | } |
79 | |||
64 | public void llShout(int channelID, string text) | 80 | public void llShout(int channelID, string text) |
65 | { | 81 | { |
66 | Console.WriteLine("llShout Channel " + channelID + ", Text: \"" + text + "\""); | 82 | Console.WriteLine("llShout Channel " + channelID + ", Text: \"" + text + "\""); |
@@ -68,6 +84,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
68 | //World.SimChat(enc.GetBytes(text), 2, World.Objects[World.ConvertLocalIDToFullID(MY_OBJECT_ID)], MY_OBJECT_NAME, World.Objects[World.ConvertLocalIDToFullID(MY_OBJECT_ID)]); | 84 | //World.SimChat(enc.GetBytes(text), 2, World.Objects[World.ConvertLocalIDToFullID(MY_OBJECT_ID)], MY_OBJECT_NAME, World.Objects[World.ConvertLocalIDToFullID(MY_OBJECT_ID)]); |
69 | 85 | ||
70 | } | 86 | } |
87 | |||
71 | public int llListen(int channelID, string name, string ID, string msg) { return 0; } | 88 | public int llListen(int channelID, string name, string ID, string msg) { return 0; } |
72 | public void llListenControl(int number, int active) { return; } | 89 | public void llListenControl(int number, int active) { return; } |
73 | public void llListenRemove(int number) { return; } | 90 | public void llListenRemove(int number) { return; } |