diff options
Diffstat (limited to 'OpenSim/Data/Null/NullSimulationData.cs')
-rw-r--r-- | OpenSim/Data/Null/NullSimulationData.cs | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/OpenSim/Data/Null/NullSimulationData.cs b/OpenSim/Data/Null/NullSimulationData.cs index 4979cf6..deeaced 100644 --- a/OpenSim/Data/Null/NullSimulationData.cs +++ b/OpenSim/Data/Null/NullSimulationData.cs | |||
@@ -77,20 +77,34 @@ namespace OpenSim.Data.Null | |||
77 | } | 77 | } |
78 | 78 | ||
79 | #region Environment Settings | 79 | #region Environment Settings |
80 | |||
81 | private Dictionary<UUID, string> EnvironmentSettings = new Dictionary<UUID, string>(); | ||
82 | |||
80 | public string LoadRegionEnvironmentSettings(UUID regionUUID) | 83 | public string LoadRegionEnvironmentSettings(UUID regionUUID) |
81 | { | 84 | { |
82 | //This connector doesn't support the Environment module yet | 85 | lock (EnvironmentSettings) |
86 | { | ||
87 | if (EnvironmentSettings.ContainsKey(regionUUID)) | ||
88 | return EnvironmentSettings[regionUUID]; | ||
89 | } | ||
83 | return string.Empty; | 90 | return string.Empty; |
84 | } | 91 | } |
85 | 92 | ||
86 | public void StoreRegionEnvironmentSettings(UUID regionUUID, string settings) | 93 | public void StoreRegionEnvironmentSettings(UUID regionUUID, string settings) |
87 | { | 94 | { |
88 | //This connector doesn't support the Environment module yet | 95 | lock (EnvironmentSettings) |
96 | { | ||
97 | EnvironmentSettings[regionUUID] = settings; | ||
98 | } | ||
89 | } | 99 | } |
90 | 100 | ||
91 | public void RemoveRegionEnvironmentSettings(UUID regionUUID) | 101 | public void RemoveRegionEnvironmentSettings(UUID regionUUID) |
92 | { | 102 | { |
93 | //This connector doesn't support the Environment module yet | 103 | lock (EnvironmentSettings) |
104 | { | ||
105 | if (EnvironmentSettings.ContainsKey(regionUUID)) | ||
106 | EnvironmentSettings.Remove(regionUUID); | ||
107 | } | ||
94 | } | 108 | } |
95 | #endregion | 109 | #endregion |
96 | 110 | ||
@@ -118,18 +132,36 @@ namespace OpenSim.Data.Null | |||
118 | return new List<SceneObjectGroup>(); | 132 | return new List<SceneObjectGroup>(); |
119 | } | 133 | } |
120 | 134 | ||
121 | Dictionary<UUID, double[,]> m_terrains = new Dictionary<UUID, double[,]>(); | 135 | Dictionary<UUID, TerrainData> m_terrains = new Dictionary<UUID, TerrainData>(); |
122 | public void StoreTerrain(double[,] ter, UUID regionID) | 136 | public void StoreTerrain(TerrainData ter, UUID regionID) |
123 | { | 137 | { |
124 | if (m_terrains.ContainsKey(regionID)) | 138 | if (m_terrains.ContainsKey(regionID)) |
125 | m_terrains.Remove(regionID); | 139 | m_terrains.Remove(regionID); |
126 | m_terrains.Add(regionID, ter); | 140 | m_terrains.Add(regionID, ter); |
127 | } | 141 | } |
128 | 142 | ||
143 | // Legacy. Just don't do this. | ||
144 | public void StoreTerrain(double[,] ter, UUID regionID) | ||
145 | { | ||
146 | TerrainData terrData = new HeightmapTerrainData(ter); | ||
147 | StoreTerrain(terrData, regionID); | ||
148 | } | ||
149 | |||
150 | // Legacy. Just don't do this. | ||
151 | // Returns 'null' if region not found | ||
129 | public double[,] LoadTerrain(UUID regionID) | 152 | public double[,] LoadTerrain(UUID regionID) |
130 | { | 153 | { |
131 | if (m_terrains.ContainsKey(regionID)) | 154 | if (m_terrains.ContainsKey(regionID)) |
132 | { | 155 | { |
156 | return m_terrains[regionID].GetDoubles(); | ||
157 | } | ||
158 | return null; | ||
159 | } | ||
160 | |||
161 | public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) | ||
162 | { | ||
163 | if (m_terrains.ContainsKey(regionID)) | ||
164 | { | ||
133 | return m_terrains[regionID]; | 165 | return m_terrains[regionID]; |
134 | } | 166 | } |
135 | return null; | 167 | return null; |