diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs index 4bd3dff..7844c75 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | |||
@@ -200,24 +200,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
200 | for (int i = 0; i < result.Length; i++) | 200 | for (int i = 0; i < result.Length; i++) |
201 | { | 201 | { |
202 | if (result[i] is string) | 202 | if (result[i] is string) |
203 | { | ||
203 | llist[i] = new LSL_String((string)result[i]); | 204 | llist[i] = new LSL_String((string)result[i]); |
205 | } | ||
204 | else if (result[i] is int) | 206 | else if (result[i] is int) |
207 | { | ||
205 | llist[i] = new LSL_Integer((int)result[i]); | 208 | llist[i] = new LSL_Integer((int)result[i]); |
209 | } | ||
206 | else if (result[i] is float) | 210 | else if (result[i] is float) |
211 | { | ||
207 | llist[i] = new LSL_Float((float)result[i]); | 212 | llist[i] = new LSL_Float((float)result[i]); |
213 | } | ||
214 | else if (result[i] is UUID) | ||
215 | { | ||
216 | llist[i] = new LSL_Key(result[i].ToString()); | ||
217 | } | ||
208 | else if (result[i] is OpenMetaverse.Vector3) | 218 | else if (result[i] is OpenMetaverse.Vector3) |
209 | { | 219 | { |
210 | OpenMetaverse.Vector3 vresult = (OpenMetaverse.Vector3)result[i]; | 220 | OpenMetaverse.Vector3 vresult = (OpenMetaverse.Vector3)result[i]; |
211 | llist[i] = new LSL_Vector(vresult.X,vresult.Y,vresult.Z); | 221 | llist[i] = new LSL_Vector(vresult.X, vresult.Y, vresult.Z); |
212 | } | 222 | } |
213 | else if (result[i] is OpenMetaverse.Quaternion) | 223 | else if (result[i] is OpenMetaverse.Quaternion) |
214 | { | 224 | { |
215 | OpenMetaverse.Quaternion qresult = (OpenMetaverse.Quaternion)result[i]; | 225 | OpenMetaverse.Quaternion qresult = (OpenMetaverse.Quaternion)result[i]; |
216 | llist[i] = new LSL_Rotation(qresult.X,qresult.Y,qresult.Z,qresult.W); | 226 | llist[i] = new LSL_Rotation(qresult.X, qresult.Y, qresult.Z, qresult.W); |
217 | } | 227 | } |
218 | else | 228 | else |
219 | { | 229 | { |
220 | MODError(String.Format("unknown list element returned by {0}",fname)); | 230 | MODError(String.Format("unknown list element {1} returned by {0}", fname, result[i].GetType().Name)); |
221 | } | 231 | } |
222 | } | 232 | } |
223 | 233 | ||