From a6a6bf007a2fb0e33daefc0ea7c4ad968a85d08e Mon Sep 17 00:00:00 2001 From: CasperW Date: Wed, 9 Dec 2009 22:57:35 +0100 Subject: [PATCH] Move osFunctions into a new Careminster script interface --- .../Shared/Api/Implementation/CM_Api.cs | 430 ++++++++++++++++++ .../Shared/Api/Implementation/OSSL_Api.cs | 334 -------------- .../Shared/Api/Interface/ICM_Api.cs | 20 + .../Shared/Api/Interface/IOSSL_Api.cs | 5 - .../Shared/Api/Runtime/CM_Constants.cs | 76 ++++ .../Shared/Api/Runtime/CM_Stub.cs | 71 +++ .../Shared/Api/Runtime/LSL_Constants.cs | 38 -- .../Shared/Api/Runtime/OSSL_Stub.cs | 10 - bin/OpenSim.ini.example | 3 + 9 files changed, 600 insertions(+), 387 deletions(-) create mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs create mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs create mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs create mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs new file mode 100644 index 0000000000..4cc2f0a142 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs @@ -0,0 +1,430 @@ +using System; +using System.Reflection; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Remoting.Lifetime; +using OpenMetaverse; +using Nini.Config; +using OpenSim; +using OpenSim.Framework; +using OpenSim.Region.CoreModules.World.Meta7Windlight; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.ScriptEngine.Shared; +using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; +using OpenSim.Region.ScriptEngine.Shared.ScriptBase; +using OpenSim.Region.ScriptEngine.Interfaces; +using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; + +using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; +using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; +using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; +using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; +using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; +using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; +using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; + +namespace OpenSim.Region.ScriptEngine.Shared.Api +{ + [Serializable] + public class CM_Api : MarshalByRefObject, ICM_Api, IScriptApi + { + internal IScriptEngine m_ScriptEngine; + internal SceneObjectPart m_host; + internal uint m_localID; + internal UUID m_itemID; + internal bool m_CMFunctionsEnabled = false; + internal IScriptModuleComms m_comms = null; + + public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID) + { + m_ScriptEngine = ScriptEngine; + m_host = host; + m_localID = localID; + m_itemID = itemID; + + if (m_ScriptEngine.Config.GetBoolean("AllowCareminsterFunctions", false)) + m_CMFunctionsEnabled = true; + + m_comms = m_ScriptEngine.World.RequestModuleInterface(); + if (m_comms == null) + m_CMFunctionsEnabled = false; + } + + public override Object InitializeLifetimeService() + { + ILease lease = (ILease)base.InitializeLifetimeService(); + + if (lease.CurrentState == LeaseState.Initial) + { + lease.InitialLeaseTime = TimeSpan.FromMinutes(0); + // lease.RenewOnCallTime = TimeSpan.FromSeconds(10.0); + // lease.SponsorshipTimeout = TimeSpan.FromMinutes(1.0); + } + return lease; + } + + public Scene World + { + get { return m_ScriptEngine.World; } + } + + // + //Dumps an error message on the debug console. + // + + internal void CMShoutError(string message) + { + if (message.Length > 1023) + message = message.Substring(0, 1023); + + World.SimChat(Utils.StringToBytes(message), + ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); + + IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); + wComm.DeliverMessage(ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.Name, m_host.UUID, message); + } + + /// + /// Get the current Windlight scene + /// + /// List of windlight parameters + public LSL_List cmGetWindlightScene(LSL_List rules) + { + if (!m_CMFunctionsEnabled) + { + CMShoutError("Careminster functions are not enabled."); + return new LSL_List(); + } + m_host.AddScriptLPS(1); + RegionMeta7WindlightData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; + + LSL_List values = new LSL_List(); + int idx = 0; + while (idx < rules.Length) + { + uint rule = (uint)rules.GetLSLIntegerItem(idx); + LSL_List toadd = new LSL_List(); + + switch (rule) + { + case (int)ScriptBaseClass.WL_AMBIENT: + toadd.Add(new LSL_Rotation(wl.ambient.X, wl.ambient.Y, wl.ambient.Z, wl.ambient.W)); + break; + case (int)ScriptBaseClass.WL_BIG_WAVE_DIRECTION: + toadd.Add(new LSL_Vector(wl.bigWaveDirection.X, wl.bigWaveDirection.Y, 0.0f)); + break; + case (int)ScriptBaseClass.WL_BLUE_DENSITY: + toadd.Add(new LSL_Rotation(wl.blueDensity.X, wl.blueDensity.Y, wl.blueDensity.Z, wl.blueDensity.W)); + break; + case (int)ScriptBaseClass.WL_BLUR_MULTIPLIER: + toadd.Add(new LSL_Float(wl.blurMultiplier)); + break; + case (int)ScriptBaseClass.WL_CLOUD_COLOR: + toadd.Add(new LSL_Rotation(wl.cloudColor.X, wl.cloudColor.Y, wl.cloudColor.Z, wl.cloudColor.W)); + break; + case (int)ScriptBaseClass.WL_CLOUD_COVERAGE: + toadd.Add(new LSL_Float(wl.cloudCoverage)); + break; + case (int)ScriptBaseClass.WL_CLOUD_DETAIL_XY_DENSITY: + toadd.Add(new LSL_Vector(wl.cloudDetailXYDensity.X, wl.cloudDetailXYDensity.Y, wl.cloudDetailXYDensity.Z)); + break; + case (int)ScriptBaseClass.WL_CLOUD_SCALE: + toadd.Add(new LSL_Float(wl.cloudScale)); + break; + case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X: + toadd.Add(new LSL_Float(wl.cloudScrollX)); + break; + case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X_LOCK: + toadd.Add(new LSL_Integer(wl.cloudScrollXLock ? 1 : 0)); + break; + case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y: + toadd.Add(new LSL_Float(wl.cloudScrollY)); + break; + case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y_LOCK: + toadd.Add(new LSL_Integer(wl.cloudScrollYLock ? 1 : 0)); + break; + case (int)ScriptBaseClass.WL_CLOUD_XY_DENSITY: + toadd.Add(new LSL_Vector(wl.cloudXYDensity.X, wl.cloudXYDensity.Y, wl.cloudXYDensity.Z)); + break; + case (int)ScriptBaseClass.WL_DENSITY_MULTIPLIER: + toadd.Add(new LSL_Float(wl.densityMultiplier)); + break; + case (int)ScriptBaseClass.WL_DISTANCE_MULTIPLIER: + toadd.Add(new LSL_Float(wl.distanceMultiplier)); + break; + case (int)ScriptBaseClass.WL_DRAW_CLASSIC_CLOUDS: + toadd.Add(new LSL_Integer(wl.drawClassicClouds ? 1 : 0)); + break; + case (int)ScriptBaseClass.WL_EAST_ANGLE: + toadd.Add(new LSL_Float(wl.eastAngle)); + break; + case (int)ScriptBaseClass.WL_FRESNEL_OFFSET: + toadd.Add(new LSL_Float(wl.fresnelOffset)); + break; + case (int)ScriptBaseClass.WL_FRESNEL_SCALE: + toadd.Add(new LSL_Float(wl.fresnelScale)); + break; + case (int)ScriptBaseClass.WL_HAZE_DENSITY: + toadd.Add(new LSL_Float(wl.hazeDensity)); + break; + case (int)ScriptBaseClass.WL_HAZE_HORIZON: + toadd.Add(new LSL_Float(wl.hazeHorizon)); + break; + case (int)ScriptBaseClass.WL_HORIZON: + toadd.Add(new LSL_Rotation(wl.horizon.X, wl.horizon.Y, wl.horizon.Z, wl.horizon.W)); + break; + case (int)ScriptBaseClass.WL_LITTLE_WAVE_DIRECTION: + toadd.Add(new LSL_Vector(wl.littleWaveDirection.X, wl.littleWaveDirection.Y, 0.0f)); + break; + case (int)ScriptBaseClass.WL_MAX_ALTITUDE: + toadd.Add(new LSL_Integer(wl.maxAltitude)); + break; + case (int)ScriptBaseClass.WL_NORMAL_MAP_TEXTURE: + toadd.Add(new LSL_Key(wl.normalMapTexture.ToString())); + break; + case (int)ScriptBaseClass.WL_REFLECTION_WAVELET_SCALE: + toadd.Add(new LSL_Vector(wl.reflectionWaveletScale.X, wl.reflectionWaveletScale.Y, wl.reflectionWaveletScale.Z)); + break; + case (int)ScriptBaseClass.WL_REFRACT_SCALE_ABOVE: + toadd.Add(new LSL_Float(wl.refractScaleAbove)); + break; + case (int)ScriptBaseClass.WL_REFRACT_SCALE_BELOW: + toadd.Add(new LSL_Float(wl.refractScaleBelow)); + break; + case (int)ScriptBaseClass.WL_SCENE_GAMMA: + toadd.Add(new LSL_Float(wl.sceneGamma)); + break; + case (int)ScriptBaseClass.WL_STAR_BRIGHTNESS: + toadd.Add(new LSL_Float(wl.starBrightness)); + break; + case (int)ScriptBaseClass.WL_SUN_GLOW_FOCUS: + toadd.Add(new LSL_Float(wl.sunGlowFocus)); + break; + case (int)ScriptBaseClass.WL_SUN_GLOW_SIZE: + toadd.Add(new LSL_Float(wl.sunGlowSize)); + break; + case (int)ScriptBaseClass.WL_SUN_MOON_COLOR: + toadd.Add(new LSL_Rotation(wl.sunMoonColor.X, wl.sunMoonColor.Y, wl.sunMoonColor.Z, wl.sunMoonColor.W)); + break; + case (int)ScriptBaseClass.WL_UNDERWATER_FOG_MODIFIER: + toadd.Add(new LSL_Float(wl.underwaterFogModifier)); + break; + case (int)ScriptBaseClass.WL_WATER_COLOR: + toadd.Add(new LSL_Vector(wl.waterColor.X, wl.waterColor.Y, wl.waterColor.Z)); + break; + case (int)ScriptBaseClass.WL_WATER_FOG_DENSITY_EXPONENT: + toadd.Add(new LSL_Float(wl.waterFogDensityExponent)); + break; + } + + if (toadd.Length > 0) + { + values.Add(rule); + values.Add(toadd.Data[0]); + } + idx++; + } + + + return values; + + } + + /// + /// Set the current Windlight scene + /// + /// + /// success: true or false + public int cmSetWindlightScene(LSL_List rules) + { + if (!m_CMFunctionsEnabled) + { + CMShoutError("Careminster functions are not enabled."); + return 0; + } + int success = 0; + m_host.AddScriptLPS(1); + if (Meta7WindlightModule.EnableWindlight) + { + RegionMeta7WindlightData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; + + LSL_List values = new LSL_List(); + int idx = 0; + success = 1; + while (idx < rules.Length) + { + uint rule = (uint)rules.GetLSLIntegerItem(idx); + LSL_Types.Quaternion iQ; + LSL_Types.Vector3 iV; + switch (rule) + { + case (int)ScriptBaseClass.WL_AMBIENT: + idx++; + iQ = rules.GetQuaternionItem(idx); + wl.ambient = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); + break; + case (int)ScriptBaseClass.WL_BIG_WAVE_DIRECTION: + idx++; + iV = rules.GetVector3Item(idx); + wl.bigWaveDirection = new Vector2((float)iV.x, (float)iV.y); + break; + case (int)ScriptBaseClass.WL_BLUE_DENSITY: + idx++; + iQ = rules.GetQuaternionItem(idx); + wl.blueDensity = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); + break; + case (int)ScriptBaseClass.WL_BLUR_MULTIPLIER: + idx++; + wl.blurMultiplier = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_CLOUD_COLOR: + idx++; + iQ = rules.GetQuaternionItem(idx); + wl.cloudColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); + break; + case (int)ScriptBaseClass.WL_CLOUD_COVERAGE: + idx++; + wl.cloudCoverage = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_CLOUD_DETAIL_XY_DENSITY: + idx++; + iV = rules.GetVector3Item(idx); + wl.cloudDetailXYDensity = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); + break; + case (int)ScriptBaseClass.WL_CLOUD_SCALE: + idx++; + wl.cloudScale = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X: + idx++; + wl.cloudScrollX = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X_LOCK: + idx++; + wl.cloudScrollXLock = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; + break; + case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y: + idx++; + wl.cloudScrollY = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y_LOCK: + idx++; + wl.cloudScrollYLock = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; + break; + case (int)ScriptBaseClass.WL_CLOUD_XY_DENSITY: + idx++; + iV = rules.GetVector3Item(idx); + wl.cloudDetailXYDensity = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); + break; + case (int)ScriptBaseClass.WL_DENSITY_MULTIPLIER: + idx++; + wl.densityMultiplier = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_DISTANCE_MULTIPLIER: + idx++; + wl.distanceMultiplier = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_DRAW_CLASSIC_CLOUDS: + idx++; + wl.drawClassicClouds = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; + break; + case (int)ScriptBaseClass.WL_EAST_ANGLE: + idx++; + wl.eastAngle = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_FRESNEL_OFFSET: + idx++; + wl.fresnelOffset = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_FRESNEL_SCALE: + idx++; + wl.fresnelScale = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_HAZE_DENSITY: + idx++; + wl.hazeDensity = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_HAZE_HORIZON: + idx++; + wl.hazeHorizon = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_HORIZON: + idx++; + iQ = rules.GetQuaternionItem(idx); + wl.horizon = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); + break; + case (int)ScriptBaseClass.WL_LITTLE_WAVE_DIRECTION: + idx++; + iV = rules.GetVector3Item(idx); + wl.littleWaveDirection = new Vector2((float)iV.x, (float)iV.y); + break; + case (int)ScriptBaseClass.WL_MAX_ALTITUDE: + idx++; + wl.maxAltitude = (ushort)rules.GetLSLIntegerItem(idx).value; + break; + case (int)ScriptBaseClass.WL_NORMAL_MAP_TEXTURE: + idx++; + wl.normalMapTexture = new UUID(rules.GetLSLStringItem(idx).m_string); + break; + case (int)ScriptBaseClass.WL_REFLECTION_WAVELET_SCALE: + idx++; + iV = rules.GetVector3Item(idx); + wl.reflectionWaveletScale = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); + break; + case (int)ScriptBaseClass.WL_REFRACT_SCALE_ABOVE: + idx++; + wl.refractScaleAbove = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_REFRACT_SCALE_BELOW: + idx++; + wl.refractScaleBelow = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_SCENE_GAMMA: + idx++; + wl.sceneGamma = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_STAR_BRIGHTNESS: + idx++; + wl.starBrightness = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_SUN_GLOW_FOCUS: + idx++; + wl.sunGlowFocus = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_SUN_GLOW_SIZE: + idx++; + wl.sunGlowSize = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_SUN_MOON_COLOR: + idx++; + iQ = rules.GetQuaternionItem(idx); + wl.sunMoonColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); + break; + case (int)ScriptBaseClass.WL_UNDERWATER_FOG_MODIFIER: + idx++; + wl.underwaterFogModifier = (float)rules.GetLSLFloatItem(idx); + break; + case (int)ScriptBaseClass.WL_WATER_COLOR: + idx++; + iV = rules.GetVector3Item(idx); + wl.waterColor = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); + break; + case (int)ScriptBaseClass.WL_WATER_FOG_DENSITY_EXPONENT: + idx++; + wl.waterFogDensityExponent = (float)rules.GetLSLFloatItem(idx); + break; + default: + success = 0; + break; + } + idx++; + } + m_host.ParentGroup.Scene.StoreWindlightProfile(wl); + + } + return success; + } + + } +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 33c67d57d5..836f2763d6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -42,7 +42,6 @@ using OpenSim.Region.CoreModules.Avatar.NPC; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Hypergrid; -using OpenSim.Region.CoreModules.World.Meta7Windlight; using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; using OpenSim.Region.ScriptEngine.Shared.ScriptBase; @@ -1974,338 +1973,5 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } return ret; } - - /// - /// Get the current Windlight scene - /// - /// List of windlight parameters - public LSL_List osGetWindlightScene(LSL_List rules) - { - CheckThreatLevel(ThreatLevel.Low, "osGetWindlightScene"); - m_host.AddScriptLPS(1); - RegionMeta7WindlightData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; - - LSL_List values = new LSL_List(); - int idx = 0; - while (idx < rules.Length) - { - uint rule = (uint)rules.GetLSLIntegerItem(idx); - LSL_List toadd = new LSL_List(); - - switch (rule) - { - case (int)ScriptBaseClass.WL_AMBIENT: - toadd.Add(new LSL_Rotation(wl.ambient.X, wl.ambient.Y, wl.ambient.Z, wl.ambient.W)); - break; - case (int)ScriptBaseClass.WL_BIG_WAVE_DIRECTION: - toadd.Add(new LSL_Vector(wl.bigWaveDirection.X, wl.bigWaveDirection.Y, 0.0f)); - break; - case (int)ScriptBaseClass.WL_BLUE_DENSITY: - toadd.Add(new LSL_Rotation(wl.blueDensity.X, wl.blueDensity.Y, wl.blueDensity.Z, wl.blueDensity.W)); - break; - case (int)ScriptBaseClass.WL_BLUR_MULTIPLIER: - toadd.Add(new LSL_Float(wl.blurMultiplier)); - break; - case (int)ScriptBaseClass.WL_CLOUD_COLOR: - toadd.Add(new LSL_Rotation(wl.cloudColor.X, wl.cloudColor.Y, wl.cloudColor.Z, wl.cloudColor.W)); - break; - case (int)ScriptBaseClass.WL_CLOUD_COVERAGE: - toadd.Add(new LSL_Float(wl.cloudCoverage)); - break; - case (int)ScriptBaseClass.WL_CLOUD_DETAIL_XY_DENSITY: - toadd.Add(new LSL_Vector(wl.cloudDetailXYDensity.X, wl.cloudDetailXYDensity.Y, wl.cloudDetailXYDensity.Z)); - break; - case (int)ScriptBaseClass.WL_CLOUD_SCALE: - toadd.Add(new LSL_Float(wl.cloudScale)); - break; - case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X: - toadd.Add(new LSL_Float(wl.cloudScrollX)); - break; - case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X_LOCK: - toadd.Add(new LSL_Integer(wl.cloudScrollXLock ? 1 : 0)); - break; - case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y: - toadd.Add(new LSL_Float(wl.cloudScrollY)); - break; - case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y_LOCK: - toadd.Add(new LSL_Integer(wl.cloudScrollYLock ? 1 : 0)); - break; - case (int)ScriptBaseClass.WL_CLOUD_XY_DENSITY: - toadd.Add(new LSL_Vector(wl.cloudXYDensity.X, wl.cloudXYDensity.Y, wl.cloudXYDensity.Z)); - break; - case (int)ScriptBaseClass.WL_DENSITY_MULTIPLIER: - toadd.Add(new LSL_Float(wl.densityMultiplier)); - break; - case (int)ScriptBaseClass.WL_DISTANCE_MULTIPLIER: - toadd.Add(new LSL_Float(wl.distanceMultiplier)); - break; - case (int)ScriptBaseClass.WL_DRAW_CLASSIC_CLOUDS: - toadd.Add(new LSL_Integer(wl.drawClassicClouds ? 1 : 0)); - break; - case (int)ScriptBaseClass.WL_EAST_ANGLE: - toadd.Add(new LSL_Float(wl.eastAngle)); - break; - case (int)ScriptBaseClass.WL_FRESNEL_OFFSET: - toadd.Add(new LSL_Float(wl.fresnelOffset)); - break; - case (int)ScriptBaseClass.WL_FRESNEL_SCALE: - toadd.Add(new LSL_Float(wl.fresnelScale)); - break; - case (int)ScriptBaseClass.WL_HAZE_DENSITY: - toadd.Add(new LSL_Float(wl.hazeDensity)); - break; - case (int)ScriptBaseClass.WL_HAZE_HORIZON: - toadd.Add(new LSL_Float(wl.hazeHorizon)); - break; - case (int)ScriptBaseClass.WL_HORIZON: - toadd.Add(new LSL_Rotation(wl.horizon.X, wl.horizon.Y, wl.horizon.Z, wl.horizon.W)); - break; - case (int)ScriptBaseClass.WL_LITTLE_WAVE_DIRECTION: - toadd.Add(new LSL_Vector(wl.littleWaveDirection.X, wl.littleWaveDirection.Y, 0.0f)); - break; - case (int)ScriptBaseClass.WL_MAX_ALTITUDE: - toadd.Add(new LSL_Integer(wl.maxAltitude)); - break; - case (int)ScriptBaseClass.WL_NORMAL_MAP_TEXTURE: - toadd.Add(new LSL_Key(wl.normalMapTexture.ToString())); - break; - case (int)ScriptBaseClass.WL_REFLECTION_WAVELET_SCALE: - toadd.Add(new LSL_Vector(wl.reflectionWaveletScale.X, wl.reflectionWaveletScale.Y, wl.reflectionWaveletScale.Z)); - break; - case (int)ScriptBaseClass.WL_REFRACT_SCALE_ABOVE: - toadd.Add(new LSL_Float(wl.refractScaleAbove)); - break; - case (int)ScriptBaseClass.WL_REFRACT_SCALE_BELOW: - toadd.Add(new LSL_Float(wl.refractScaleBelow)); - break; - case (int)ScriptBaseClass.WL_SCENE_GAMMA: - toadd.Add(new LSL_Float(wl.sceneGamma)); - break; - case (int)ScriptBaseClass.WL_STAR_BRIGHTNESS: - toadd.Add(new LSL_Float(wl.starBrightness)); - break; - case (int)ScriptBaseClass.WL_SUN_GLOW_FOCUS: - toadd.Add(new LSL_Float(wl.sunGlowFocus)); - break; - case (int)ScriptBaseClass.WL_SUN_GLOW_SIZE: - toadd.Add(new LSL_Float(wl.sunGlowSize)); - break; - case (int)ScriptBaseClass.WL_SUN_MOON_COLOR: - toadd.Add(new LSL_Rotation(wl.sunMoonColor.X, wl.sunMoonColor.Y, wl.sunMoonColor.Z, wl.sunMoonColor.W)); - break; - case (int)ScriptBaseClass.WL_UNDERWATER_FOG_MODIFIER: - toadd.Add(new LSL_Float(wl.underwaterFogModifier)); - break; - case (int)ScriptBaseClass.WL_WATER_COLOR: - toadd.Add(new LSL_Vector(wl.waterColor.X, wl.waterColor.Y, wl.waterColor.Z)); - break; - case (int)ScriptBaseClass.WL_WATER_FOG_DENSITY_EXPONENT: - toadd.Add(new LSL_Float(wl.waterFogDensityExponent)); - break; - } - - if (toadd.Length > 0) - { - values.Add(rule); - values.Add(toadd.Data[0]); - } - idx++; - } - - - return values; - - } - - /// - /// Set the current Windlight scene - /// - /// - /// success: true or false - public int osSetWindlightScene(LSL_List rules) - { - CheckThreatLevel(ThreatLevel.High, "osSetWindlightScene"); - int success = 0; - m_host.AddScriptLPS(1); - if (Meta7WindlightModule.EnableWindlight) - { - RegionMeta7WindlightData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; - - LSL_List values = new LSL_List(); - int idx = 0; - success = 1; - while (idx < rules.Length) - { - uint rule = (uint)rules.GetLSLIntegerItem(idx); - LSL_Types.Quaternion iQ; - LSL_Types.Vector3 iV; - switch (rule) - { - case (int)ScriptBaseClass.WL_AMBIENT: - idx++; - iQ = rules.GetQuaternionItem(idx); - wl.ambient = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); - break; - case (int)ScriptBaseClass.WL_BIG_WAVE_DIRECTION: - idx++; - iV = rules.GetVector3Item(idx); - wl.bigWaveDirection = new Vector2((float)iV.x, (float)iV.y); - break; - case (int)ScriptBaseClass.WL_BLUE_DENSITY: - idx++; - iQ = rules.GetQuaternionItem(idx); - wl.blueDensity = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); - break; - case (int)ScriptBaseClass.WL_BLUR_MULTIPLIER: - idx++; - wl.blurMultiplier = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_CLOUD_COLOR: - idx++; - iQ = rules.GetQuaternionItem(idx); - wl.cloudColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); - break; - case (int)ScriptBaseClass.WL_CLOUD_COVERAGE: - idx++; - wl.cloudCoverage = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_CLOUD_DETAIL_XY_DENSITY: - idx++; - iV = rules.GetVector3Item(idx); - wl.cloudDetailXYDensity = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); - break; - case (int)ScriptBaseClass.WL_CLOUD_SCALE: - idx++; - wl.cloudScale = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X: - idx++; - wl.cloudScrollX = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X_LOCK: - idx++; - wl.cloudScrollXLock = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; - break; - case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y: - idx++; - wl.cloudScrollY = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y_LOCK: - idx++; - wl.cloudScrollYLock = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; - break; - case (int)ScriptBaseClass.WL_CLOUD_XY_DENSITY: - idx++; - iV = rules.GetVector3Item(idx); - wl.cloudDetailXYDensity = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); - break; - case (int)ScriptBaseClass.WL_DENSITY_MULTIPLIER: - idx++; - wl.densityMultiplier = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_DISTANCE_MULTIPLIER: - idx++; - wl.distanceMultiplier = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_DRAW_CLASSIC_CLOUDS: - idx++; - wl.drawClassicClouds = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; - break; - case (int)ScriptBaseClass.WL_EAST_ANGLE: - idx++; - wl.eastAngle = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_FRESNEL_OFFSET: - idx++; - wl.fresnelOffset = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_FRESNEL_SCALE: - idx++; - wl.fresnelScale = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_HAZE_DENSITY: - idx++; - wl.hazeDensity = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_HAZE_HORIZON: - idx++; - wl.hazeHorizon= (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_HORIZON: - idx++; - iQ = rules.GetQuaternionItem(idx); - wl.horizon = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); - break; - case (int)ScriptBaseClass.WL_LITTLE_WAVE_DIRECTION: - idx++; - iV = rules.GetVector3Item(idx); - wl.littleWaveDirection = new Vector2((float)iV.x, (float)iV.y); - break; - case (int)ScriptBaseClass.WL_MAX_ALTITUDE: - idx++; - wl.maxAltitude = (ushort)rules.GetLSLIntegerItem(idx).value; - break; - case (int)ScriptBaseClass.WL_NORMAL_MAP_TEXTURE: - idx++; - wl.normalMapTexture = new UUID(rules.GetLSLStringItem(idx).m_string); - break; - case (int)ScriptBaseClass.WL_REFLECTION_WAVELET_SCALE: - idx++; - iV = rules.GetVector3Item(idx); - wl.reflectionWaveletScale= new Vector3((float)iV.x, (float)iV.y, (float)iV.z); - break; - case (int)ScriptBaseClass.WL_REFRACT_SCALE_ABOVE: - idx++; - wl.refractScaleAbove = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_REFRACT_SCALE_BELOW: - idx++; - wl.refractScaleBelow = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_SCENE_GAMMA: - idx++; - wl.sceneGamma = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_STAR_BRIGHTNESS: - idx++; - wl.starBrightness= (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_SUN_GLOW_FOCUS: - idx++; - wl.sunGlowFocus= (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_SUN_GLOW_SIZE: - idx++; - wl.sunGlowSize= (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_SUN_MOON_COLOR: - idx++; - iQ = rules.GetQuaternionItem(idx); - wl.sunMoonColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); - break; - case (int)ScriptBaseClass.WL_UNDERWATER_FOG_MODIFIER: - idx++; - wl.underwaterFogModifier = (float)rules.GetLSLFloatItem(idx); - break; - case (int)ScriptBaseClass.WL_WATER_COLOR: - idx++; - iV = rules.GetVector3Item(idx); - wl.waterColor = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); - break; - case (int)ScriptBaseClass.WL_WATER_FOG_DENSITY_EXPONENT: - idx++; - wl.waterFogDensityExponent = (float)rules.GetLSLFloatItem(idx); - break; - default: - success = 0; - break; - } - idx++; - } - m_host.ParentGroup.Scene.StoreWindlightProfile(wl); - - } - return success; - } } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs new file mode 100644 index 0000000000..9dd0b735bb --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs @@ -0,0 +1,20 @@ +using System.Collections; +using OpenSim.Region.ScriptEngine.Interfaces; + +using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; +using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; +using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; +using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; +using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; +using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; +using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; + +namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces +{ + public interface ICM_Api + { + // Windlight Functions + LSL_List cmGetWindlightScene(LSL_List rules); + int cmSetWindlightScene(LSL_List rules); + } +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index dd2869baf8..c3bf7d2b50 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -163,10 +163,5 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces key osGetMapTexture(); key osGetRegionMapTexture(string regionName); LSL_List osGetRegionStats(); - - // Windlight Functions - LSL_List osGetWindlightScene(LSL_List rules); - int osSetWindlightScene(LSL_List rules); - } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs new file mode 100644 index 0000000000..7b67fa3aed --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs @@ -0,0 +1,76 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; +using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; +using LSLInteger = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; + +namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase +{ + public partial class ScriptBaseClass + { + // Constants for cmWindlight* + public const int WL_WATER_COLOR = 0; + public const int WL_WATER_FOG_DENSITY_EXPONENT = 1; + public const int WL_UNDERWATER_FOG_MODIFIER = 2; + public const int WL_REFLECTION_WAVELET_SCALE = 3; + public const int WL_FRESNEL_SCALE = 4; + public const int WL_FRESNEL_OFFSET = 5; + public const int WL_REFRACT_SCALE_ABOVE = 6; + public const int WL_REFRACT_SCALE_BELOW = 7; + public const int WL_BLUR_MULTIPLIER = 8; + public const int WL_BIG_WAVE_DIRECTION = 9; + public const int WL_LITTLE_WAVE_DIRECTION = 10; + public const int WL_NORMAL_MAP_TEXTURE = 11; + public const int WL_HORIZON = 12; + public const int WL_HAZE_HORIZON = 13; + public const int WL_BLUE_DENSITY = 14; + public const int WL_HAZE_DENSITY = 15; + public const int WL_DENSITY_MULTIPLIER = 16; + public const int WL_DISTANCE_MULTIPLIER = 17; + public const int WL_MAX_ALTITUDE = 18; + public const int WL_SUN_MOON_COLOR = 19; + public const int WL_AMBIENT = 20; + public const int WL_EAST_ANGLE = 21; + public const int WL_SUN_GLOW_FOCUS = 22; + public const int WL_SUN_GLOW_SIZE = 23; + public const int WL_SCENE_GAMMA = 24; + public const int WL_STAR_BRIGHTNESS = 25; + public const int WL_CLOUD_COLOR = 26; + public const int WL_CLOUD_XY_DENSITY = 27; + public const int WL_CLOUD_COVERAGE = 28; + public const int WL_CLOUD_SCALE = 29; + public const int WL_CLOUD_DETAIL_XY_DENSITY = 30; + public const int WL_CLOUD_SCROLL_X = 31; + public const int WL_CLOUD_SCROLL_Y = 32; + public const int WL_CLOUD_SCROLL_Y_LOCK = 33; + public const int WL_CLOUD_SCROLL_X_LOCK = 34; + public const int WL_DRAW_CLASSIC_CLOUDS = 35; + + } +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs new file mode 100644 index 0000000000..e85d41e669 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs @@ -0,0 +1,71 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Runtime.Remoting.Lifetime; +using System.Threading; +using System.Reflection; +using System.Collections; +using System.Collections.Generic; +using OpenSim.Framework; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.ScriptEngine.Interfaces; +using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; +using integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; +using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; +using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; +using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; +using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; +using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; +using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; +using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; + +namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase +{ + public partial class ScriptBaseClass : MarshalByRefObject + { + public ICM_Api m_CM_Functions; + + public void ApiTypeCM(IScriptApi api) + { + if (!(api is ICM_Api)) + return; + + m_CM_Functions = (ICM_Api)api; + } + + public LSL_List cmGetWindlightScene(LSL_List rules) + { + return m_CM_Functions.cmGetWindlightScene(rules); + } + + public int cmSetWindlightScene(LSL_List rules) + { + return m_CM_Functions.cmSetWindlightScene(rules); + } + } +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 4956c28640..acff8fb545 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -539,43 +539,5 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int STATS_ACTIVE_SCRIPTS = 19; public const int STATS_SCRIPT_LPS = 20; - // Constants for osWindlight* - public const int WL_WATER_COLOR = 0; - public const int WL_WATER_FOG_DENSITY_EXPONENT = 1; - public const int WL_UNDERWATER_FOG_MODIFIER = 2; - public const int WL_REFLECTION_WAVELET_SCALE = 3; - public const int WL_FRESNEL_SCALE = 4; - public const int WL_FRESNEL_OFFSET = 5; - public const int WL_REFRACT_SCALE_ABOVE = 6; - public const int WL_REFRACT_SCALE_BELOW = 7; - public const int WL_BLUR_MULTIPLIER = 8; - public const int WL_BIG_WAVE_DIRECTION = 9; - public const int WL_LITTLE_WAVE_DIRECTION = 10; - public const int WL_NORMAL_MAP_TEXTURE = 11; - public const int WL_HORIZON = 12; - public const int WL_HAZE_HORIZON = 13; - public const int WL_BLUE_DENSITY = 14; - public const int WL_HAZE_DENSITY = 15; - public const int WL_DENSITY_MULTIPLIER = 16; - public const int WL_DISTANCE_MULTIPLIER = 17; - public const int WL_MAX_ALTITUDE = 18; - public const int WL_SUN_MOON_COLOR = 19; - public const int WL_AMBIENT = 20; - public const int WL_EAST_ANGLE = 21; - public const int WL_SUN_GLOW_FOCUS = 22; - public const int WL_SUN_GLOW_SIZE = 23; - public const int WL_SCENE_GAMMA = 24; - public const int WL_STAR_BRIGHTNESS = 25; - public const int WL_CLOUD_COLOR = 26; - public const int WL_CLOUD_XY_DENSITY = 27; - public const int WL_CLOUD_COVERAGE = 28; - public const int WL_CLOUD_SCALE = 29; - public const int WL_CLOUD_DETAIL_XY_DENSITY = 30; - public const int WL_CLOUD_SCROLL_X = 31; - public const int WL_CLOUD_SCROLL_Y = 32; - public const int WL_CLOUD_SCROLL_Y_LOCK = 33; - public const int WL_CLOUD_SCROLL_X_LOCK = 34; - public const int WL_DRAW_CLASSIC_CLOUDS = 35; - } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 1480b8b740..519463e097 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -637,15 +637,5 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase { return m_OSSL_Functions.osGetRegionStats(); } - - public LSL_List osGetWindlightScene(LSL_List rules) - { - return m_OSSL_Functions.osGetWindlightScene(rules); - } - - public int osSetWindlightScene(LSL_List rules) - { - return m_OSSL_Functions.osSetWindlightScene(rules); - } } } diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index b7f7c3ca85..04cf8e828e 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -980,6 +980,9 @@ ; Allow the use of os* functions (some are dangerous) AllowOSFunctions = false + + ; Allow the user of Careminster functions + AllowCareminsterFunctions = false ; Threat level to allow, one of None, VeryLow, Low, Moderate, High, VeryHigh, Severe OSFunctionThreatLevel = VeryLow