diff options
author | Melanie | 2009-12-09 16:57:35 +0000 |
---|---|---|
committer | Melanie | 2009-12-09 16:57:35 +0000 |
commit | 2e9890bbe6343c5811e6f21223e7f0e5cc2dab2a (patch) | |
tree | ccd2cf3ac694ae28f27d0949bc761b8c6314ef99 /OpenSim/Region/Framework | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Last bits and bobs to clean up the Meta7WindlightModule (diff) | |
download | opensim-SC-2e9890bbe6343c5811e6f21223e7f0e5cc2dab2a.zip opensim-SC-2e9890bbe6343c5811e6f21223e7f0e5cc2dab2a.tar.gz opensim-SC-2e9890bbe6343c5811e6f21223e7f0e5cc2dab2a.tar.bz2 opensim-SC-2e9890bbe6343c5811e6f21223e7f0e5cc2dab2a.tar.xz |
Merge branch 'careminster' of kitto@tor.k-grid.com:/home/kitto/opensim into careminster
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs | 11 |
4 files changed, 39 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs index 78bd622..7312799 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs | |||
@@ -103,6 +103,8 @@ namespace OpenSim.Region.Framework.Interfaces | |||
103 | 103 | ||
104 | void StoreRegionSettings(RegionSettings rs); | 104 | void StoreRegionSettings(RegionSettings rs); |
105 | RegionSettings LoadRegionSettings(UUID regionUUID); | 105 | RegionSettings LoadRegionSettings(UUID regionUUID); |
106 | RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID); | ||
107 | void StoreRegionWindlightSettings(RegionMeta7WindlightData wl); | ||
106 | 108 | ||
107 | void Shutdown(); | 109 | void Shutdown(); |
108 | } | 110 | } |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 753344d..a86e263 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -193,7 +193,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
193 | public event OnMakeChildAgentDelegate OnMakeChildAgent; | 193 | public event OnMakeChildAgentDelegate OnMakeChildAgent; |
194 | 194 | ||
195 | public delegate void OnMakeRootAgentDelegate(ScenePresence presence); | 195 | public delegate void OnMakeRootAgentDelegate(ScenePresence presence); |
196 | public delegate void OnSaveNewWindlightProfileDelegate(); | ||
196 | public event OnMakeRootAgentDelegate OnMakeRootAgent; | 197 | public event OnMakeRootAgentDelegate OnMakeRootAgent; |
198 | public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile; | ||
197 | 199 | ||
198 | public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel); | 200 | public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel); |
199 | 201 | ||
@@ -411,6 +413,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
411 | private IncomingInstantMessage handlerUnhandledInstantMessage = null; //OnUnhandledInstantMessage; | 413 | private IncomingInstantMessage handlerUnhandledInstantMessage = null; //OnUnhandledInstantMessage; |
412 | private ClientClosed handlerClientClosed = null; //OnClientClosed; | 414 | private ClientClosed handlerClientClosed = null; //OnClientClosed; |
413 | private OnMakeChildAgentDelegate handlerMakeChildAgent = null; //OnMakeChildAgent; | 415 | private OnMakeChildAgentDelegate handlerMakeChildAgent = null; //OnMakeChildAgent; |
416 | private OnSaveNewWindlightProfileDelegate handlerSaveNewWindlightProfile = null; //OnSaveNewWindlightProfile; | ||
414 | private OnMakeRootAgentDelegate handlerMakeRootAgent = null; //OnMakeRootAgent; | 417 | private OnMakeRootAgentDelegate handlerMakeRootAgent = null; //OnMakeRootAgent; |
415 | private OnTerrainTickDelegate handlerTerrainTick = null; // OnTerainTick; | 418 | private OnTerrainTickDelegate handlerTerrainTick = null; // OnTerainTick; |
416 | private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps; | 419 | private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps; |
@@ -772,6 +775,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
772 | } | 775 | } |
773 | } | 776 | } |
774 | 777 | ||
778 | public void TriggerOnSaveNewWindlightProfile() | ||
779 | { | ||
780 | handlerSaveNewWindlightProfile = OnSaveNewWindlightProfile; | ||
781 | if (handlerSaveNewWindlightProfile != null) | ||
782 | { | ||
783 | handlerSaveNewWindlightProfile(); | ||
784 | } | ||
785 | } | ||
786 | |||
775 | public void TriggerOnMakeRootAgent(ScenePresence presence) | 787 | public void TriggerOnMakeRootAgent(ScenePresence presence) |
776 | { | 788 | { |
777 | handlerMakeRootAgent = OnMakeRootAgent; | 789 | handlerMakeRootAgent = OnMakeRootAgent; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a8bab5a..1b275b0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -539,6 +539,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
539 | 539 | ||
540 | // Load region settings | 540 | // Load region settings |
541 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); | 541 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); |
542 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID); | ||
543 | |||
542 | if (m_storageManager.EstateDataStore != null) | 544 | if (m_storageManager.EstateDataStore != null) |
543 | { | 545 | { |
544 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); | 546 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); |
@@ -1502,6 +1504,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1502 | { | 1504 | { |
1503 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); | 1505 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); |
1504 | } | 1506 | } |
1507 | |||
1508 | public void StoreWindlightProfile(RegionMeta7WindlightData wl) | ||
1509 | { | ||
1510 | m_regInfo.WindlightSettings = wl; | ||
1511 | m_storageManager.DataStore.StoreRegionWindlightSettings(wl); | ||
1512 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | ||
1513 | } | ||
1514 | |||
1515 | public void LoadWindlightProfile() | ||
1516 | { | ||
1517 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(RegionInfo.RegionID); | ||
1518 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | ||
1519 | } | ||
1505 | 1520 | ||
1506 | /// <summary> | 1521 | /// <summary> |
1507 | /// Loads the World heightmap | 1522 | /// Loads the World heightmap |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs index 8a27b7b..5abbb82 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs | |||
@@ -101,7 +101,16 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
101 | { | 101 | { |
102 | throw new NotImplementedException(); | 102 | throw new NotImplementedException(); |
103 | } | 103 | } |
104 | 104 | public RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID) | |
105 | { | ||
106 | //This connector doesn't support the windlight module yet | ||
107 | //Return default LL windlight settings | ||
108 | return new RegionMeta7WindlightData(); | ||
109 | } | ||
110 | public void StoreRegionWindlightSettings(RegionMeta7WindlightData wl) | ||
111 | { | ||
112 | //This connector doesn't support the windlight module yet | ||
113 | } | ||
105 | public RegionSettings LoadRegionSettings(UUID regionUUID) | 114 | public RegionSettings LoadRegionSettings(UUID regionUUID) |
106 | { | 115 | { |
107 | return null; | 116 | return null; |