From 8f53c768f53478ff3e0c27198b257bb27be16259 Mon Sep 17 00:00:00 2001 From: Pixel Tomsen Date: Wed, 25 Jan 2012 21:31:18 +0100 Subject: llGetParcelMusicURL implementation http://wiki.secondlife.com/wiki/LlGetParcelMusicURL Signed-off-by: BlueWall --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 ++++++++++++ OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | 1 + OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | 5 +++++ 3 files changed, 18 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index fb930e0..330c65d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -7566,6 +7566,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ScriptSleep(2000); } + public LSL_String llGetParcelMusicURL() + { + m_host.AddScriptLPS(1); + + ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + + if (land.LandData.OwnerID != m_host.OwnerID) + return String.Empty; + + return land.GetMusicUrl(); + } + public LSL_Vector llGetRootPosition() { m_host.AddScriptLPS(1); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 62e2854..282443b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs @@ -161,6 +161,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param); LSL_Integer llGetParcelFlags(LSL_Vector pos); LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide); + LSL_String llGetParcelMusicURL(); LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide); LSL_List llGetParcelPrimOwners(LSL_Vector pos); LSL_Integer llGetPermissions(); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 508f33b..9733683 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs @@ -649,6 +649,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llGetParcelMaxPrims(pos, sim_wide); } + public LSL_String llGetParcelMusicURL() + { + return m_LSL_Functions.llGetParcelMusicURL(); + } + public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) { return m_LSL_Functions.llGetParcelPrimCount(pos, category, sim_wide); -- cgit v1.1