aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
index c3ec2a6..9f74367 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
@@ -51,7 +51,7 @@ using OSDMap = OpenMetaverse.StructuredData.OSDMap;
51namespace OpenSim.Region.CoreModules.Media.Moap 51namespace OpenSim.Region.CoreModules.Media.Moap
52{ 52{
53 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")] 53 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")]
54 public class MoapModule : INonSharedRegionModule 54 public class MoapModule : INonSharedRegionModule, IMoapModule
55 { 55 {
56 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 56 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
57 57
@@ -97,7 +97,22 @@ namespace OpenSim.Region.CoreModules.Media.Moap
97 // Even though we're registering for POST we're going to get GETS and UPDATES too 97 // Even though we're registering for POST we're going to get GETS and UPDATES too
98 caps.RegisterHandler( 98 caps.RegisterHandler(
99 "ObjectMediaNavigate", new RestStreamHandler("POST", "/CAPS/" + UUID.Random(), HandleObjectMediaNavigateMessage)); 99 "ObjectMediaNavigate", new RestStreamHandler("POST", "/CAPS/" + UUID.Random(), HandleObjectMediaNavigateMessage));
100 } 100 }
101
102 public MediaEntry GetMediaEntry(SceneObjectPart part, int face)
103 {
104 if (face < 0)
105 throw new ArgumentException("Face cannot be less than zero");
106
107 List<MediaEntry> media = part.Shape.Media;
108
109 if (face > media.Count - 1)
110 throw new ArgumentException(
111 string.Format("Face argument was {0} but max is {1}", face, media.Count - 1));
112
113 // TODO: Really need a proper copy constructor down in libopenmetaverse
114 return MediaEntry.FromOSD(media[face].GetOSD());
115 }
101 116
102 /// <summary> 117 /// <summary>
103 /// Sets or gets per face media textures. 118 /// Sets or gets per face media textures.