diff options
author | Melanie | 2012-08-15 18:22:16 +0200 |
---|---|---|
committer | Melanie | 2012-08-15 18:58:39 +0100 |
commit | c27ff70d5c9c7f91ff63b197359de84f7508ec60 (patch) | |
tree | 9c32da6e9bd392bc0a254f87e03d7cf1d6858ef2 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Fix and finish the extra parameters storage system for MySQL (diff) | |
download | opensim-SC_OLD-c27ff70d5c9c7f91ff63b197359de84f7508ec60.zip opensim-SC_OLD-c27ff70d5c9c7f91ff63b197359de84f7508ec60.tar.gz opensim-SC_OLD-c27ff70d5c9c7f91ff63b197359de84f7508ec60.tar.bz2 opensim-SC_OLD-c27ff70d5c9c7f91ff63b197359de84f7508ec60.tar.xz |
Add support for the extra params to scene and the event manager
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 59f49ea..0e5ddfd 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -5447,5 +5447,44 @@ namespace OpenSim.Region.Framework.Scenes | |||
5447 | 5447 | ||
5448 | callback(asset); | 5448 | callback(asset); |
5449 | } | 5449 | } |
5450 | |||
5451 | public string GetExtraSetting(string name) | ||
5452 | { | ||
5453 | string val; | ||
5454 | |||
5455 | if (!m_extraSettings.TryGetValue(name, out val)) | ||
5456 | return String.Empty; | ||
5457 | |||
5458 | return val; | ||
5459 | } | ||
5460 | |||
5461 | public void StoreExtraSetting(string name, string val) | ||
5462 | { | ||
5463 | string oldVal; | ||
5464 | |||
5465 | if (m_extraSettings.TryGetValue(name, out oldVal)) | ||
5466 | { | ||
5467 | if (oldVal == val) | ||
5468 | return; | ||
5469 | } | ||
5470 | |||
5471 | m_extraSettings[name] = val; | ||
5472 | |||
5473 | m_SimulationDataService.SaveExtra(RegionInfo.RegionID, name, val); | ||
5474 | |||
5475 | m_eventManager.TriggerExtraSettingChanged(this, name, val); | ||
5476 | } | ||
5477 | |||
5478 | public void RemoveExtraSetting(string name) | ||
5479 | { | ||
5480 | if (!m_extraSettings.ContainsKey(name)) | ||
5481 | return; | ||
5482 | |||
5483 | m_extraSettings.Remove(name); | ||
5484 | |||
5485 | m_SimulationDataService.RemoveExtra(RegionInfo.RegionID, name); | ||
5486 | |||
5487 | m_eventManager.TriggerExtraSettingChanged(this, name, String.Empty); | ||
5488 | } | ||
5450 | } | 5489 | } |
5451 | } | 5490 | } |