diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 17f5a64..a85a36e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -10354,6 +10354,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10354 | case ScriptBaseClass.OBJECT_CREATOR: | 10354 | case ScriptBaseClass.OBJECT_CREATOR: |
10355 | ret.Add(new LSL_String(UUID.Zero.ToString())); | 10355 | ret.Add(new LSL_String(UUID.Zero.ToString())); |
10356 | break; | 10356 | break; |
10357 | // For the following 8 see the Object version below | ||
10358 | case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT: | ||
10359 | ret.Add(new LSL_Integer(0)); | ||
10360 | break; | ||
10361 | case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT: | ||
10362 | ret.Add(new LSL_Integer(0)); | ||
10363 | break; | ||
10364 | case ScriptBaseClass.OBJECT_SCRIPT_MEMORY: | ||
10365 | ret.Add(new LSL_Integer(0)); | ||
10366 | break; | ||
10367 | case ScriptBaseClass.OBJECT_SCRIPT_TIME: | ||
10368 | ret.Add(new LSL_Float(0)); | ||
10369 | break; | ||
10370 | case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE: | ||
10371 | ret.Add(new LSL_Integer(0)); | ||
10372 | break; | ||
10373 | case ScriptBaseClass.OBJECT_SERVER_COST: | ||
10374 | ret.Add(new LSL_Float(0)); | ||
10375 | break; | ||
10376 | case ScriptBaseClass.OBJECT_STREAMING_COST: | ||
10377 | ret.Add(new LSL_Float(0)); | ||
10378 | break; | ||
10379 | case ScriptBaseClass.OBJECT_PHYSICS_COST: | ||
10380 | ret.Add(new LSL_Float(0)); | ||
10381 | break; | ||
10382 | default: | ||
10383 | // Invalid or unhandled constant. | ||
10384 | ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL)); | ||
10385 | break; | ||
10357 | } | 10386 | } |
10358 | } | 10387 | } |
10359 | 10388 | ||
@@ -10391,6 +10420,49 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10391 | case ScriptBaseClass.OBJECT_CREATOR: | 10420 | case ScriptBaseClass.OBJECT_CREATOR: |
10392 | ret.Add(new LSL_String(obj.CreatorID.ToString())); | 10421 | ret.Add(new LSL_String(obj.CreatorID.ToString())); |
10393 | break; | 10422 | break; |
10423 | // The following 8 I have intentionaly coded to return zero. They are part of | ||
10424 | // "Land Impact" calculations. These calculations are probably not applicable | ||
10425 | // to OpenSim, required figures (cpu/memory usage) are not currently tracked | ||
10426 | // I have intentionally left these all at zero rather than return possibly | ||
10427 | // missleading numbers | ||
10428 | case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT: | ||
10429 | // in SL this currently includes crashed scripts | ||
10430 | ret.Add(new LSL_Integer(0)); | ||
10431 | break; | ||
10432 | case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT: | ||
10433 | ret.Add(new LSL_Integer(0)); | ||
10434 | break; | ||
10435 | case ScriptBaseClass.OBJECT_SCRIPT_MEMORY: | ||
10436 | // The value returned in SL for mono scripts is 65536 * number of active scripts | ||
10437 | ret.Add(new LSL_Integer(0)); | ||
10438 | break; | ||
10439 | case ScriptBaseClass.OBJECT_SCRIPT_TIME: | ||
10440 | // Average cpu time per simulator frame expended on all scripts in the objetc | ||
10441 | ret.Add(new LSL_Float(0)); | ||
10442 | break; | ||
10443 | case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE: | ||
10444 | // according to the SL wiki A prim or linkset will have prim | ||
10445 | // equivalent of the number of prims in a linkset if it does not | ||
10446 | // contain a mesh anywhere in the link set or is not a normal prim | ||
10447 | // The value returned in SL for normal prims is prim count | ||
10448 | ret.Add(new LSL_Integer(0)); | ||
10449 | break; | ||
10450 | case ScriptBaseClass.OBJECT_SERVER_COST: | ||
10451 | // The value returned in SL for normal prims is prim count | ||
10452 | ret.Add(new LSL_Float(0)); | ||
10453 | break; | ||
10454 | case ScriptBaseClass.OBJECT_STREAMING_COST: | ||
10455 | // The value returned in SL for normal prims is prim count * 0.06 | ||
10456 | ret.Add(new LSL_Float(0)); | ||
10457 | break; | ||
10458 | case ScriptBaseClass.OBJECT_PHYSICS_COST: | ||
10459 | // The value returned in SL for normal prims is prim count | ||
10460 | ret.Add(new LSL_Float(0)); | ||
10461 | break; | ||
10462 | default: | ||
10463 | // Invalid or unhandled constant. | ||
10464 | ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL)); | ||
10465 | break; | ||
10394 | } | 10466 | } |
10395 | } | 10467 | } |
10396 | 10468 | ||