diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | |
parent | Add a build script. (diff) | |
download | opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | 58 |
1 files changed, 46 insertions, 12 deletions
diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs index 5df8e04..a73a0b8 100644 --- a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | |||
@@ -74,6 +74,11 @@ namespace OpenSim.Data.Null | |||
74 | m_store.StoreTerrain(terrain, regionID); | 74 | m_store.StoreTerrain(terrain, regionID); |
75 | } | 75 | } |
76 | 76 | ||
77 | public void StoreBakedTerrain(TerrainData terrain, UUID regionID) | ||
78 | { | ||
79 | m_store.StoreBakedTerrain(terrain, regionID); | ||
80 | } | ||
81 | |||
77 | public double[,] LoadTerrain(UUID regionID) | 82 | public double[,] LoadTerrain(UUID regionID) |
78 | { | 83 | { |
79 | return m_store.LoadTerrain(regionID); | 84 | return m_store.LoadTerrain(regionID); |
@@ -84,6 +89,11 @@ namespace OpenSim.Data.Null | |||
84 | return m_store.LoadTerrain(regionID, pSizeX, pSizeY, pSizeZ); | 89 | return m_store.LoadTerrain(regionID, pSizeX, pSizeY, pSizeZ); |
85 | } | 90 | } |
86 | 91 | ||
92 | public TerrainData LoadBakedTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) | ||
93 | { | ||
94 | return m_store.LoadBakedTerrain(regionID, pSizeX, pSizeY, pSizeZ); | ||
95 | } | ||
96 | |||
87 | public void StoreLandObject(ILandObject Parcel) | 97 | public void StoreLandObject(ILandObject Parcel) |
88 | { | 98 | { |
89 | m_store.StoreLandObject(Parcel); | 99 | m_store.StoreLandObject(Parcel); |
@@ -138,6 +148,11 @@ namespace OpenSim.Data.Null | |||
138 | m_store.RemoveRegionEnvironmentSettings(regionUUID); | 148 | m_store.RemoveRegionEnvironmentSettings(regionUUID); |
139 | } | 149 | } |
140 | 150 | ||
151 | public UUID[] GetObjectIDs(UUID regionID) | ||
152 | { | ||
153 | return new UUID[0]; | ||
154 | } | ||
155 | |||
141 | public void SaveExtra(UUID regionID, string name, string value) | 156 | public void SaveExtra(UUID regionID, string name, string value) |
142 | { | 157 | { |
143 | } | 158 | } |
@@ -159,14 +174,15 @@ namespace OpenSim.Data.Null | |||
159 | public class NullDataStore : ISimulationDataStore | 174 | public class NullDataStore : ISimulationDataStore |
160 | { | 175 | { |
161 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 176 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
162 | 177 | ||
163 | protected Dictionary<UUID, RegionSettings> m_regionSettings = new Dictionary<UUID, RegionSettings>(); | 178 | protected Dictionary<UUID, RegionSettings> m_regionSettings = new Dictionary<UUID, RegionSettings>(); |
164 | protected Dictionary<UUID, SceneObjectPart> m_sceneObjectParts = new Dictionary<UUID, SceneObjectPart>(); | 179 | protected Dictionary<UUID, SceneObjectPart> m_sceneObjectParts = new Dictionary<UUID, SceneObjectPart>(); |
165 | protected Dictionary<UUID, ICollection<TaskInventoryItem>> m_primItems | 180 | protected Dictionary<UUID, ICollection<TaskInventoryItem>> m_primItems |
166 | = new Dictionary<UUID, ICollection<TaskInventoryItem>>(); | 181 | = new Dictionary<UUID, ICollection<TaskInventoryItem>>(); |
167 | protected Dictionary<UUID, TerrainData> m_terrains = new Dictionary<UUID, TerrainData>(); | 182 | protected Dictionary<UUID, TerrainData> m_terrains = new Dictionary<UUID, TerrainData>(); |
183 | protected Dictionary<UUID, TerrainData> m_bakedterrains = new Dictionary<UUID, TerrainData>(); | ||
168 | protected Dictionary<UUID, LandData> m_landData = new Dictionary<UUID, LandData>(); | 184 | protected Dictionary<UUID, LandData> m_landData = new Dictionary<UUID, LandData>(); |
169 | 185 | ||
170 | public void Initialise(string dbfile) | 186 | public void Initialise(string dbfile) |
171 | { | 187 | { |
172 | return; | 188 | return; |
@@ -180,14 +196,14 @@ namespace OpenSim.Data.Null | |||
180 | { | 196 | { |
181 | m_regionSettings[rs.RegionUUID] = rs; | 197 | m_regionSettings[rs.RegionUUID] = rs; |
182 | } | 198 | } |
183 | 199 | ||
184 | public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID) | 200 | public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID) |
185 | { | 201 | { |
186 | //This connector doesn't support the windlight module yet | 202 | //This connector doesn't support the windlight module yet |
187 | //Return default LL windlight settings | 203 | //Return default LL windlight settings |
188 | return new RegionLightShareData(); | 204 | return new RegionLightShareData(); |
189 | } | 205 | } |
190 | 206 | ||
191 | public void RemoveRegionWindlightSettings(UUID regionID) | 207 | public void RemoveRegionWindlightSettings(UUID regionID) |
192 | { | 208 | { |
193 | } | 209 | } |
@@ -222,7 +238,7 @@ namespace OpenSim.Data.Null | |||
222 | 238 | ||
223 | if (rs == null) | 239 | if (rs == null) |
224 | rs = new RegionSettings(); | 240 | rs = new RegionSettings(); |
225 | 241 | ||
226 | return rs; | 242 | return rs; |
227 | } | 243 | } |
228 | 244 | ||
@@ -234,9 +250,9 @@ namespace OpenSim.Data.Null | |||
234 | foreach (SceneObjectPart prim in obj.Parts) | 250 | foreach (SceneObjectPart prim in obj.Parts) |
235 | { | 251 | { |
236 | // m_log.DebugFormat( | 252 | // m_log.DebugFormat( |
237 | // "[MOCK REGION DATA PLUGIN]: Storing part {0} {1} in object {2} {3} in region {4}", | 253 | // "[MOCK REGION DATA PLUGIN]: Storing part {0} {1} in object {2} {3} in region {4}", |
238 | // prim.Name, prim.UUID, obj.Name, obj.UUID, regionUUID); | 254 | // prim.Name, prim.UUID, obj.Name, obj.UUID, regionUUID); |
239 | 255 | ||
240 | m_sceneObjectParts[prim.UUID] = prim; | 256 | m_sceneObjectParts[prim.UUID] = prim; |
241 | } | 257 | } |
242 | } | 258 | } |
@@ -250,7 +266,7 @@ namespace OpenSim.Data.Null | |||
250 | if (part.ParentGroup.UUID == obj) | 266 | if (part.ParentGroup.UUID == obj) |
251 | { | 267 | { |
252 | // m_log.DebugFormat( | 268 | // m_log.DebugFormat( |
253 | // "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", | 269 | // "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", |
254 | // part.Name, part.UUID, obj, regionUUID); | 270 | // part.Name, part.UUID, obj, regionUUID); |
255 | m_sceneObjectParts.Remove(part.UUID); | 271 | m_sceneObjectParts.Remove(part.UUID); |
256 | } | 272 | } |
@@ -265,7 +281,7 @@ namespace OpenSim.Data.Null | |||
265 | public List<SceneObjectGroup> LoadObjects(UUID regionUUID) | 281 | public List<SceneObjectGroup> LoadObjects(UUID regionUUID) |
266 | { | 282 | { |
267 | Dictionary<UUID, SceneObjectGroup> objects = new Dictionary<UUID, SceneObjectGroup>(); | 283 | Dictionary<UUID, SceneObjectGroup> objects = new Dictionary<UUID, SceneObjectGroup>(); |
268 | 284 | ||
269 | // Create all of the SOGs from the root prims first | 285 | // Create all of the SOGs from the root prims first |
270 | foreach (SceneObjectPart prim in m_sceneObjectParts.Values) | 286 | foreach (SceneObjectPart prim in m_sceneObjectParts.Values) |
271 | { | 287 | { |
@@ -302,10 +318,10 @@ namespace OpenSim.Data.Null | |||
302 | } | 318 | } |
303 | } | 319 | } |
304 | } | 320 | } |
305 | 321 | ||
306 | // TODO: Load items. This is assymetric - we store items as a separate method but don't retrieve them that | 322 | // TODO: Load items. This is assymetric - we store items as a separate method but don't retrieve them that |
307 | // way! | 323 | // way! |
308 | 324 | ||
309 | return new List<SceneObjectGroup>(objects.Values); | 325 | return new List<SceneObjectGroup>(objects.Values); |
310 | } | 326 | } |
311 | 327 | ||
@@ -314,6 +330,11 @@ namespace OpenSim.Data.Null | |||
314 | m_terrains[regionID] = ter; | 330 | m_terrains[regionID] = ter; |
315 | } | 331 | } |
316 | 332 | ||
333 | public void StoreBakedTerrain(TerrainData ter, UUID regionID) | ||
334 | { | ||
335 | m_bakedterrains[regionID] = ter; | ||
336 | } | ||
337 | |||
317 | public void StoreTerrain(double[,] ter, UUID regionID) | 338 | public void StoreTerrain(double[,] ter, UUID regionID) |
318 | { | 339 | { |
319 | m_terrains[regionID] = new HeightmapTerrainData(ter); | 340 | m_terrains[regionID] = new HeightmapTerrainData(ter); |
@@ -327,6 +348,14 @@ namespace OpenSim.Data.Null | |||
327 | return null; | 348 | return null; |
328 | } | 349 | } |
329 | 350 | ||
351 | public TerrainData LoadBakedTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) | ||
352 | { | ||
353 | if (m_bakedterrains.ContainsKey(regionID)) | ||
354 | return m_bakedterrains[regionID]; | ||
355 | else | ||
356 | return null; | ||
357 | } | ||
358 | |||
330 | public double[,] LoadTerrain(UUID regionID) | 359 | public double[,] LoadTerrain(UUID regionID) |
331 | { | 360 | { |
332 | if (m_terrains.ContainsKey(regionID)) | 361 | if (m_terrains.ContainsKey(regionID)) |
@@ -355,6 +384,11 @@ namespace OpenSim.Data.Null | |||
355 | { | 384 | { |
356 | } | 385 | } |
357 | 386 | ||
387 | public UUID[] GetObjectIDs(UUID regionID) | ||
388 | { | ||
389 | return new UUID[0]; | ||
390 | } | ||
391 | |||
358 | public void SaveExtra(UUID regionID, string name, string value) | 392 | public void SaveExtra(UUID regionID, string name, string value) |
359 | { | 393 | { |
360 | } | 394 | } |