29 using System.Reflection;
30 using System.Collections;
31 using System.Collections.Generic;
32 using System.Runtime.Remoting.Lifetime;
33 using System.Threading;
37 using OpenSim.Framework;
38 using OpenSim.Region.CoreModules.World.LightShare;
39 using OpenSim.Region.Framework.Interfaces;
40 using OpenSim.Region.Framework.Scenes;
41 using OpenSim.Region.ScriptEngine.Shared;
42 using OpenSim.Region.ScriptEngine.Shared.Api.Plugins;
43 using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
44 using OpenSim.Region.ScriptEngine.Interfaces;
45 using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
62 internal bool m_LSFunctionsEnabled =
false;
68 m_ScriptEngine = scriptEngine;
71 if (m_ScriptEngine.Config.GetBoolean(
"AllowLightShareFunctions",
false))
72 m_LSFunctionsEnabled =
true;
76 m_LSFunctionsEnabled =
false;
81 ILease lease = (ILease)base.InitializeLifetimeService();
83 if (lease.CurrentState == LeaseState.Initial)
85 lease.InitialLeaseTime = TimeSpan.FromMinutes(0);
94 get {
return m_ScriptEngine.World; }
100 internal void LSShoutError(
string message)
102 if (message.Length > 1023)
103 message = message.Substring(0, 1023);
105 World.SimChat(Utils.StringToBytes(message),
109 wComm.DeliverMessage(ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.Name, m_host.UUID, message);
118 if (!m_LSFunctionsEnabled)
120 LSShoutError(
"LightShare functions are not enabled.");
123 m_host.AddScriptLPS(1);
128 while (idx < rules.Length)
130 LSL_Integer ruleInt = rules.GetLSLIntegerItem(idx);
131 uint rule = (uint)ruleInt;
136 case (
int)ScriptBaseClass.WL_AMBIENT:
137 toadd.Add(
new LSL_Rotation(wl.ambient.X, wl.ambient.Y, wl.ambient.Z, wl.ambient.W));
139 case (
int)ScriptBaseClass.WL_BIG_WAVE_DIRECTION:
140 toadd.Add(
new LSL_Vector(wl.bigWaveDirection.X, wl.bigWaveDirection.Y, 0.0f));
142 case (
int)ScriptBaseClass.WL_BLUE_DENSITY:
143 toadd.Add(
new LSL_Rotation(wl.blueDensity.X, wl.blueDensity.Y, wl.blueDensity.Z, wl.blueDensity.W));
145 case (
int)ScriptBaseClass.WL_BLUR_MULTIPLIER:
146 toadd.Add(
new LSL_Float(wl.blurMultiplier));
148 case (
int)ScriptBaseClass.WL_CLOUD_COLOR:
149 toadd.Add(
new LSL_Rotation(wl.cloudColor.X, wl.cloudColor.Y, wl.cloudColor.Z, wl.cloudColor.W));
151 case (
int)ScriptBaseClass.WL_CLOUD_COVERAGE:
152 toadd.Add(
new LSL_Float(wl.cloudCoverage));
154 case (
int)ScriptBaseClass.WL_CLOUD_DETAIL_XY_DENSITY:
155 toadd.Add(
new LSL_Vector(wl.cloudDetailXYDensity.X, wl.cloudDetailXYDensity.Y, wl.cloudDetailXYDensity.Z));
157 case (
int)ScriptBaseClass.WL_CLOUD_SCALE:
160 case (
int)ScriptBaseClass.WL_CLOUD_SCROLL_X:
161 toadd.Add(
new LSL_Float(wl.cloudScrollX));
163 case (
int)ScriptBaseClass.WL_CLOUD_SCROLL_X_LOCK:
164 toadd.Add(
new LSL_Integer(wl.cloudScrollXLock ? 1 : 0));
166 case (
int)ScriptBaseClass.WL_CLOUD_SCROLL_Y:
167 toadd.Add(
new LSL_Float(wl.cloudScrollY));
169 case (
int)ScriptBaseClass.WL_CLOUD_SCROLL_Y_LOCK:
170 toadd.Add(
new LSL_Integer(wl.cloudScrollYLock ? 1 : 0));
172 case (
int)ScriptBaseClass.WL_CLOUD_XY_DENSITY:
173 toadd.Add(
new LSL_Vector(wl.cloudXYDensity.X, wl.cloudXYDensity.Y, wl.cloudXYDensity.Z));
175 case (
int)ScriptBaseClass.WL_DENSITY_MULTIPLIER:
176 toadd.Add(
new LSL_Float(wl.densityMultiplier));
178 case (
int)ScriptBaseClass.WL_DISTANCE_MULTIPLIER:
179 toadd.Add(
new LSL_Float(wl.distanceMultiplier));
181 case (
int)ScriptBaseClass.WL_DRAW_CLASSIC_CLOUDS:
182 toadd.Add(
new LSL_Integer(wl.drawClassicClouds ? 1 : 0));
184 case (
int)ScriptBaseClass.WL_EAST_ANGLE:
187 case (
int)ScriptBaseClass.WL_FRESNEL_OFFSET:
188 toadd.Add(
new LSL_Float(wl.fresnelOffset));
190 case (
int)ScriptBaseClass.WL_FRESNEL_SCALE:
191 toadd.Add(
new LSL_Float(wl.fresnelScale));
193 case (
int)ScriptBaseClass.WL_HAZE_DENSITY:
194 toadd.Add(
new LSL_Float(wl.hazeDensity));
196 case (
int)ScriptBaseClass.WL_HAZE_HORIZON:
197 toadd.Add(
new LSL_Float(wl.hazeHorizon));
199 case (
int)ScriptBaseClass.WL_HORIZON:
200 toadd.Add(
new LSL_Rotation(wl.horizon.X, wl.horizon.Y, wl.horizon.Z, wl.horizon.W));
202 case (
int)ScriptBaseClass.WL_LITTLE_WAVE_DIRECTION:
203 toadd.Add(
new LSL_Vector(wl.littleWaveDirection.X, wl.littleWaveDirection.Y, 0.0f));
205 case (
int)ScriptBaseClass.WL_MAX_ALTITUDE:
208 case (
int)ScriptBaseClass.WL_NORMAL_MAP_TEXTURE:
209 toadd.Add(
new LSL_Key(wl.normalMapTexture.ToString()));
211 case (
int)ScriptBaseClass.WL_REFLECTION_WAVELET_SCALE:
212 toadd.Add(
new LSL_Vector(wl.reflectionWaveletScale.X, wl.reflectionWaveletScale.Y, wl.reflectionWaveletScale.Z));
214 case (
int)ScriptBaseClass.WL_REFRACT_SCALE_ABOVE:
215 toadd.Add(
new LSL_Float(wl.refractScaleAbove));
217 case (
int)ScriptBaseClass.WL_REFRACT_SCALE_BELOW:
218 toadd.Add(
new LSL_Float(wl.refractScaleBelow));
220 case (
int)ScriptBaseClass.WL_SCENE_GAMMA:
223 case (
int)ScriptBaseClass.WL_STAR_BRIGHTNESS:
224 toadd.Add(
new LSL_Float(wl.starBrightness));
226 case (
int)ScriptBaseClass.WL_SUN_GLOW_FOCUS:
227 toadd.Add(
new LSL_Float(wl.sunGlowFocus));
229 case (
int)ScriptBaseClass.WL_SUN_GLOW_SIZE:
230 toadd.Add(
new LSL_Float(wl.sunGlowSize));
232 case (
int)ScriptBaseClass.WL_SUN_MOON_COLOR:
233 toadd.Add(
new LSL_Rotation(wl.sunMoonColor.X, wl.sunMoonColor.Y, wl.sunMoonColor.Z, wl.sunMoonColor.W));
235 case (
int)ScriptBaseClass.WL_SUN_MOON_POSITION:
236 toadd.Add(
new LSL_Float(wl.sunMoonPosition));
238 case (
int)ScriptBaseClass.WL_UNDERWATER_FOG_MODIFIER:
239 toadd.Add(
new LSL_Float(wl.underwaterFogModifier));
241 case (
int)ScriptBaseClass.WL_WATER_COLOR:
242 toadd.Add(
new LSL_Vector(wl.waterColor.X, wl.waterColor.Y, wl.waterColor.Z));
244 case (
int)ScriptBaseClass.WL_WATER_FOG_DENSITY_EXPONENT:
245 toadd.Add(
new LSL_Float(wl.waterFogDensityExponent));
249 if (toadd.Length > 0)
252 values.Add(toadd.Data[0]);
266 while (idx < rules.Length)
272 rule = (uint)rules.GetLSLIntegerItem(idx);
274 catch (InvalidCastException)
276 throw new InvalidCastException(
string.Format(
"Error running rule type: arg #{0} - parameter type must be integer", idx));
283 case (
int)ScriptBaseClass.WL_SUN_MOON_POSITION:
287 wl.sunMoonPosition = (float)rules.GetLSLFloatItem(idx);
289 catch (InvalidCastException)
291 throw new InvalidCastException(
string.Format(
"Error running rule WL_SUN_MOON_POSITION: arg #{0} - parameter 1 must be float", idx));
294 case (
int)ScriptBaseClass.WL_AMBIENT:
298 iQ = rules.GetQuaternionItem(idx);
300 catch (InvalidCastException)
302 throw new InvalidCastException(
string.Format(
"Error running rule WL_AMBIENT: arg #{0} - parameter 1 must be rotation", idx));
304 wl.ambient =
new Vector4((
float)iQ.x, (
float)iQ.y, (
float)iQ.z, (
float)iQ.s);
306 case (
int)ScriptBaseClass.WL_BIG_WAVE_DIRECTION:
310 iV = rules.GetVector3Item(idx);
312 catch (InvalidCastException)
314 throw new InvalidCastException(
string.Format(
"Error running rule WL_BIG_WAVE_DIRECTION: arg #{0} - parameter 1 must be vector", idx));
316 wl.bigWaveDirection =
new Vector2((
float)iV.x, (
float)iV.y);
318 case (
int)ScriptBaseClass.WL_BLUE_DENSITY:
322 iQ = rules.GetQuaternionItem(idx);
324 catch (InvalidCastException)
326 throw new InvalidCastException(
string.Format(
"Error running rule WL_BLUE_DENSITY: arg #{0} - parameter 1 must be rotation", idx));
328 wl.blueDensity =
new Vector4((
float)iQ.x, (
float)iQ.y, (
float)iQ.z, (
float)iQ.s);
330 case (
int)ScriptBaseClass.WL_BLUR_MULTIPLIER:
334 wl.blurMultiplier = (float)rules.GetLSLFloatItem(idx);
336 catch (InvalidCastException)
338 throw new InvalidCastException(
string.Format(
"Error running rule WL_BLUR_MULTIPLIER: arg #{0} - parameter 1 must be float", idx));
341 case (
int)ScriptBaseClass.WL_CLOUD_COLOR:
345 iQ = rules.GetQuaternionItem(idx);
347 catch (InvalidCastException)
349 throw new InvalidCastException(
string.Format(
"Error running rule WL_CLOUD_COLOR: arg #{0} - parameter 1 must be rotation", idx));
351 wl.cloudColor =
new Vector4((
float)iQ.x, (
float)iQ.y, (
float)iQ.z, (
float)iQ.s);
353 case (
int)ScriptBaseClass.WL_CLOUD_COVERAGE:
357 wl.cloudCoverage = (float)rules.GetLSLFloatItem(idx);
359 catch (InvalidCastException)
361 throw new InvalidCastException(
string.Format(
"Error running rule WL_CLOUD_COVERAGE: arg #{0} - parameter 1 must be float", idx));
364 case (
int)ScriptBaseClass.WL_CLOUD_DETAIL_XY_DENSITY:
368 iV = rules.GetVector3Item(idx);
370 catch (InvalidCastException)
372 throw new InvalidCastException(
string.Format(
"Error running rule WL_CLOUD_DETAIL_XY_DENSITY: arg #{0} - parameter 1 must be vector", idx));
374 wl.cloudDetailXYDensity = iV;
376 case (
int)ScriptBaseClass.WL_CLOUD_SCALE:
380 wl.cloudScale = (float)rules.GetLSLFloatItem(idx);
382 catch (InvalidCastException)
384 throw new InvalidCastException(
string.Format(
"Error running rule WL_CLOUD_SCALE: arg #{0} - parameter 1 must be float", idx));
387 case (
int)ScriptBaseClass.WL_CLOUD_SCROLL_X:
391 wl.cloudScrollX = (float)rules.GetLSLFloatItem(idx);
393 catch (InvalidCastException)
395 throw new InvalidCastException(
string.Format(
"Error running rule WL_CLOUD_SCROLL_X: arg #{0} - parameter 1 must be float", idx));
398 case (
int)ScriptBaseClass.WL_CLOUD_SCROLL_X_LOCK:
402 wl.cloudScrollXLock = rules.GetLSLIntegerItem(idx).value == 1 ?
true :
false;
404 catch (InvalidCastException)
406 throw new InvalidCastException(
string.Format(
"Error running rule WL_CLOUD_SCROLL_Y_LOCK: arg #{0} - parameter 1 must be integer", idx));
409 case (
int)ScriptBaseClass.WL_CLOUD_SCROLL_Y:
413 wl.cloudScrollY = (float)rules.GetLSLFloatItem(idx);
415 catch (InvalidCastException)
417 throw new InvalidCastException(
string.Format(
"Error running rule WL_CLOUD_SCROLL_Y: arg #{0} - parameter 1 must be float", idx));
420 case (
int)ScriptBaseClass.WL_CLOUD_SCROLL_Y_LOCK:
424 wl.cloudScrollYLock = rules.GetLSLIntegerItem(idx).value == 1 ?
true :
false;
426 catch (InvalidCastException)
428 throw new InvalidCastException(
string.Format(
"Error running rule WL_CLOUD_SCROLL_Y_LOCK: arg #{0} - parameter 1 must be integer", idx));
431 case (
int)ScriptBaseClass.WL_CLOUD_XY_DENSITY:
435 iV = rules.GetVector3Item(idx);
437 catch (InvalidCastException)
439 throw new InvalidCastException(
string.Format(
"Error running rule WL_CLOUD_XY_DENSITY: arg #{0} - parameter 1 must be vector", idx));
441 wl.cloudXYDensity = iV;
443 case (
int)ScriptBaseClass.WL_DENSITY_MULTIPLIER:
447 wl.densityMultiplier = (float)rules.GetLSLFloatItem(idx);
449 catch (InvalidCastException)
451 throw new InvalidCastException(
string.Format(
"Error running rule WL_DENSITY_MULTIPLIER: arg #{0} - parameter 1 must be float", idx));
454 case (
int)ScriptBaseClass.WL_DISTANCE_MULTIPLIER:
458 wl.distanceMultiplier = (float)rules.GetLSLFloatItem(idx);
460 catch (InvalidCastException)
462 throw new InvalidCastException(
string.Format(
"Error running rule WL_DISTANCE_MULTIPLIER: arg #{0} - parameter 1 must be float", idx));
465 case (
int)ScriptBaseClass.WL_DRAW_CLASSIC_CLOUDS:
469 wl.drawClassicClouds = rules.GetLSLIntegerItem(idx).value == 1 ?
true :
false;
471 catch (InvalidCastException)
473 throw new InvalidCastException(
string.Format(
"Error running rule WL_DRAW_CLASSIC_CLOUDS: arg #{0} - parameter 1 must be integer", idx));
476 case (
int)ScriptBaseClass.WL_EAST_ANGLE:
480 wl.eastAngle = (float)rules.GetLSLFloatItem(idx);
482 catch (InvalidCastException)
484 throw new InvalidCastException(
string.Format(
"Error running rule WL_EAST_ANGLE: arg #{0} - parameter 1 must be float", idx));
487 case (
int)ScriptBaseClass.WL_FRESNEL_OFFSET:
491 wl.fresnelOffset = (float)rules.GetLSLFloatItem(idx);
493 catch (InvalidCastException)
495 throw new InvalidCastException(
string.Format(
"Error running rule WL_FRESNEL_OFFSET: arg #{0} - parameter 1 must be float", idx));
498 case (
int)ScriptBaseClass.WL_FRESNEL_SCALE:
502 wl.fresnelScale = (float)rules.GetLSLFloatItem(idx);
504 catch (InvalidCastException)
506 throw new InvalidCastException(
string.Format(
"Error running rule WL_FRESNEL_SCALE: arg #{0} - parameter 1 must be float", idx));
509 case (
int)ScriptBaseClass.WL_HAZE_DENSITY:
513 wl.hazeDensity = (float)rules.GetLSLFloatItem(idx);
515 catch (InvalidCastException)
517 throw new InvalidCastException(
string.Format(
"Error running rule WL_HAZE_DENSITY: arg #{0} - parameter 1 must be float", idx));
520 case (
int)ScriptBaseClass.WL_HAZE_HORIZON:
524 wl.hazeHorizon = (float)rules.GetLSLFloatItem(idx);
526 catch (InvalidCastException)
528 throw new InvalidCastException(
string.Format(
"Error running rule WL_HAZE_HORIZON: arg #{0} - parameter 1 must be float", idx));
531 case (
int)ScriptBaseClass.WL_HORIZON:
535 iQ = rules.GetQuaternionItem(idx);
537 catch (InvalidCastException)
539 throw new InvalidCastException(
string.Format(
"Error running rule WL_HORIZON: arg #{0} - parameter 1 must be rotation", idx));
541 wl.horizon =
new Vector4((
float)iQ.x, (
float)iQ.y, (
float)iQ.z, (
float)iQ.s);
543 case (
int)ScriptBaseClass.WL_LITTLE_WAVE_DIRECTION:
547 iV = rules.GetVector3Item(idx);
549 catch (InvalidCastException)
551 throw new InvalidCastException(
string.Format(
"Error running rule WL_LITTLE_WAVE_DIRECTION: arg #{0} - parameter 1 must be vector", idx));
553 wl.littleWaveDirection =
new Vector2((
float)iV.x, (
float)iV.y);
555 case (
int)ScriptBaseClass.WL_MAX_ALTITUDE:
559 wl.maxAltitude = (ushort)rules.GetLSLIntegerItem(idx).value;
561 catch (InvalidCastException)
563 throw new InvalidCastException(
string.Format(
"Error running rule WL_MAX_ALTITUDE: arg #{0} - parameter 1 must be integer", idx));
566 case (
int)ScriptBaseClass.WL_NORMAL_MAP_TEXTURE:
570 wl.normalMapTexture =
new UUID(rules.GetLSLStringItem(idx).m_string);
572 catch (ArgumentException)
574 throw new InvalidCastException(
string.Format(
"Error running rule WL_NORMAL_MAP_TEXTURE: arg #{0} - parameter 1 must be key", idx));
577 case (
int)ScriptBaseClass.WL_REFLECTION_WAVELET_SCALE:
581 iV = rules.GetVector3Item(idx);
583 catch (InvalidCastException)
585 throw new InvalidCastException(
string.Format(
"Error running rule WL_REFLECTION_WAVELET_SCALE: arg #{0} - parameter 1 must be vector", idx));
587 wl.reflectionWaveletScale = iV;
589 case (
int)ScriptBaseClass.WL_REFRACT_SCALE_ABOVE:
593 wl.refractScaleAbove = (float)rules.GetLSLFloatItem(idx);
595 catch (InvalidCastException)
597 throw new InvalidCastException(
string.Format(
"Error running rule WL_REFRACT_SCALE_ABOVE: arg #{0} - parameter 1 must be float", idx));
600 case (
int)ScriptBaseClass.WL_REFRACT_SCALE_BELOW:
604 wl.refractScaleBelow = (float)rules.GetLSLFloatItem(idx);
606 catch (InvalidCastException)
608 throw new InvalidCastException(
string.Format(
"Error running rule WL_REFRACT_SCALE_BELOW: arg #{0} - parameter 1 must be float", idx));
611 case (
int)ScriptBaseClass.WL_SCENE_GAMMA:
615 wl.sceneGamma = (float)rules.GetLSLFloatItem(idx);
617 catch (InvalidCastException)
619 throw new InvalidCastException(
string.Format(
"Error running rule WL_SCENE_GAMMA: arg #{0} - parameter 1 must be float", idx));
622 case (
int)ScriptBaseClass.WL_STAR_BRIGHTNESS:
626 wl.starBrightness = (float)rules.GetLSLFloatItem(idx);
628 catch (InvalidCastException)
630 throw new InvalidCastException(
string.Format(
"Error running rule WL_STAR_BRIGHTNESS: arg #{0} - parameter 1 must be float", idx));
633 case (
int)ScriptBaseClass.WL_SUN_GLOW_FOCUS:
637 wl.sunGlowFocus = (float)rules.GetLSLFloatItem(idx);
639 catch (InvalidCastException)
641 throw new InvalidCastException(
string.Format(
"Error running rule WL_SUN_GLOW_FOCUS: arg #{0} - parameter 1 must be float", idx));
644 case (
int)ScriptBaseClass.WL_SUN_GLOW_SIZE:
648 wl.sunGlowSize = (float)rules.GetLSLFloatItem(idx);
650 catch (InvalidCastException)
652 throw new InvalidCastException(
string.Format(
"Error running rule WL_SUN_GLOW_SIZE: arg #{0} - parameter 1 must be float", idx));
655 case (
int)ScriptBaseClass.WL_SUN_MOON_COLOR:
657 iQ = rules.GetQuaternionItem(idx);
660 wl.sunMoonColor =
new Vector4((
float)iQ.x, (
float)iQ.y, (
float)iQ.z, (
float)iQ.s);
662 catch (InvalidCastException)
664 throw new InvalidCastException(
string.Format(
"Error running rule WL_SUN_MOON_COLOR: arg #{0} - parameter 1 must be rotation", idx));
667 case (
int)ScriptBaseClass.WL_UNDERWATER_FOG_MODIFIER:
671 wl.underwaterFogModifier = (float)rules.GetLSLFloatItem(idx);
673 catch (InvalidCastException)
675 throw new InvalidCastException(
string.Format(
"Error running rule WL_UNDERWATER_FOG_MODIFIER: arg #{0} - parameter 1 must be float", idx));
678 case (
int)ScriptBaseClass.WL_WATER_COLOR:
682 iV = rules.GetVector3Item(idx);
684 catch (InvalidCastException)
686 throw new InvalidCastException(
string.Format(
"Error running rule WL_WATER_COLOR: arg #{0} - parameter 1 must be vector", idx));
690 case (
int)ScriptBaseClass.WL_WATER_FOG_DENSITY_EXPONENT:
694 wl.waterFogDensityExponent = (float)rules.GetLSLFloatItem(idx);
696 catch (InvalidCastException)
698 throw new InvalidCastException(
string.Format(
"Error running rule WL_WATER_FOG_DENSITY_EXPONENT: arg #{0} - parameter 1 must be float", idx));
714 if (!m_LSFunctionsEnabled)
716 LSShoutError(
"LightShare functions are not enabled.");
720 if (!
World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID))
724 if (sp == null || sp.
GodLevel < 200)
726 LSShoutError(
"lsSetWindlightScene can only be used by estate managers or owners.");
732 m_host.AddScriptLPS(1);
739 wl = getWindlightProfileFromRules(rules);
741 catch(InvalidCastException e)
743 LSShoutError(e.Message);
747 m_host.ParentGroup.Scene.StoreWindlightProfile(wl);
752 LSShoutError(
"Windlight module is disabled");
761 if (!m_LSFunctionsEnabled)
763 LSShoutError(
"LightShare functions are not enabled.");
767 if (!
World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID))
771 if (sp == null || sp.
GodLevel < 200)
773 LSShoutError(
"lsSetWindlightScene can only be used by estate managers or owners.");
778 m_host.ParentGroup.Scene.RegionInfo.WindlightSettings.valid =
false;
779 if (m_host.ParentGroup.Scene.SimulationDataService != null)
780 m_host.ParentGroup.Scene.SimulationDataService.RemoveRegionWindlightSettings(m_host.ParentGroup.Scene.RegionInfo.RegionID);
782 m_host.ParentGroup.Scene.EventManager.TriggerOnSaveNewWindlightProfile();
792 if (!m_LSFunctionsEnabled)
794 LSShoutError(
"LightShare functions are not enabled.");
798 if (!
World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID))
802 if (sp == null || sp.
GodLevel < 200)
804 LSShoutError(
"lsSetWindlightSceneTargeted can only be used by estate managers or owners.");
810 m_host.AddScriptLPS(1);
817 wl = getWindlightProfileFromRules(rules);
819 catch(InvalidCastException e)
821 LSShoutError(e.Message);
824 World.EventManager.TriggerOnSendNewWindlightProfileTargeted(wl,
new UUID(target.m_string));
829 LSShoutError(
"Windlight module is disabled");
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat LSL_Float
OpenSim.Region.ScriptEngine.Shared.LSL_Types.list LSL_List
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger LSL_Integer
int lsSetWindlightScene(LSL_List rules)
Set the current Windlight scene
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString LSL_Key
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat LSL_Float
OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion LSL_Rotation
Represents an item in a task inventory
OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3 LSL_Vector
OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3 LSL_Vector
LSL_List lsGetWindlightScene(LSL_List rules)
Get the current Windlight scene
override Object InitializeLifetimeService()
static bool EnableWindlight
An interface for a script API module to communicate with the engine it's running under ...
void Initialize(IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item)
Initialize the API
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger LSL_Integer
Interface for communication between OpenSim modules and in-world scripts
void lsClearWindlightScene()
OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion LSL_Rotation
Interactive OpenSim region server
int lsSetWindlightSceneTargeted(LSL_List rules, LSL_Key target)
Set the current Windlight scene to a target avatar
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger LSLInteger
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString LSL_String
OpenSim.Region.ScriptEngine.Shared.LSL_Types.list LSL_List
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString LSL_Key