diff options
author | Pixel Tomsen | 2012-01-25 21:31:18 +0100 |
---|---|---|
committer | BlueWall | 2012-01-25 15:48:38 -0500 |
commit | 8f53c768f53478ff3e0c27198b257bb27be16259 (patch) | |
tree | 014d6d93de40b6e2049d77dfba305d696c4ca12d | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-8f53c768f53478ff3e0c27198b257bb27be16259.zip opensim-SC_OLD-8f53c768f53478ff3e0c27198b257bb27be16259.tar.gz opensim-SC_OLD-8f53c768f53478ff3e0c27198b257bb27be16259.tar.bz2 opensim-SC_OLD-8f53c768f53478ff3e0c27198b257bb27be16259.tar.xz |
llGetParcelMusicURL implementation http://wiki.secondlife.com/wiki/LlGetParcelMusicURL
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
5 files changed, 34 insertions, 1 deletions
diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs index 0316944..f75a990 100644 --- a/OpenSim/Framework/ILandObject.cs +++ b/OpenSim/Framework/ILandObject.cs | |||
@@ -130,5 +130,11 @@ namespace OpenSim.Framework | |||
130 | /// </summary> | 130 | /// </summary> |
131 | /// <param name="url"></param> | 131 | /// <param name="url"></param> |
132 | void SetMusicUrl(string url); | 132 | void SetMusicUrl(string url); |
133 | |||
134 | /// <summary> | ||
135 | /// Get the music url for this land parcel | ||
136 | /// </summary> | ||
137 | /// <returns>The music url.</returns> | ||
138 | string GetMusicUrl(); | ||
133 | } | 139 | } |
134 | } | 140 | } |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 0da0de3..79b13c3 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -1094,7 +1094,16 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1094 | LandData.MusicURL = url; | 1094 | LandData.MusicURL = url; |
1095 | SendLandUpdateToAvatarsOverMe(); | 1095 | SendLandUpdateToAvatarsOverMe(); |
1096 | } | 1096 | } |
1097 | 1097 | ||
1098 | /// <summary> | ||
1099 | /// Get the music url for this land parcel | ||
1100 | /// </summary> | ||
1101 | /// <returns>The music url.</returns> | ||
1102 | public string GetMusicUrl() | ||
1103 | { | ||
1104 | return LandData.MusicURL; | ||
1105 | } | ||
1106 | |||
1098 | #endregion | 1107 | #endregion |
1099 | } | 1108 | } |
1100 | } | 1109 | } |
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 | |||
7566 | ScriptSleep(2000); | 7566 | ScriptSleep(2000); |
7567 | } | 7567 | } |
7568 | 7568 | ||
7569 | public LSL_String llGetParcelMusicURL() | ||
7570 | { | ||
7571 | m_host.AddScriptLPS(1); | ||
7572 | |||
7573 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | ||
7574 | |||
7575 | if (land.LandData.OwnerID != m_host.OwnerID) | ||
7576 | return String.Empty; | ||
7577 | |||
7578 | return land.GetMusicUrl(); | ||
7579 | } | ||
7580 | |||
7569 | public LSL_Vector llGetRootPosition() | 7581 | public LSL_Vector llGetRootPosition() |
7570 | { | 7582 | { |
7571 | m_host.AddScriptLPS(1); | 7583 | 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 | |||
161 | LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param); | 161 | LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param); |
162 | LSL_Integer llGetParcelFlags(LSL_Vector pos); | 162 | LSL_Integer llGetParcelFlags(LSL_Vector pos); |
163 | LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide); | 163 | LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide); |
164 | LSL_String llGetParcelMusicURL(); | ||
164 | LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide); | 165 | LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide); |
165 | LSL_List llGetParcelPrimOwners(LSL_Vector pos); | 166 | LSL_List llGetParcelPrimOwners(LSL_Vector pos); |
166 | LSL_Integer llGetPermissions(); | 167 | 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 | |||
649 | return m_LSL_Functions.llGetParcelMaxPrims(pos, sim_wide); | 649 | return m_LSL_Functions.llGetParcelMaxPrims(pos, sim_wide); |
650 | } | 650 | } |
651 | 651 | ||
652 | public LSL_String llGetParcelMusicURL() | ||
653 | { | ||
654 | return m_LSL_Functions.llGetParcelMusicURL(); | ||
655 | } | ||
656 | |||
652 | public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) | 657 | public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) |
653 | { | 658 | { |
654 | return m_LSL_Functions.llGetParcelPrimCount(pos, category, sim_wide); | 659 | return m_LSL_Functions.llGetParcelPrimCount(pos, category, sim_wide); |