From 9185d397df9526ed6218fccddb68a5331927e2a9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 10 Nov 2018 21:00:04 +0000 Subject: [PATCH] add a bit more things to ScriptSyntax, change a few more incoerent lsl types in function arguments --- .../Shared/Api/Implementation/LSL_Api.cs | 12 ++--- .../Shared/Api/Interface/ILSL_Api.cs | 20 +++++--- .../Shared/Api/Runtime/LSL_Constants.cs | 23 +++++++-- .../Shared/Api/Runtime/LSL_Stub.cs | 6 +-- bin/ScriptSyntax.xml | 47 ++++++++++++++----- 5 files changed, 75 insertions(+), 33 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 2bfd9b4683..a72d4e9913 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -151,7 +151,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api protected int m_sleepMsOnSetDamage = 5000; protected int m_sleepMsOnTextBox = 1000; protected int m_sleepMsOnAdjustSoundVolume = 100; - protected int m_sleepMsOnEjectFromLand = 5000; + protected int m_sleepMsOnEjectFromLand = 1000; protected int m_sleepMsOnAddToLandPassList = 100; protected int m_sleepMsOnDialog = 1000; protected int m_sleepMsOnRemoteLoadScript = 3000; @@ -4454,7 +4454,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - public void llCreateLink(string target, int parent) + public void llCreateLink(LSL_String target, LSL_Integer parent) { m_host.AddScriptLPS(1); @@ -6923,7 +6923,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - public void llEjectFromLand(string pest) + public void llEjectFromLand(LSL_Key pest) { m_host.AddScriptLPS(1); UUID agentID = new UUID(); @@ -7955,7 +7955,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } - public void llAddToLandPassList(string avatar, double hours) + public void llAddToLandPassList(LSL_Key avatar, double hours) { m_host.AddScriptLPS(1); UUID key; @@ -8087,7 +8087,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - public void llDialog(string avatar, string message, LSL_List buttons, int chat_channel) + public void llDialog(LSL_Key avatar, LSL_String message, LSL_List buttons, int chat_channel) { IDialogModule dm = World.RequestModuleInterface(); @@ -13534,7 +13534,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ScriptSleep(m_sleepMsOnMapDestination); } - public void llAddToLandBanList(string avatar, double hours) + public void llAddToLandBanList(LSL_Key avatar, double hours) { m_host.AddScriptLPS(1); UUID key; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 5e58067979..4cb63b1c97 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs @@ -41,10 +41,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces { void state(string newState); - LSL_Integer llAbs(int i); + LSL_Integer llAbs(int val); LSL_Float llAcos(double val); - void llAddToLandBanList(string avatar, double hours); - void llAddToLandPassList(string avatar, double hours); + //ApiDesc Sleep 0.1 + void llAddToLandBanList(LSL_Key avatarId, double hours); + //ApiDesc Sleep 0.1 + void llAddToLandPassList(LSL_Key avatarId, double hours); + //ApiDesc Sleep 0.1 void llAdjustSoundVolume(double volume); void llAllowInventoryDrop(int add); LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b); @@ -66,14 +69,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Integer llCeil(double f); void llClearCameraParams(); LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face); + //ApiDesc Sleep 0.1 LSL_Integer llClearPrimMedia(LSL_Integer face); + //ApiDesc Sleep 1.0 void llCloseRemoteDataChannel(string channel); LSL_Float llCloud(LSL_Vector offset); void llCollisionFilter(string name, string id, int accept); void llCollisionSound(string impact_sound, double impact_volume); + //ApiDesc Not Supported - does nothing void llCollisionSprite(string impact_sprite); LSL_Float llCos(double f); - void llCreateLink(string target, int parent); + //ApiDesc Sleep 1.0 + void llCreateLink(LSL_String targetId, LSL_Integer parent); LSL_List llCSV2List(string src); LSL_List llDeleteSubList(LSL_List src, int start, int end); LSL_String llDeleteSubString(string src, int start, int end); @@ -94,11 +101,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Vector llDetectedTouchST(int index); LSL_Vector llDetectedTouchUV(int index); LSL_Vector llDetectedVel(int number); - void llDialog(string avatar, string message, LSL_List buttons, int chat_channel); + void llDialog(LSL_Key avatarId, LSL_String message, LSL_List buttons, int chat_channel); void llDie(); LSL_String llDumpList2String(LSL_List src, string seperator); LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir); - void llEjectFromLand(string pest); + //ApiDesc Sleep 1.0 + void llEjectFromLand(LSL_Key avatarId); void llEmail(string address, string subject, string message); LSL_String llEscapeURL(string url); LSL_Rotation llEuler2Rot(LSL_Vector v); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 11dfe0c3e2..169a0f26a8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -377,7 +377,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int CHANGED_REGION_RESTART = 1024; public const int CHANGED_REGION_START = 1024; //LL Changed the constant from CHANGED_REGION_RESTART public const int CHANGED_MEDIA = 2048; + //ApiDesc opensim specific public const int CHANGED_ANIMATION = 16384; + //ApiDesc opensim specific public const int CHANGED_POSITION = 32768; public const int TYPE_INVALID = 0; @@ -430,6 +432,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PRIM_FLEXIBLE = 21; public const int PRIM_TEXGEN = 22; public const int PRIM_POINT_LIGHT = 23; // Huh? + //ApiDesc not supported public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake public const int PRIM_GLOW = 25; public const int PRIM_TEXT = 26; @@ -445,7 +448,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PRIM_SPECULAR = 36; public const int PRIM_NORMAL = 37; public const int PRIM_ALPHA_MODE = 38; + //ApiDesc not supported public const int PRIM_ALLOW_UNSIT = 39; // experiences related. unsupported + //ApiDesc not supported public const int PRIM_SCRIPTED_SIT_ONLY = 40; // experiences related. unsupported public const int PRIM_SIT_TARGET = 41; @@ -659,20 +664,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int OBJECT_ATTACHED_SLOTS_AVAILABLE = 35; // Pathfinding types + //ApiDesc not supported public const int OPT_OTHER = -1; + //ApiDesc not supported public const int OPT_LEGACY_LINKSET = 0; + //ApiDesc not supported public const int OPT_AVATAR = 1; + //ApiDesc not supported public const int OPT_CHARACTER = 2; + //ApiDesc not supported public const int OPT_WALKABLE = 3; + //ApiDesc not supported public const int OPT_STATIC_OBSTACLE = 4; + //ApiDesc not supported public const int OPT_MATERIAL_VOLUME = 5; + //ApiDesc not supported public const int OPT_EXCLUSION_VOLUME = 6; // for llGetAgentList - public const int AGENT_LIST_PARCEL = 1; + public const int AGENT_LIST_PARCEL = 0x1; public const int AGENT_LIST_PARCEL_OWNER = 2; public const int AGENT_LIST_REGION = 4; - public const int AGENT_LIST_EXCLUDENPC = 0x4000000; // our flag, not SL and it is a bit mask + public const int AGENT_LIST_EXCLUDENPC = 0x4000000; // Can not be public const? public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); @@ -875,11 +888,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase //ApiDesc osTeleportObject no flags public const int OSTPOBJ_NONE = 0x0; - //ApiDesc osTeleportObject flag stop at destination + //ApiDesc osTeleportObject flag: stop at destination public const int OSTPOBJ_STOPATTARGET = 0x1; - //ApiDesc osTeleportObject flag stop at jump point if tp fails + //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 + //ApiDesc osTeleportObject flag: the rotation is the final rotation, otherwise is a added rotation public const int OSTPOBJ_SETROT = 0x4; // Constants for Windlight diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index ebdd017b59..09f77d1ad0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs @@ -210,7 +210,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llCos(f); } - public void llCreateLink(string target, int parent) + public void llCreateLink(LSL_String target, LSL_Integer parent) { m_LSL_Functions.llCreateLink(target, parent); } @@ -315,7 +315,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llDetectedVel(number); } - public void llDialog(string avatar, string message, LSL_List buttons, int chat_channel) + public void llDialog(LSL_Key avatar, LSL_String message, LSL_List buttons, int chat_channel) { m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel); } @@ -336,7 +336,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llEdgeOfWorld(pos, dir); } - public void llEjectFromLand(string pest) + public void llEjectFromLand(LSL_Key pest) { m_LSL_Functions.llEjectFromLand(pest); } diff --git a/bin/ScriptSyntax.xml b/bin/ScriptSyntax.xml index 78b1a39684..8e89834b83 100644 --- a/bin/ScriptSyntax.xml +++ b/bin/ScriptSyntax.xml @@ -1,4 +1,4 @@ -a6ccf55f-ded5-9093-571c-478cadca66de +21c53711-f48d-a201-a7f0-8cb35768e7e2 llsd-lsl-syntax-version2 controls @@ -67,7 +67,7 @@ a6ccf55f-ded5-9093-571c-478cadca66de rotation tooltip - The rotation as quaternion <x, y, z, s> + A rotation as quaternion <x, y, z, s> string @@ -77,7 +77,7 @@ a6ccf55f-ded5-9093-571c-478cadca66de vector tooltip - A vector <x, y, z, s> + A vector <x, y, z> events @@ -370,7 +370,7 @@ a6ccf55f-ded5-9093-571c-478cadca66de AGENT_LIST_PARCEL typeinteger - value1 + value0x1 AGENT_LIST_PARCEL_OWNER typeinteger @@ -744,6 +744,7 @@ a6ccf55f-ded5-9093-571c-478cadca66de CHANGED_ANIMATION typeinteger value16384 + tooltipopensim specific CHANGED_COLOR typeinteger @@ -768,6 +769,7 @@ a6ccf55f-ded5-9093-571c-478cadca66de CHANGED_POSITION typeinteger value32768 + tooltipopensim specific CHANGED_REGION typeinteger @@ -1472,34 +1474,42 @@ a6ccf55f-ded5-9093-571c-478cadca66de OPT_AVATAR typeinteger value1 + tooltipnot supported OPT_CHARACTER typeinteger value2 + tooltipnot supported OPT_EXCLUSION_VOLUME typeinteger value6 + tooltipnot supported OPT_LEGACY_LINKSET typeinteger value0 + tooltipnot supported OPT_MATERIAL_VOLUME typeinteger value5 + tooltipnot supported OPT_OTHER typeinteger value-1 + tooltipnot supported OPT_STATIC_OBSTACLE typeinteger value4 + tooltipnot supported OPT_WALKABLE typeinteger value3 + tooltipnot supported OS_ATTACH_MSG_ALL typeinteger @@ -1569,17 +1579,17 @@ a6ccf55f-ded5-9093-571c-478cadca66de OSTPOBJ_SETROT typeinteger value0x4 - tooltiposTeleportObject flag the rotation is the final rotation, otherwise is a added rotation + tooltiposTeleportObject flag: the rotation is the final rotation, otherwise is a added rotation OSTPOBJ_STOPATTARGET typeinteger value0x1 - tooltiposTeleportObject flag stop at destination + tooltiposTeleportObject flag: stop at destination OSTPOBJ_STOPONFAIL typeinteger value0x2 - tooltiposTeleportObject flag stop at jump point if tp fails + tooltiposTeleportObject flag: stop at jump point if tp fails PARCEL_COUNT_GROUP typeinteger @@ -1860,6 +1870,7 @@ a6ccf55f-ded5-9093-571c-478cadca66de PRIM_ALLOW_UNSIT typeinteger value39 + tooltipnot supported PRIM_ALPHA_MODE typeinteger @@ -1960,6 +1971,7 @@ a6ccf55f-ded5-9093-571c-478cadca66de PRIM_CAST_SHADOWS typeinteger value24 + tooltipnot supported PRIM_COLOR typeinteger @@ -2184,6 +2196,7 @@ a6ccf55f-ded5-9093-571c-478cadca66de PRIM_SCRIPTED_SIT_ONLY typeinteger value40 + tooltipnot supported PRIM_SCULPT_FLAG_INVERT typeinteger @@ -3235,7 +3248,7 @@ a6ccf55f-ded5-9093-571c-478cadca66de returninteger arguments - itypeinteger + valtypeinteger llAcos @@ -3248,22 +3261,25 @@ a6ccf55f-ded5-9093-571c-478cadca66de llAddToLandBanList arguments - avatartypestring + avatarIdtypekey hourstypefloat + tooltipSleep 0.1 llAddToLandPassList arguments - avatartypestring + avatarIdtypekey hourstypefloat + tooltipSleep 0.1 llAdjustSoundVolume arguments volumetypefloat + tooltipSleep 0.1 llAllowInventoryDrop @@ -3407,12 +3423,14 @@ a6ccf55f-ded5-9093-571c-478cadca66de arguments facetypeinteger + tooltipSleep 0.1 llCloseRemoteDataChannel arguments channeltypestring + tooltipSleep 1.0 llCloud @@ -3441,6 +3459,7 @@ a6ccf55f-ded5-9093-571c-478cadca66de arguments impact_spritetypestring + tooltipNot Supported - does nothing llCos @@ -3452,9 +3471,10 @@ a6ccf55f-ded5-9093-571c-478cadca66de llCreateLink arguments - targettypestring + targetIdtypestring parenttypeinteger + tooltipSleep 1.0 llCSV2List @@ -3600,7 +3620,7 @@ a6ccf55f-ded5-9093-571c-478cadca66de llDialog arguments - avatartypestring + avatarIdtypekey messagetypestring buttonstypelist chat_channeltypeinteger @@ -3629,8 +3649,9 @@ a6ccf55f-ded5-9093-571c-478cadca66de llEjectFromLand arguments - pesttypestring + avatarIdtypekey + tooltipSleep 1.0 llEmail