From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | 58 ++++++++++++++++++----- 1 file changed, 46 insertions(+), 12 deletions(-) (limited to 'OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs') 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 m_store.StoreTerrain(terrain, regionID); } + public void StoreBakedTerrain(TerrainData terrain, UUID regionID) + { + m_store.StoreBakedTerrain(terrain, regionID); + } + public double[,] LoadTerrain(UUID regionID) { return m_store.LoadTerrain(regionID); @@ -84,6 +89,11 @@ namespace OpenSim.Data.Null return m_store.LoadTerrain(regionID, pSizeX, pSizeY, pSizeZ); } + public TerrainData LoadBakedTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) + { + return m_store.LoadBakedTerrain(regionID, pSizeX, pSizeY, pSizeZ); + } + public void StoreLandObject(ILandObject Parcel) { m_store.StoreLandObject(Parcel); @@ -138,6 +148,11 @@ namespace OpenSim.Data.Null m_store.RemoveRegionEnvironmentSettings(regionUUID); } + public UUID[] GetObjectIDs(UUID regionID) + { + return new UUID[0]; + } + public void SaveExtra(UUID regionID, string name, string value) { } @@ -159,14 +174,15 @@ namespace OpenSim.Data.Null public class NullDataStore : ISimulationDataStore { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + protected Dictionary m_regionSettings = new Dictionary(); protected Dictionary m_sceneObjectParts = new Dictionary(); - protected Dictionary> m_primItems + protected Dictionary> m_primItems = new Dictionary>(); protected Dictionary m_terrains = new Dictionary(); + protected Dictionary m_bakedterrains = new Dictionary(); protected Dictionary m_landData = new Dictionary(); - + public void Initialise(string dbfile) { return; @@ -180,14 +196,14 @@ namespace OpenSim.Data.Null { m_regionSettings[rs.RegionUUID] = rs; } - + public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID) { //This connector doesn't support the windlight module yet //Return default LL windlight settings return new RegionLightShareData(); } - + public void RemoveRegionWindlightSettings(UUID regionID) { } @@ -222,7 +238,7 @@ namespace OpenSim.Data.Null if (rs == null) rs = new RegionSettings(); - + return rs; } @@ -234,9 +250,9 @@ namespace OpenSim.Data.Null foreach (SceneObjectPart prim in obj.Parts) { // m_log.DebugFormat( -// "[MOCK REGION DATA PLUGIN]: Storing part {0} {1} in object {2} {3} in region {4}", +// "[MOCK REGION DATA PLUGIN]: Storing part {0} {1} in object {2} {3} in region {4}", // prim.Name, prim.UUID, obj.Name, obj.UUID, regionUUID); - + m_sceneObjectParts[prim.UUID] = prim; } } @@ -250,7 +266,7 @@ namespace OpenSim.Data.Null if (part.ParentGroup.UUID == obj) { // m_log.DebugFormat( -// "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", +// "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", // part.Name, part.UUID, obj, regionUUID); m_sceneObjectParts.Remove(part.UUID); } @@ -265,7 +281,7 @@ namespace OpenSim.Data.Null public List LoadObjects(UUID regionUUID) { Dictionary objects = new Dictionary(); - + // Create all of the SOGs from the root prims first foreach (SceneObjectPart prim in m_sceneObjectParts.Values) { @@ -302,10 +318,10 @@ namespace OpenSim.Data.Null } } } - + // TODO: Load items. This is assymetric - we store items as a separate method but don't retrieve them that // way! - + return new List(objects.Values); } @@ -314,6 +330,11 @@ namespace OpenSim.Data.Null m_terrains[regionID] = ter; } + public void StoreBakedTerrain(TerrainData ter, UUID regionID) + { + m_bakedterrains[regionID] = ter; + } + public void StoreTerrain(double[,] ter, UUID regionID) { m_terrains[regionID] = new HeightmapTerrainData(ter); @@ -327,6 +348,14 @@ namespace OpenSim.Data.Null return null; } + public TerrainData LoadBakedTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) + { + if (m_bakedterrains.ContainsKey(regionID)) + return m_bakedterrains[regionID]; + else + return null; + } + public double[,] LoadTerrain(UUID regionID) { if (m_terrains.ContainsKey(regionID)) @@ -355,6 +384,11 @@ namespace OpenSim.Data.Null { } + public UUID[] GetObjectIDs(UUID regionID) + { + return new UUID[0]; + } + public void SaveExtra(UUID regionID, string name, string value) { } -- cgit v1.1