diff options
author | Melanie Thielker | 2008-09-25 06:04:47 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-25 06:04:47 +0000 |
commit | a3fcaef89091fea505eb9d359be87c82450db6d3 (patch) | |
tree | fa3c7244e5385b4afb0295bfdfe5a834583663b9 /OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | |
parent | Convergence is almost complete. This brings the diff between the API to < 10k (diff) | |
download | opensim-SC-a3fcaef89091fea505eb9d359be87c82450db6d3.zip opensim-SC-a3fcaef89091fea505eb9d359be87c82450db6d3.tar.gz opensim-SC-a3fcaef89091fea505eb9d359be87c82450db6d3.tar.bz2 opensim-SC-a3fcaef89091fea505eb9d359be87c82450db6d3.tar.xz |
CONVERGENCE!!!!!!
The entire LSL API is now in the single, shared file
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api_Base.cs
This is for both engines. The OSSL function are still separate.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index 0ef909f..7b2d229 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | |||
@@ -40,10 +40,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
40 | { | 40 | { |
41 | public class OSSL_BuilIn_Commands : LSL_BuiltIn_Commands, OSSL_BuilIn_Commands_Interface | 41 | public class OSSL_BuilIn_Commands : LSL_BuiltIn_Commands, OSSL_BuilIn_Commands_Interface |
42 | { | 42 | { |
43 | internal ScriptEngineBase.ScriptEngine m_ScriptEngineDirect; | ||
44 | |||
43 | public OSSL_BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID, | 45 | public OSSL_BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID, |
44 | UUID itemID) | 46 | UUID itemID) |
45 | : base(scriptEngine, host, localID, itemID) | 47 | : base(scriptEngine, host, localID, itemID) |
46 | { | 48 | { |
49 | m_ScriptEngineDirect = scriptEngine; | ||
47 | Prim = new OSSLPrim(this); | 50 | Prim = new OSSLPrim(this); |
48 | } | 51 | } |
49 | 52 | ||
@@ -577,7 +580,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
577 | { | 580 | { |
578 | UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, new UUID(channel)); | 581 | UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, new UUID(channel)); |
579 | object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; | 582 | object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; |
580 | m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", new DetectParams[0], resobj); | 583 | m_ScriptEngineDirect.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", new DetectParams[0], resobj); |
581 | } | 584 | } |
582 | } | 585 | } |
583 | 586 | ||
@@ -605,16 +608,16 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
605 | 608 | ||
606 | int scriptEngineNameIndex = 0; | 609 | int scriptEngineNameIndex = 0; |
607 | 610 | ||
608 | if (!String.IsNullOrEmpty(m_ScriptEngine.ScriptEngineName)) | 611 | if (!String.IsNullOrEmpty(m_ScriptEngineDirect.ScriptEngineName)) |
609 | { | 612 | { |
610 | // parse off the "ScriptEngine." | 613 | // parse off the "ScriptEngine." |
611 | scriptEngineNameIndex = m_ScriptEngine.ScriptEngineName.IndexOf(".", scriptEngineNameIndex); | 614 | scriptEngineNameIndex = m_ScriptEngineDirect.ScriptEngineName.IndexOf(".", scriptEngineNameIndex); |
612 | scriptEngineNameIndex++; // get past delimiter | 615 | scriptEngineNameIndex++; // get past delimiter |
613 | 616 | ||
614 | int scriptEngineNameLength = m_ScriptEngine.ScriptEngineName.Length - scriptEngineNameIndex; | 617 | int scriptEngineNameLength = m_ScriptEngineDirect.ScriptEngineName.Length - scriptEngineNameIndex; |
615 | 618 | ||
616 | // create char array then a string that is only the script engine name | 619 | // create char array then a string that is only the script engine name |
617 | Char[] scriptEngineNameCharArray = m_ScriptEngine.ScriptEngineName.ToCharArray(scriptEngineNameIndex, scriptEngineNameLength); | 620 | Char[] scriptEngineNameCharArray = m_ScriptEngineDirect.ScriptEngineName.ToCharArray(scriptEngineNameIndex, scriptEngineNameLength); |
618 | String scriptEngineName = new String(scriptEngineNameCharArray); | 621 | String scriptEngineName = new String(scriptEngineNameCharArray); |
619 | 622 | ||
620 | return scriptEngineName; | 623 | return scriptEngineName; |
@@ -805,5 +808,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
805 | 808 | ||
806 | return jsondata; | 809 | return jsondata; |
807 | } | 810 | } |
811 | |||
812 | internal void LSLError(string msg) | ||
813 | { | ||
814 | throw new Exception("LSL Runtime Error: " + msg); | ||
815 | } | ||
808 | } | 816 | } |
809 | } | 817 | } |