diff options
author | Adam Frisby | 2008-04-29 14:04:55 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-29 14:04:55 +0000 |
commit | 375163a6fece8b3a57c7555246abe8338223a599 (patch) | |
tree | 163001ca96a4b4d08589e9772f78510677d5d0dc /OpenSim/Framework/EstateSettings.cs | |
parent | Patch from Melanie: 0001087: Crash to bash de-linking objects. Thanks Melanie! (diff) | |
download | opensim-SC-375163a6fece8b3a57c7555246abe8338223a599.zip opensim-SC-375163a6fece8b3a57c7555246abe8338223a599.tar.gz opensim-SC-375163a6fece8b3a57c7555246abe8338223a599.tar.bz2 opensim-SC-375163a6fece8b3a57c7555246abe8338223a599.tar.xz |
* Spring cleaning.
* Added new generic "Location" class to handle 2D integer locations. Going to use it to replace all RegionHandle and X,Y coordinate references throughout the entire project. You have been warned.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/EstateSettings.cs | 221 |
1 files changed, 94 insertions, 127 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index efb55fe..331d7c3 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs | |||
@@ -36,10 +36,72 @@ namespace OpenSim.Framework | |||
36 | public class EstateSettings | 36 | public class EstateSettings |
37 | { | 37 | { |
38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
39 | private ConfigurationMember configMember; | ||
39 | 40 | ||
40 | //Settings to this island | 41 | //Settings to this island |
41 | private float m_billableFactor; | 42 | private float m_billableFactor; |
42 | 43 | ||
44 | private uint m_estateID; | ||
45 | private LLUUID m_estateManager0; | ||
46 | private LLUUID m_estateManager1; | ||
47 | private LLUUID m_estateManager2; | ||
48 | private LLUUID m_estateManager3; | ||
49 | private LLUUID m_estateManager4; | ||
50 | private LLUUID m_estateManager5; | ||
51 | private LLUUID m_estateManager6; | ||
52 | private LLUUID m_estateManager7; | ||
53 | private LLUUID m_estateManager8; | ||
54 | private LLUUID m_estateManager9; | ||
55 | private string m_estateName; | ||
56 | private byte m_maxAgents; | ||
57 | private float m_objectBonusFactor; | ||
58 | |||
59 | private uint m_parentEstateID; | ||
60 | private int m_pricePerMeter; | ||
61 | private int m_redirectGridX; | ||
62 | private int m_redirectGridY; | ||
63 | private bool m_regionAllowTerraform; | ||
64 | private Simulator.RegionFlags m_regionFlags; | ||
65 | private ushort m_regionWaterHeight; | ||
66 | private Simulator.SimAccess m_simAccess; | ||
67 | private float m_sunHour; | ||
68 | private LLVector3 m_sunPosition; | ||
69 | private LLUUID m_terrainBase0; | ||
70 | private LLUUID m_terrainBase1; | ||
71 | private LLUUID m_terrainBase2; | ||
72 | private LLUUID m_terrainBase3; | ||
73 | private LLUUID m_terrainDetail0; | ||
74 | private LLUUID m_terrainDetail1; | ||
75 | private LLUUID m_terrainDetail2; | ||
76 | private LLUUID m_terrainDetail3; | ||
77 | private string m_terrainFile; | ||
78 | private float m_terrainHeightRange0; | ||
79 | private float m_terrainHeightRange1; | ||
80 | private float m_terrainHeightRange2; | ||
81 | private float m_terrainHeightRange3; | ||
82 | private LLUUID m_terrainImageID; | ||
83 | private float m_terrainLowerLimit; | ||
84 | private double m_terrainMultiplier; | ||
85 | private float m_terrainRaiseLimit; | ||
86 | private float m_terrainStartHeight0; | ||
87 | private float m_terrainStartHeight1; | ||
88 | private float m_terrainStartHeight2; | ||
89 | private float m_terrainStartHeight3; | ||
90 | private bool m_useFixedSun; | ||
91 | private float m_waterHeight; | ||
92 | |||
93 | public EstateSettings() | ||
94 | { | ||
95 | // Temporary hack to prevent multiple loadings. | ||
96 | if (configMember == null) | ||
97 | { | ||
98 | configMember = | ||
99 | new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", | ||
100 | loadConfigurationOptions, handleIncomingConfiguration, true); | ||
101 | configMember.performConfigurationRetrieve(); | ||
102 | } | ||
103 | } | ||
104 | |||
43 | public float billableFactor | 105 | public float billableFactor |
44 | { | 106 | { |
45 | get { return m_billableFactor; } | 107 | get { return m_billableFactor; } |
@@ -50,8 +112,6 @@ namespace OpenSim.Framework | |||
50 | } | 112 | } |
51 | } | 113 | } |
52 | 114 | ||
53 | private uint m_estateID; | ||
54 | |||
55 | public uint estateID | 115 | public uint estateID |
56 | { | 116 | { |
57 | get { return m_estateID; } | 117 | get { return m_estateID; } |
@@ -62,8 +122,6 @@ namespace OpenSim.Framework | |||
62 | } | 122 | } |
63 | } | 123 | } |
64 | 124 | ||
65 | private uint m_parentEstateID; | ||
66 | |||
67 | public uint parentEstateID | 125 | public uint parentEstateID |
68 | { | 126 | { |
69 | get { return m_parentEstateID; } | 127 | get { return m_parentEstateID; } |
@@ -74,8 +132,6 @@ namespace OpenSim.Framework | |||
74 | } | 132 | } |
75 | } | 133 | } |
76 | 134 | ||
77 | private byte m_maxAgents; | ||
78 | |||
79 | public byte maxAgents | 135 | public byte maxAgents |
80 | { | 136 | { |
81 | get { return m_maxAgents; } | 137 | get { return m_maxAgents; } |
@@ -86,8 +142,6 @@ namespace OpenSim.Framework | |||
86 | } | 142 | } |
87 | } | 143 | } |
88 | 144 | ||
89 | private float m_objectBonusFactor; | ||
90 | |||
91 | public float objectBonusFactor | 145 | public float objectBonusFactor |
92 | { | 146 | { |
93 | get { return m_objectBonusFactor; } | 147 | get { return m_objectBonusFactor; } |
@@ -98,8 +152,6 @@ namespace OpenSim.Framework | |||
98 | } | 152 | } |
99 | } | 153 | } |
100 | 154 | ||
101 | private int m_redirectGridX; | ||
102 | |||
103 | public int redirectGridX | 155 | public int redirectGridX |
104 | { | 156 | { |
105 | get { return m_redirectGridX; } | 157 | get { return m_redirectGridX; } |
@@ -110,8 +162,6 @@ namespace OpenSim.Framework | |||
110 | } | 162 | } |
111 | } | 163 | } |
112 | 164 | ||
113 | private int m_redirectGridY; | ||
114 | |||
115 | public int redirectGridY | 165 | public int redirectGridY |
116 | { | 166 | { |
117 | get { return m_redirectGridY; } | 167 | get { return m_redirectGridY; } |
@@ -122,8 +172,6 @@ namespace OpenSim.Framework | |||
122 | } | 172 | } |
123 | } | 173 | } |
124 | 174 | ||
125 | private Simulator.RegionFlags m_regionFlags; | ||
126 | |||
127 | public Simulator.RegionFlags regionFlags | 175 | public Simulator.RegionFlags regionFlags |
128 | { | 176 | { |
129 | get { return m_regionFlags; } | 177 | get { return m_regionFlags; } |
@@ -131,24 +179,20 @@ namespace OpenSim.Framework | |||
131 | { | 179 | { |
132 | //m_regionFlags = (Simulator.RegionFlags)0x400000; | 180 | //m_regionFlags = (Simulator.RegionFlags)0x400000; |
133 | m_regionFlags = value; | 181 | m_regionFlags = value; |
134 | configMember.forceSetConfigurationOption("region_flags", ((uint)m_regionFlags).ToString()); | 182 | configMember.forceSetConfigurationOption("region_flags", ((uint) m_regionFlags).ToString()); |
135 | } | 183 | } |
136 | } | 184 | } |
137 | 185 | ||
138 | private Simulator.SimAccess m_simAccess; | ||
139 | |||
140 | public Simulator.SimAccess simAccess | 186 | public Simulator.SimAccess simAccess |
141 | { | 187 | { |
142 | get { return m_simAccess; } | 188 | get { return m_simAccess; } |
143 | set | 189 | set |
144 | { | 190 | { |
145 | m_simAccess = value; | 191 | m_simAccess = value; |
146 | configMember.forceSetConfigurationOption("sim_access", ((byte)m_simAccess).ToString()); | 192 | configMember.forceSetConfigurationOption("sim_access", ((byte) m_simAccess).ToString()); |
147 | } | 193 | } |
148 | } | 194 | } |
149 | 195 | ||
150 | private float m_sunHour; | ||
151 | |||
152 | public float sunHour | 196 | public float sunHour |
153 | { | 197 | { |
154 | get { return m_sunHour; } | 198 | get { return m_sunHour; } |
@@ -159,8 +203,6 @@ namespace OpenSim.Framework | |||
159 | } | 203 | } |
160 | } | 204 | } |
161 | 205 | ||
162 | private LLVector3 m_sunPosition; | ||
163 | |||
164 | public LLVector3 sunPosition | 206 | public LLVector3 sunPosition |
165 | { | 207 | { |
166 | get { return m_sunPosition; } | 208 | get { return m_sunPosition; } |
@@ -171,8 +213,6 @@ namespace OpenSim.Framework | |||
171 | } | 213 | } |
172 | } | 214 | } |
173 | 215 | ||
174 | private float m_terrainRaiseLimit; | ||
175 | |||
176 | public float terrainRaiseLimit | 216 | public float terrainRaiseLimit |
177 | { | 217 | { |
178 | get { return m_terrainRaiseLimit; } | 218 | get { return m_terrainRaiseLimit; } |
@@ -183,8 +223,6 @@ namespace OpenSim.Framework | |||
183 | } | 223 | } |
184 | } | 224 | } |
185 | 225 | ||
186 | private float m_terrainLowerLimit; | ||
187 | |||
188 | public float terrainLowerLimit | 226 | public float terrainLowerLimit |
189 | { | 227 | { |
190 | get { return m_terrainLowerLimit; } | 228 | get { return m_terrainLowerLimit; } |
@@ -195,8 +233,6 @@ namespace OpenSim.Framework | |||
195 | } | 233 | } |
196 | } | 234 | } |
197 | 235 | ||
198 | private bool m_useFixedSun; | ||
199 | |||
200 | public bool useFixedSun | 236 | public bool useFixedSun |
201 | { | 237 | { |
202 | get { return m_useFixedSun; } | 238 | get { return m_useFixedSun; } |
@@ -207,8 +243,6 @@ namespace OpenSim.Framework | |||
207 | } | 243 | } |
208 | } | 244 | } |
209 | 245 | ||
210 | private int m_pricePerMeter; | ||
211 | |||
212 | public int pricePerMeter | 246 | public int pricePerMeter |
213 | { | 247 | { |
214 | get { return m_pricePerMeter; } | 248 | get { return m_pricePerMeter; } |
@@ -220,8 +254,6 @@ namespace OpenSim.Framework | |||
220 | } | 254 | } |
221 | 255 | ||
222 | 256 | ||
223 | private ushort m_regionWaterHeight; | ||
224 | |||
225 | public ushort regionWaterHeight | 257 | public ushort regionWaterHeight |
226 | { | 258 | { |
227 | get { return m_regionWaterHeight; } | 259 | get { return m_regionWaterHeight; } |
@@ -233,8 +265,6 @@ namespace OpenSim.Framework | |||
233 | } | 265 | } |
234 | 266 | ||
235 | 267 | ||
236 | private bool m_regionAllowTerraform; | ||
237 | |||
238 | public bool regionAllowTerraform | 268 | public bool regionAllowTerraform |
239 | { | 269 | { |
240 | get { return m_regionAllowTerraform; } | 270 | get { return m_regionAllowTerraform; } |
@@ -248,7 +278,6 @@ namespace OpenSim.Framework | |||
248 | 278 | ||
249 | // Region Information | 279 | // Region Information |
250 | // Low resolution 'base' textures. No longer used. | 280 | // Low resolution 'base' textures. No longer used. |
251 | private LLUUID m_terrainBase0; | ||
252 | 281 | ||
253 | public LLUUID terrainBase0 | 282 | public LLUUID terrainBase0 |
254 | { | 283 | { |
@@ -260,8 +289,6 @@ namespace OpenSim.Framework | |||
260 | } | 289 | } |
261 | } | 290 | } |
262 | 291 | ||
263 | private LLUUID m_terrainBase1; | ||
264 | |||
265 | public LLUUID terrainBase1 | 292 | public LLUUID terrainBase1 |
266 | { | 293 | { |
267 | get { return m_terrainBase1; } | 294 | get { return m_terrainBase1; } |
@@ -272,8 +299,6 @@ namespace OpenSim.Framework | |||
272 | } | 299 | } |
273 | } | 300 | } |
274 | 301 | ||
275 | private LLUUID m_terrainBase2; | ||
276 | |||
277 | public LLUUID terrainBase2 | 302 | public LLUUID terrainBase2 |
278 | { | 303 | { |
279 | get { return m_terrainBase2; } | 304 | get { return m_terrainBase2; } |
@@ -284,8 +309,6 @@ namespace OpenSim.Framework | |||
284 | } | 309 | } |
285 | } | 310 | } |
286 | 311 | ||
287 | private LLUUID m_terrainBase3; | ||
288 | |||
289 | public LLUUID terrainBase3 | 312 | public LLUUID terrainBase3 |
290 | { | 313 | { |
291 | get { return m_terrainBase3; } | 314 | get { return m_terrainBase3; } |
@@ -298,7 +321,6 @@ namespace OpenSim.Framework | |||
298 | 321 | ||
299 | 322 | ||
300 | // Higher resolution terrain textures | 323 | // Higher resolution terrain textures |
301 | private LLUUID m_terrainDetail0; | ||
302 | 324 | ||
303 | public LLUUID terrainDetail0 | 325 | public LLUUID terrainDetail0 |
304 | { | 326 | { |
@@ -310,8 +332,6 @@ namespace OpenSim.Framework | |||
310 | } | 332 | } |
311 | } | 333 | } |
312 | 334 | ||
313 | private LLUUID m_terrainDetail1; | ||
314 | |||
315 | public LLUUID terrainDetail1 | 335 | public LLUUID terrainDetail1 |
316 | { | 336 | { |
317 | get { return m_terrainDetail1; } | 337 | get { return m_terrainDetail1; } |
@@ -322,8 +342,6 @@ namespace OpenSim.Framework | |||
322 | } | 342 | } |
323 | } | 343 | } |
324 | 344 | ||
325 | private LLUUID m_terrainDetail2; | ||
326 | |||
327 | public LLUUID terrainDetail2 | 345 | public LLUUID terrainDetail2 |
328 | { | 346 | { |
329 | get { return m_terrainDetail2; } | 347 | get { return m_terrainDetail2; } |
@@ -334,8 +352,6 @@ namespace OpenSim.Framework | |||
334 | } | 352 | } |
335 | } | 353 | } |
336 | 354 | ||
337 | private LLUUID m_terrainDetail3; | ||
338 | |||
339 | public LLUUID terrainDetail3 | 355 | public LLUUID terrainDetail3 |
340 | { | 356 | { |
341 | get { return m_terrainDetail3; } | 357 | get { return m_terrainDetail3; } |
@@ -347,7 +363,6 @@ namespace OpenSim.Framework | |||
347 | } | 363 | } |
348 | 364 | ||
349 | // First quad - each point is bilinearly interpolated at each meter of terrain | 365 | // First quad - each point is bilinearly interpolated at each meter of terrain |
350 | private float m_terrainStartHeight0; | ||
351 | 366 | ||
352 | public float terrainStartHeight0 | 367 | public float terrainStartHeight0 |
353 | { | 368 | { |
@@ -360,8 +375,6 @@ namespace OpenSim.Framework | |||
360 | } | 375 | } |
361 | 376 | ||
362 | 377 | ||
363 | private float m_terrainStartHeight1; | ||
364 | |||
365 | public float terrainStartHeight1 | 378 | public float terrainStartHeight1 |
366 | { | 379 | { |
367 | get { return m_terrainStartHeight1; } | 380 | get { return m_terrainStartHeight1; } |
@@ -372,8 +385,6 @@ namespace OpenSim.Framework | |||
372 | } | 385 | } |
373 | } | 386 | } |
374 | 387 | ||
375 | private float m_terrainStartHeight2; | ||
376 | |||
377 | public float terrainStartHeight2 | 388 | public float terrainStartHeight2 |
378 | { | 389 | { |
379 | get { return m_terrainStartHeight2; } | 390 | get { return m_terrainStartHeight2; } |
@@ -384,8 +395,6 @@ namespace OpenSim.Framework | |||
384 | } | 395 | } |
385 | } | 396 | } |
386 | 397 | ||
387 | private float m_terrainStartHeight3; | ||
388 | |||
389 | public float terrainStartHeight3 | 398 | public float terrainStartHeight3 |
390 | { | 399 | { |
391 | get { return m_terrainStartHeight3; } | 400 | get { return m_terrainStartHeight3; } |
@@ -399,7 +408,6 @@ namespace OpenSim.Framework | |||
399 | // Second quad - also bilinearly interpolated. | 408 | // Second quad - also bilinearly interpolated. |
400 | // Terrain texturing is done that: | 409 | // Terrain texturing is done that: |
401 | // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y] | 410 | // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y] |
402 | private float m_terrainHeightRange0; | ||
403 | 411 | ||
404 | public float terrainHeightRange0 | 412 | public float terrainHeightRange0 |
405 | { | 413 | { |
@@ -411,8 +419,6 @@ namespace OpenSim.Framework | |||
411 | } | 419 | } |
412 | } | 420 | } |
413 | 421 | ||
414 | private float m_terrainHeightRange1; | ||
415 | |||
416 | public float terrainHeightRange1 | 422 | public float terrainHeightRange1 |
417 | { | 423 | { |
418 | get { return m_terrainHeightRange1; } | 424 | get { return m_terrainHeightRange1; } |
@@ -423,8 +429,6 @@ namespace OpenSim.Framework | |||
423 | } | 429 | } |
424 | } | 430 | } |
425 | 431 | ||
426 | private float m_terrainHeightRange2; | ||
427 | |||
428 | public float terrainHeightRange2 | 432 | public float terrainHeightRange2 |
429 | { | 433 | { |
430 | get { return m_terrainHeightRange2; } | 434 | get { return m_terrainHeightRange2; } |
@@ -435,8 +439,6 @@ namespace OpenSim.Framework | |||
435 | } | 439 | } |
436 | } | 440 | } |
437 | 441 | ||
438 | private float m_terrainHeightRange3; | ||
439 | |||
440 | public float terrainHeightRange3 | 442 | public float terrainHeightRange3 |
441 | { | 443 | { |
442 | get { return m_terrainHeightRange3; } | 444 | get { return m_terrainHeightRange3; } |
@@ -448,7 +450,6 @@ namespace OpenSim.Framework | |||
448 | } | 450 | } |
449 | 451 | ||
450 | // Terrain Default (Must be in F32 Format!) | 452 | // Terrain Default (Must be in F32 Format!) |
451 | private string m_terrainFile; | ||
452 | 453 | ||
453 | public string terrainFile | 454 | public string terrainFile |
454 | { | 455 | { |
@@ -460,8 +461,6 @@ namespace OpenSim.Framework | |||
460 | } | 461 | } |
461 | } | 462 | } |
462 | 463 | ||
463 | private double m_terrainMultiplier; | ||
464 | |||
465 | public double terrainMultiplier | 464 | public double terrainMultiplier |
466 | { | 465 | { |
467 | get { return m_terrainMultiplier; } | 466 | get { return m_terrainMultiplier; } |
@@ -472,8 +471,6 @@ namespace OpenSim.Framework | |||
472 | } | 471 | } |
473 | } | 472 | } |
474 | 473 | ||
475 | private float m_waterHeight; | ||
476 | |||
477 | public float waterHeight | 474 | public float waterHeight |
478 | { | 475 | { |
479 | get { return m_waterHeight; } | 476 | get { return m_waterHeight; } |
@@ -484,8 +481,6 @@ namespace OpenSim.Framework | |||
484 | } | 481 | } |
485 | } | 482 | } |
486 | 483 | ||
487 | private LLUUID m_terrainImageID; | ||
488 | |||
489 | public LLUUID terrainImageID | 484 | public LLUUID terrainImageID |
490 | { | 485 | { |
491 | get { return m_terrainImageID; } | 486 | get { return m_terrainImageID; } |
@@ -501,7 +496,6 @@ namespace OpenSim.Framework | |||
501 | } | 496 | } |
502 | 497 | ||
503 | // Estate name | 498 | // Estate name |
504 | private string m_estateName; | ||
505 | 499 | ||
506 | public string estateName | 500 | public string estateName |
507 | { | 501 | { |
@@ -513,24 +507,14 @@ namespace OpenSim.Framework | |||
513 | } | 507 | } |
514 | } | 508 | } |
515 | 509 | ||
516 | private LLUUID m_estateManager0; | ||
517 | private LLUUID m_estateManager1; | ||
518 | private LLUUID m_estateManager2; | ||
519 | private LLUUID m_estateManager3; | ||
520 | private LLUUID m_estateManager4; | ||
521 | private LLUUID m_estateManager5; | ||
522 | private LLUUID m_estateManager6; | ||
523 | private LLUUID m_estateManager7; | ||
524 | private LLUUID m_estateManager8; | ||
525 | private LLUUID m_estateManager9; | ||
526 | |||
527 | public LLUUID[] estateManagers | 510 | public LLUUID[] estateManagers |
528 | { | 511 | { |
529 | get { | 512 | get |
513 | { | ||
530 | // returns a condensed array of LLUUIDs | 514 | // returns a condensed array of LLUUIDs |
531 | return GetEstateManagers(); | 515 | return GetEstateManagers(); |
532 | } | 516 | } |
533 | set | 517 | set |
534 | { | 518 | { |
535 | // Sets a Condensed array of LLUUIDS | 519 | // Sets a Condensed array of LLUUIDS |
536 | int i = 0; | 520 | int i = 0; |
@@ -611,8 +595,8 @@ namespace OpenSim.Framework | |||
611 | 595 | ||
612 | for (i = 0; i < 10; i++) | 596 | for (i = 0; i < 10; i++) |
613 | { | 597 | { |
614 | // Writes out the Estate managers to the XML file. | 598 | // Writes out the Estate managers to the XML file. |
615 | configMember.forceSetConfigurationOption("estate_manager_" + i, (GetEstateManagerAtPos(i)).ToString()); | 599 | configMember.forceSetConfigurationOption("estate_manager_" + i, (GetEstateManagerAtPos(i)).ToString()); |
616 | } | 600 | } |
617 | } | 601 | } |
618 | } | 602 | } |
@@ -626,37 +610,36 @@ namespace OpenSim.Framework | |||
626 | { | 610 | { |
627 | case 0: | 611 | case 0: |
628 | return m_estateManager0; | 612 | return m_estateManager0; |
629 | 613 | ||
630 | case 1: | 614 | case 1: |
631 | return m_estateManager1; | 615 | return m_estateManager1; |
632 | 616 | ||
633 | case 2: | 617 | case 2: |
634 | return m_estateManager2; | 618 | return m_estateManager2; |
635 | 619 | ||
636 | case 3: | 620 | case 3: |
637 | return m_estateManager3; | 621 | return m_estateManager3; |
638 | 622 | ||
639 | case 4: | 623 | case 4: |
640 | return m_estateManager4; | 624 | return m_estateManager4; |
641 | 625 | ||
642 | case 5: | 626 | case 5: |
643 | return m_estateManager5; | 627 | return m_estateManager5; |
644 | 628 | ||
645 | case 6: | 629 | case 6: |
646 | return m_estateManager6; | 630 | return m_estateManager6; |
647 | 631 | ||
648 | case 7: | 632 | case 7: |
649 | return m_estateManager7; | 633 | return m_estateManager7; |
650 | 634 | ||
651 | case 8: | 635 | case 8: |
652 | return m_estateManager8; | 636 | return m_estateManager8; |
653 | 637 | ||
654 | case 9: | 638 | case 9: |
655 | return m_estateManager9; | 639 | return m_estateManager9; |
656 | 640 | ||
657 | default: | 641 | default: |
658 | return LLUUID.Zero; | 642 | return LLUUID.Zero; |
659 | |||
660 | } | 643 | } |
661 | } | 644 | } |
662 | 645 | ||
@@ -671,8 +654,8 @@ namespace OpenSim.Framework | |||
671 | { | 654 | { |
672 | pos = GetNextEstateManager(pos); | 655 | pos = GetNextEstateManager(pos); |
673 | 656 | ||
674 | rEstateManagers[i] = GetEstateManagerAtPos(pos); pos++; | 657 | rEstateManagers[i] = GetEstateManagerAtPos(pos); |
675 | 658 | pos++; | |
676 | } | 659 | } |
677 | return rEstateManagers; | 660 | return rEstateManagers; |
678 | } | 661 | } |
@@ -681,12 +664,11 @@ namespace OpenSim.Framework | |||
681 | { | 664 | { |
682 | // This is a utility function that skips over estate managers set to LLUUID.Zero | 665 | // This is a utility function that skips over estate managers set to LLUUID.Zero |
683 | int i = startpos; | 666 | int i = startpos; |
684 | for (i=startpos;i<10;i++) | 667 | for (i = startpos; i < 10; i++) |
685 | { | 668 | { |
686 | if (GetEstateManagerAtPos(i) != LLUUID.Zero) return i; | 669 | if (GetEstateManagerAtPos(i) != LLUUID.Zero) return i; |
687 | } | 670 | } |
688 | return i; | 671 | return i; |
689 | |||
690 | } | 672 | } |
691 | 673 | ||
692 | private int GetNumberOfEstateManagers() | 674 | private int GetNumberOfEstateManagers() |
@@ -723,14 +705,13 @@ namespace OpenSim.Framework | |||
723 | 705 | ||
724 | //Saves it to the estate settings file | 706 | //Saves it to the estate settings file |
725 | estateManagers = nestateManagers; | 707 | estateManagers = nestateManagers; |
726 | |||
727 | } | 708 | } |
728 | 709 | ||
729 | public void RemoveEstateManager(LLUUID avatarID) | 710 | public void RemoveEstateManager(LLUUID avatarID) |
730 | { | 711 | { |
731 | int notfoundparam = 11; // starting high so the condense routine (max ten) doesn't run if we don't find it. | 712 | int notfoundparam = 11; // starting high so the condense routine (max ten) doesn't run if we don't find it. |
732 | LLUUID[] testateManagers = GetEstateManagers(); // temporary estate managers list | 713 | LLUUID[] testateManagers = GetEstateManagers(); // temporary estate managers list |
733 | 714 | ||
734 | 715 | ||
735 | int i = 0; | 716 | int i = 0; |
736 | int foundpos = notfoundparam; | 717 | int foundpos = notfoundparam; |
@@ -766,20 +747,6 @@ namespace OpenSim.Framework | |||
766 | 747 | ||
767 | #endregion | 748 | #endregion |
768 | 749 | ||
769 | private ConfigurationMember configMember; | ||
770 | |||
771 | public EstateSettings() | ||
772 | { | ||
773 | // Temporary hack to prevent multiple loadings. | ||
774 | if (configMember == null) | ||
775 | { | ||
776 | configMember = | ||
777 | new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", | ||
778 | loadConfigurationOptions, handleIncomingConfiguration, true); | ||
779 | configMember.performConfigurationRetrieve(); | ||
780 | } | ||
781 | } | ||
782 | |||
783 | public void loadConfigurationOptions() | 750 | public void loadConfigurationOptions() |
784 | { | 751 | { |
785 | configMember.addConfigurationOption("billable_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, | 752 | configMember.addConfigurationOption("billable_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, |
@@ -1010,38 +977,38 @@ namespace OpenSim.Framework | |||
1010 | break; | 977 | break; |
1011 | 978 | ||
1012 | case "estate_manager_0": | 979 | case "estate_manager_0": |
1013 | m_estateManager0 = (LLUUID)configuration_result; | 980 | m_estateManager0 = (LLUUID) configuration_result; |
1014 | break; | 981 | break; |
1015 | case "estate_manager_1": | 982 | case "estate_manager_1": |
1016 | m_estateManager1 = (LLUUID)configuration_result; | 983 | m_estateManager1 = (LLUUID) configuration_result; |
1017 | break; | 984 | break; |
1018 | case "estate_manager_2": | 985 | case "estate_manager_2": |
1019 | m_estateManager2 = (LLUUID)configuration_result; | 986 | m_estateManager2 = (LLUUID) configuration_result; |
1020 | break; | 987 | break; |
1021 | case "estate_manager_3": | 988 | case "estate_manager_3": |
1022 | m_estateManager3 = (LLUUID)configuration_result; | 989 | m_estateManager3 = (LLUUID) configuration_result; |
1023 | break; | 990 | break; |
1024 | case "estate_manager_4": | 991 | case "estate_manager_4": |
1025 | m_estateManager4 = (LLUUID)configuration_result; | 992 | m_estateManager4 = (LLUUID) configuration_result; |
1026 | break; | 993 | break; |
1027 | case "estate_manager_5": | 994 | case "estate_manager_5": |
1028 | m_estateManager5 = (LLUUID)configuration_result; | 995 | m_estateManager5 = (LLUUID) configuration_result; |
1029 | break; | 996 | break; |
1030 | case "estate_manager_6": | 997 | case "estate_manager_6": |
1031 | m_estateManager6 = (LLUUID)configuration_result; | 998 | m_estateManager6 = (LLUUID) configuration_result; |
1032 | break; | 999 | break; |
1033 | case "estate_manager_7": | 1000 | case "estate_manager_7": |
1034 | m_estateManager7 = (LLUUID)configuration_result; | 1001 | m_estateManager7 = (LLUUID) configuration_result; |
1035 | break; | 1002 | break; |
1036 | case "estate_manager_8": | 1003 | case "estate_manager_8": |
1037 | m_estateManager8 = (LLUUID)configuration_result; | 1004 | m_estateManager8 = (LLUUID) configuration_result; |
1038 | break; | 1005 | break; |
1039 | case "estate_manager_9": | 1006 | case "estate_manager_9": |
1040 | m_estateManager9 = (LLUUID)configuration_result; | 1007 | m_estateManager9 = (LLUUID) configuration_result; |
1041 | break; | 1008 | break; |
1042 | } | 1009 | } |
1043 | 1010 | ||
1044 | return true; | 1011 | return true; |
1045 | } | 1012 | } |
1046 | } | 1013 | } |
1047 | } | 1014 | } \ No newline at end of file |