Add llGetEnv to the partially computable functions.

Includes all known settings up to 16.12.03.322072 so far. It will be updated as new settings are added.
This commit is contained in:
Sei Lisa 2016-12-12 22:58:12 +01:00
parent b4a8b57184
commit ae984169ad
2 changed files with 19 additions and 2 deletions

View file

@ -19,13 +19,19 @@
from lslcommon import *
from lslbasefuncs import ELSLCantCompute, isinteger, iskey, islist, \
isvector, NULL_KEY, ZERO_VECTOR, ZERO_ROTATION
#isfloat, isstring, isrotation
isvector, isstring, NULL_KEY, ZERO_VECTOR, ZERO_ROTATION
#isfloat, isrotation
TouchEvents = ('touch', 'touch_start', 'touch_end')
DetectionEvents = ('touch', 'touch_start', 'touch_end',
'collision', 'collision_start', 'collision_end',
'sensor')
GetEnvSettings = ('agent_limit', 'dynamic_pathfinding', 'estate_id',
'estate_name', 'frame_number', 'region_cpu_ratio', 'region_idle',
'region_product_name', 'region_product_sku', 'region_start_time',
'sim_channel', 'sim_version', 'simulator_hostname',
'region_max_prims', # <http://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_Magnum/16#16.11.02.321369>
'region_object_bonus') # <http://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_Magnum/16#16.12.03.322072>
def llCloud(v):
assert isvector(v)
@ -201,4 +207,10 @@ def llGetDisplayName(id):
return u''
raise ELSLCantCompute
def llGetEnv(s):
assert isstring(s)
if s not in GetEnvSettings:
return u""
raise ELSLCantCompute
# TODO: Add more predictable functions.