From 7479638e88cc4e097ffca1cef577b52ea1631335 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 25 Oct 2018 02:06:44 +0100 Subject: [PATCH] remove a unnecessary scripts constants file --- .../Shared/Api/Implementation/CM_Api.cs | 2 +- .../Shared/Api/Interface/ICM_Api.cs | 4 +- .../Shared/Api/Interface/ILS_Api.cs | 2 +- .../Shared/Api/Interface/IOSSL_Api.cs | 1 + .../Shared/Api/Runtime/CM_Constants.cs | 77 ---------------- .../Shared/Api/Runtime/CM_Stub.cs | 2 +- .../Shared/Api/Runtime/LSL_Constants.cs | 91 ++++++++++++++----- 7 files changed, 75 insertions(+), 104 deletions(-) delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs index 350996835c..001caa6cef 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs @@ -91,7 +91,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api get { return m_ScriptEngine.World; } } - public string cmDetectedCountry(int number) + public LSL_Key cmDetectedCountry(int number) { m_host.AddScriptLPS(1); if(!m_CMFunctionsEnabled) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs index ab215f304f..a406c9921f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs @@ -40,7 +40,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces { public interface ICM_Api { - string cmDetectedCountry(int num); - string cmGetAgentCountry(key key); + key cmDetectedCountry(int detectedNumber); + string cmGetAgentCountry(key agentId); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILS_Api.cs index f2df094abf..9eee712ad1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILS_Api.cs @@ -43,7 +43,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces // Windlight Functions LSL_List lsGetWindlightScene(LSL_List rules); int lsSetWindlightScene(LSL_List rules); - int lsSetWindlightSceneTargeted(LSL_List rules, key target); + int lsSetWindlightSceneTargeted(LSL_List rules, key targetId); void lsClearWindlightScene(); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index f4a37efcea..9ef356d547 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -133,6 +133,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Float osTerrainGetHeight(int x, int y); // Deprecated LSL_Integer osSetTerrainHeight(int x, int y, double val); LSL_Integer osTerrainSetHeight(int x, int y, double val); //Deprecated + //ApiDesc Send terrain to all agents void osTerrainFlush(); int osRegionRestart(double seconds); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs deleted file mode 100644 index f94ef4a679..0000000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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; - public const int WL_SUN_MOON_POSITION = 36; - - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs index 4132dfa312..361cbcb1bd 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs @@ -58,7 +58,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_CM_Functions = (ICM_Api)api; } - public string cmDetectedCountry(int num) + public key cmDetectedCountry(int num) { return m_CM_Functions.cmDetectedCountry(num); } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 30c6e79d9a..11dfe0c3e2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -35,9 +35,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase { public partial class ScriptBaseClass { - // LSL CONSTANTS - public static readonly LSLInteger TRUE = new LSLInteger(1); - public static readonly LSLInteger FALSE = new LSLInteger(0); + // SCRIPTS CONSTANTS + public static readonly LSLInteger TRUE = 1; + public static readonly LSLInteger FALSE = 0; public const int STATUS_PHYSICS = 1; public const int STATUS_ROTATE_X = 2; @@ -55,6 +55,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int AGENT_BY_LEGACY_NAME = 1; public const int AGENT_BY_USERNAME = 0x10; public const int NPC = 0x20; + //ApiDesc Objects running a script or physically moving public const int ACTIVE = 2; public const int PASSIVE = 4; public const int SCRIPTED = 8; @@ -85,10 +86,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PERMISSION_TELEPORT = 4096; public const int PERMISSION_OVERRIDE_ANIMATIONS = 0x8000; - public const int AGENT_FLYING = 1; - public const int AGENT_ATTACHMENTS = 2; - public const int AGENT_SCRIPTED = 4; - public const int AGENT_MOUSELOOK = 8; + public const int AGENT_FLYING = 0x1; + //ApiDesc The agent has attachments + public const int AGENT_ATTACHMENTS = 0x2; + //ApiDesc The agent has scripted attachments + public const int AGENT_SCRIPTED = 0x4; + public const int AGENT_MOUSELOOK = 0x8; public const int AGENT_SITTING = 0x10; public const int AGENT_ON_OBJECT = 0x20; public const int AGENT_AWAY = 0x40; @@ -509,6 +512,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PRIM_SCULPT_TYPE_CYLINDER = 4; public const int PRIM_SCULPT_FLAG_INVERT = 0x40; public const int PRIM_SCULPT_FLAG_MIRROR = 0x80; + //ApiDesc Auxiliar to clear flags keeping scultp type public const int PRIM_SCULPT_TYPE_MASK = 0x07; // auxiliar mask public const int PRIM_PHYSICS_SHAPE_PRIM = 0; @@ -579,8 +583,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int ESTATE_ACCESS_BANNED_AGENT_ADD = 4; public const int ESTATE_ACCESS_BANNED_AGENT_REMOVE = 5; - public static readonly LSLInteger PAY_HIDE = new LSLInteger(-1); - public static readonly LSLInteger PAY_DEFAULT = new LSLInteger(-2); + public static readonly LSLInteger PAY_HIDE = -1; + public static readonly LSLInteger PAY_DEFAULT = -2; public const string NULL_KEY = "00000000-0000-0000-0000-000000000000"; public const string EOF = "\n\n\n"; @@ -760,14 +764,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int GRAVITY_MULTIPLIER = 8; // extra constants for llSetPrimMediaParams - public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0); - public static readonly LSLInteger LSL_STATUS_MALFORMED_PARAMS = new LSLInteger(1000); - public static readonly LSLInteger LSL_STATUS_TYPE_MISMATCH = new LSLInteger(1001); - public static readonly LSLInteger LSL_STATUS_BOUNDS_ERROR = new LSLInteger(1002); - public static readonly LSLInteger LSL_STATUS_NOT_FOUND = new LSLInteger(1003); - public static readonly LSLInteger LSL_STATUS_NOT_SUPPORTED = new LSLInteger(1004); - public static readonly LSLInteger LSL_STATUS_INTERNAL_ERROR = new LSLInteger(1999); - public static readonly LSLInteger LSL_STATUS_WHITELIST_FAILED = new LSLInteger(2001); + public static readonly LSLInteger LSL_STATUS_OK = 0; + public static readonly LSLInteger LSL_STATUS_MALFORMED_PARAMS = 1000; + public static readonly LSLInteger LSL_STATUS_TYPE_MISMATCH = 1001; + public static readonly LSLInteger LSL_STATUS_BOUNDS_ERROR = 1002; + public static readonly LSLInteger LSL_STATUS_NOT_FOUND = 1003; + public static readonly LSLInteger LSL_STATUS_NOT_SUPPORTED = 1004; + public static readonly LSLInteger LSL_STATUS_INTERNAL_ERROR = 1999; + public static readonly LSLInteger LSL_STATUS_WHITELIST_FAILED = 2001; // Constants for default textures public const string TEXTURE_BLANK = "5748decc-f629-461c-9a36-a35a221fe21f"; @@ -867,11 +871,54 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase /// public const int OS_LISTEN_REGEX_MESSAGE = 0x2; - // for osTeleportObject - public const int OSTPOBJ_NONE = 0x0; - public const int OSTPOBJ_STOPATTARGET = 0x1; // stops at destination - public const int OSTPOBJ_STOPONFAIL = 0x2; // stops at jump point if tp fails - public const int OSTPOBJ_SETROT = 0x4; // the rotation is the final rotation, otherwise is a added rotation + // Constants for osTeleportObject + //ApiDesc osTeleportObject no flags + public const int OSTPOBJ_NONE = 0x0; + //ApiDesc osTeleportObject flag stop at destination + public const int OSTPOBJ_STOPATTARGET = 0x1; + //ApiDesc osTeleportObject flag stop at jump point if tp fails + public const int OSTPOBJ_STOPONFAIL = 0x2; + //ApiDesc osTeleportObject flag the rotation is the final rotation, otherwise is a added rotation + public const int OSTPOBJ_SETROT = 0x4; + + // Constants for Windlight + 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; + public const int WL_SUN_MOON_POSITION = 36; } }