From befe1ad4be44de1c64f470f8c3530ce46723a9cd Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 5 Mar 2018 17:02:07 +0000 Subject: fix some LSL functions to return type Key as they should and not string --- .../Shared/Api/Implementation/LSL_Api.cs | 50 +++++++++++----------- .../ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | 14 +++--- .../ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | 14 +++--- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b9f8b28..0124e32 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1404,7 +1404,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return detectedParams.Name; } - public LSL_String llDetectedKey(int number) + public LSL_Key llDetectedKey(int number) { m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); @@ -1413,7 +1413,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return detectedParams.Key.ToString(); } - public LSL_String llDetectedOwner(int number) + public LSL_Key llDetectedOwner(int number) { m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); @@ -3878,7 +3878,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Deprecated("llReleaseCamera", "Use llClearCameraParams instead"); } - public LSL_String llGetOwner() + public LSL_Key llGetOwner() { m_host.AddScriptLPS(1); @@ -4010,7 +4010,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } - public LSL_String llGetKey() + public LSL_Key llGetKey() { m_host.AddScriptLPS(1); return m_host.UUID.ToString(); @@ -4336,7 +4336,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api new DetectParams[0])); } - public LSL_String llGetPermissionsKey() + public LSL_Key llGetPermissionsKey() { m_host.AddScriptLPS(1); @@ -4587,7 +4587,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api parentPrim.ScheduleGroupForFullUpdate(); } - public LSL_String llGetLinkKey(int linknum) + public LSL_Key llGetLinkKey(int linknum) { m_host.AddScriptLPS(1); SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); @@ -4849,7 +4849,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.PassTouches = false; } - public LSL_String llRequestAgentData(string id, int data) + public LSL_Key llRequestAgentData(string id, int data) { m_host.AddScriptLPS(1); @@ -4967,7 +4967,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return ""; } - public LSL_String llRequestInventoryData(string name) + public LSL_Key llRequestInventoryData(string name) { m_host.AddScriptLPS(1); @@ -5595,7 +5595,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return Math.Acos(2 * quotient - 1); } - public LSL_String llGetInventoryKey(string name) + public LSL_Key llGetInventoryKey(string name) { m_host.AddScriptLPS(1); @@ -5715,7 +5715,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return source.IndexOf(pattern); } - public LSL_String llGetOwnerKey(string id) + public LSL_Key llGetOwnerKey(string id) { m_host.AddScriptLPS(1); UUID key = new UUID(); @@ -6891,7 +6891,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return 0; } - public LSL_String llGetLandOwnerAt(LSL_Vector pos) + public LSL_Key llGetLandOwnerAt(LSL_Vector pos) { m_host.AddScriptLPS(1); ILandObject land = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); @@ -7841,14 +7841,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - public LSL_String llAvatarOnSitTarget() + public LSL_Key llAvatarOnSitTarget() { m_host.AddScriptLPS(1); return m_host.SitTargetAvatar.ToString(); } // http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget - public LSL_String llAvatarOnLinkSitTarget(int linknum) + public LSL_Key llAvatarOnLinkSitTarget(int linknum) { m_host.AddScriptLPS(1); if(linknum == ScriptBaseClass.LINK_SET || @@ -8153,7 +8153,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ScriptSleep(m_sleepMsOnOpenRemoteDataChannel); } - public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata) + public LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata) { m_host.AddScriptLPS(1); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); @@ -10598,7 +10598,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.Description = desc!=null?desc:String.Empty; } - public LSL_String llGetCreator() + public LSL_Key llGetCreator() { m_host.AddScriptLPS(1); return m_host.CreatorID.ToString(); @@ -12329,7 +12329,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - public LSL_String llGetInventoryCreator(string itemName) + public LSL_Key llGetInventoryCreator(string itemName) { m_host.AddScriptLPS(1); @@ -12355,7 +12355,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); } - public LSL_String llRequestSecureURL() + public LSL_Key llRequestSecureURL() { m_host.AddScriptLPS(1); if (m_UrlModule != null) @@ -12363,7 +12363,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return UUID.Zero.ToString(); } - public LSL_String llRequestSimulatorData(string simulator, int data) + public LSL_Key llRequestSimulatorData(string simulator, int data) { IOSSL_Api ossl = (IOSSL_Api)m_ScriptEngine.GetApi(m_item.ItemID, "OSSL"); @@ -12472,7 +12472,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - public LSL_String llRequestURL() + public LSL_Key llRequestURL() { m_host.AddScriptLPS(1); @@ -13418,7 +13418,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return Convert.ToBase64String(data1); } - public LSL_String llHTTPRequest(string url, LSL_List parameters, string body) + public LSL_Key llHTTPRequest(string url, LSL_List parameters, string body) { // Partial implementation: support for parameter flags needed // see http://wiki.secondlife.com/wiki/LlHTTPRequest @@ -14274,7 +14274,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api }); } - public LSL_String llGetNumberOfNotecardLines(string name) + public LSL_Key llGetNumberOfNotecardLines(string name) { m_host.AddScriptLPS(1); @@ -14325,7 +14325,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return tid.ToString(); } - public LSL_String llGetNotecardLine(string name, int line) + public LSL_Key llGetNotecardLine(string name, int line) { m_host.AddScriptLPS(1); @@ -14452,7 +14452,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return Name2Username(llKey2Name(id)); } - public LSL_String llRequestUsername(string id) + public LSL_Key llRequestUsername(string id) { UUID rq = UUID.Random(); @@ -14468,7 +14468,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return llKey2Name(id); } - public LSL_String llRequestDisplayName(string id) + public LSL_Key llRequestDisplayName(string id) { UUID rq = UUID.Random(); @@ -16050,7 +16050,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api new DetectParams[0])); } - public LSL_String llTransferLindenDollars(string destination, int amount) + public LSL_Key llTransferLindenDollars(string destination, int amount) { UUID txn = UUID.Random(); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 17c977f..4529d9a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs @@ -122,7 +122,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Rotation llGetCameraRot(); LSL_Vector llGetCenterOfMass(); LSL_Vector llGetColor(int face); - LSL_String llGetCreator(); + LSL_Key llGetCreator(); LSL_String llGetDate(); LSL_Float llGetEnergy(); LSL_String llGetEnv(LSL_String name); @@ -155,7 +155,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Float llGetMassMKS(); LSL_Integer llGetMemoryLimit(); void llGetNextEmail(string address, string subject); - LSL_String llGetNotecardLine(string name, int line); + LSL_Key llGetNotecardLine(string name, int line); LSL_Key llGetNumberOfNotecardLines(string name); LSL_Integer llGetNumberOfPrims(); LSL_Integer llGetNumberOfSides(); @@ -211,23 +211,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces void llGiveInventory(string destination, string inventory); void llGiveInventoryList(string destination, string category, LSL_List inventory); LSL_Integer llGiveMoney(string destination, int amount); - LSL_String llTransferLindenDollars(string destination, int amount); + LSL_Key llTransferLindenDollars(string destination, int amount); void llGodLikeRezObject(string inventory, LSL_Vector pos); LSL_Float llGround(LSL_Vector offset); LSL_Vector llGroundContour(LSL_Vector offset); LSL_Vector llGroundNormal(LSL_Vector offset); void llGroundRepel(double height, int water, double tau); LSL_Vector llGroundSlope(LSL_Vector offset); - LSL_String llHTTPRequest(string url, LSL_List parameters, string body); + LSL_Key llHTTPRequest(string url, LSL_List parameters, string body); void llHTTPResponse(LSL_Key id, int status, string body); LSL_String llInsertString(string dst, int position, string src); void llInstantMessage(string user, string message); LSL_String llIntegerToBase64(int number); LSL_String llKey2Name(string id); LSL_String llGetUsername(string id); - LSL_String llRequestUsername(string id); + LSL_Key llRequestUsername(string id); LSL_String llGetDisplayName(string id); - LSL_String llRequestDisplayName(string id); + LSL_Key llRequestDisplayName(string id); void llLinkParticleSystem(int linknum, LSL_List rules); void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot); LSL_String llList2CSV(LSL_List src); @@ -302,7 +302,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Key llRequestAgentData(string id, int data); LSL_Key llRequestInventoryData(string name); void llRequestPermissions(string agent, int perm); - LSL_String llRequestSecureURL(); + LSL_Key llRequestSecureURL(); LSL_Key llRequestSimulatorData(string simulator, int data); LSL_Key llRequestURL(); void llResetLandBanList(); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index c39248b..0b474f4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs @@ -456,7 +456,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llGetColor(face); } - public LSL_String llGetCreator() + public LSL_Key llGetCreator() { return m_LSL_Functions.llGetCreator(); } @@ -611,7 +611,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_LSL_Functions.llGetNextEmail(address, subject); } - public LSL_String llGetNotecardLine(string name, int line) + public LSL_Key llGetNotecardLine(string name, int line) { return m_LSL_Functions.llGetNotecardLine(name, line); } @@ -891,7 +891,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llGiveMoney(destination, amount); } - public LSL_String llTransferLindenDollars(string destination, int amount) + public LSL_Key llTransferLindenDollars(string destination, int amount) { return m_LSL_Functions.llTransferLindenDollars(destination, amount); } @@ -926,7 +926,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llGroundSlope(offset); } - public LSL_String llHTTPRequest(string url, LSL_List parameters, string body) + public LSL_Key llHTTPRequest(string url, LSL_List parameters, string body) { return m_LSL_Functions.llHTTPRequest(url, parameters, body); } @@ -961,7 +961,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llGetUsername(id); } - public LSL_String llRequestUsername(string id) + public LSL_Key llRequestUsername(string id) { return m_LSL_Functions.llRequestUsername(id); } @@ -971,7 +971,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llGetDisplayName(id); } - public LSL_String llRequestDisplayName(string id) + public LSL_Key llRequestDisplayName(string id) { return m_LSL_Functions.llRequestDisplayName(id); } @@ -1346,7 +1346,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_LSL_Functions.llRequestPermissions(agent, perm); } - public LSL_String llRequestSecureURL() + public LSL_Key llRequestSecureURL() { return m_LSL_Functions.llRequestSecureURL(); } -- cgit v1.1