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 43b66f4..a046f29 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -10333,6 +10333,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10333 | case ScriptBaseClass.OBJECT_CREATOR: | 10333 | case ScriptBaseClass.OBJECT_CREATOR: |
10334 | ret.Add(new LSL_String(UUID.Zero.ToString())); | 10334 | ret.Add(new LSL_String(UUID.Zero.ToString())); |
10335 | break; | 10335 | break; |
10336 | // For the following 8 see the Object version below | ||
10337 | case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT: | ||
10338 | ret.Add(new LSL_Integer(0)); | ||
10339 | break; | ||
10340 | case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT: | ||
10341 | ret.Add(new LSL_Integer(0)); | ||
10342 | break; | ||
10343 | case ScriptBaseClass.OBJECT_SCRIPT_MEMORY: | ||
10344 | ret.Add(new LSL_Integer(0)); | ||
10345 | break; | ||
10346 | case ScriptBaseClass.OBJECT_SCRIPT_TIME: | ||
10347 | ret.Add(new LSL_Float(0)); | ||
10348 | break; | ||
10349 | case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE: | ||
10350 | ret.Add(new LSL_Integer(0)); | ||
10351 | break; | ||
10352 | case ScriptBaseClass.OBJECT_SERVER_COST: | ||
10353 | ret.Add(new LSL_Float(0)); | ||
10354 | break; | ||
10355 | case ScriptBaseClass.OBJECT_STREAMING_COST: | ||
10356 | ret.Add(new LSL_Float(0)); | ||
10357 | break; | ||
10358 | case ScriptBaseClass.OBJECT_PHYSICS_COST: | ||
10359 | ret.Add(new LSL_Float(0)); | ||
10360 | break; | ||
10361 | default: | ||
10362 | // Invalid or unhandled constant. | ||
10363 | ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL)); | ||
10364 | break; | ||
10336 | } | 10365 | } |
10337 | } | 10366 | } |
10338 | 10367 | ||
@@ -10370,6 +10399,49 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10370 | case ScriptBaseClass.OBJECT_CREATOR: | 10399 | case ScriptBaseClass.OBJECT_CREATOR: |
10371 | ret.Add(new LSL_String(obj.CreatorID.ToString())); | 10400 | ret.Add(new LSL_String(obj.CreatorID.ToString())); |
10372 | break; | 10401 | break; |
10402 | // The following 8 I have intentionaly coded to return zero. They are part of | ||
10403 | // "Land Impact" calculations. These calculations are probably not applicable | ||
10404 | // to OpenSim, required figures (cpu/memory usage) are not currently tracked | ||
10405 | // I have intentionally left these all at zero rather than return possibly | ||
10406 | // missleading numbers | ||
10407 | case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT: | ||
10408 | // in SL this currently includes crashed scripts | ||
10409 | ret.Add(new LSL_Integer(0)); | ||
10410 | break; | ||
10411 | case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT: | ||
10412 | ret.Add(new LSL_Integer(0)); | ||
10413 | break; | ||
10414 | case ScriptBaseClass.OBJECT_SCRIPT_MEMORY: | ||
10415 | // The value returned in SL for mono scripts is 65536 * number of active scripts | ||
10416 | ret.Add(new LSL_Integer(0)); | ||
10417 | break; | ||
10418 | case ScriptBaseClass.OBJECT_SCRIPT_TIME: | ||
10419 | // Average cpu time per simulator frame expended on all scripts in the objetc | ||
10420 | ret.Add(new LSL_Float(0)); | ||
10421 | break; | ||
10422 | case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE: | ||
10423 | // according to the SL wiki A prim or linkset will have prim | ||
10424 | // equivalent of the number of prims in a linkset if it does not | ||
10425 | // contain a mesh anywhere in the link set or is not a normal prim | ||
10426 | // The value returned in SL for normal prims is prim count | ||
10427 | ret.Add(new LSL_Integer(0)); | ||
10428 | break; | ||
10429 | case ScriptBaseClass.OBJECT_SERVER_COST: | ||
10430 | // The value returned in SL for normal prims is prim count | ||
10431 | ret.Add(new LSL_Float(0)); | ||
10432 | break; | ||
10433 | case ScriptBaseClass.OBJECT_STREAMING_COST: | ||
10434 | // The value returned in SL for normal prims is prim count * 0.06 | ||
10435 | ret.Add(new LSL_Float(0)); | ||
10436 | break; | ||
10437 | case ScriptBaseClass.OBJECT_PHYSICS_COST: | ||
10438 | // The value returned in SL for normal prims is prim count | ||
10439 | ret.Add(new LSL_Float(0)); | ||
10440 | break; | ||
10441 | default: | ||
10442 | // Invalid or unhandled constant. | ||
10443 | ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL)); | ||
10444 | break; | ||
10373 | } | 10445 | } |
10374 | } | 10446 | } |
10375 | 10447 | ||