From 18362b25bf343749a1f10b09925e3c5b903ef865 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Fri, 2 May 2008 23:23:39 +0000 Subject: Thank you kindly, Melanie for a patch to solve llParticleSystem and osDynamicTexture issues. --- OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 77 ++++++++++++++----------- 1 file changed, 42 insertions(+), 35 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_Types.cs') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index 5337d7f..edd16a7 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs @@ -704,6 +704,37 @@ namespace OpenSim.Region.ScriptEngine.Common } return ret; } + + private string ToSoup() + { + string output; + output = String.Empty; + if (m_data.Length == 0) + { + return String.Empty; + } + foreach (object o in m_data) + { + output = output + o.ToString(); + } + return output; + } + + public static explicit operator String(list l) + { + return l.ToSoup(); + } + + public static explicit operator LSLString(list l) + { + return new LSLString(l.ToSoup()); + } + + public override string ToString() + { + return ToSoup(); + } + #endregion #region Statistic Methods @@ -935,36 +966,6 @@ namespace OpenSim.Region.ScriptEngine.Common } } - public override string ToString() - { - string output; - output = String.Empty; - if (m_data.Length == 0) - { - return String.Empty; - } - foreach (object o in m_data) - { - output = output + o.ToString(); - } - return output; - - } - - public static explicit operator string(list l) - { - string output; - output = String.Empty; - if (l.m_data.Length == 0) - { - return String.Empty; - } - foreach (object o in l.m_data) - { - output = output + o.ToString(); - } - return output; - } } // @@ -1200,11 +1201,17 @@ namespace OpenSim.Region.ScriptEngine.Common } #endregion - static public implicit operator Int32(LSLInteger i) + + static public implicit operator int(LSLInteger i) { return i.value; } + static public implicit operator uint(LSLInteger i) + { + return (uint)i.value; + } + static public explicit operator LSLString(LSLInteger i) { return new LSLString(i.ToString()); @@ -1255,10 +1262,10 @@ namespace OpenSim.Region.ScriptEngine.Common return i; } - //static public implicit operator System.Double(LSLInteger i) - //{ - // return (double)i.value; - //} + static public implicit operator System.Double(LSLInteger i) + { + return (double)i.value; + } #region Overriders -- cgit v1.1