aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorunknown2009-12-09 01:34:26 +0100
committerunknown2009-12-09 01:34:26 +0100
commite3f229225c5a1506090bfcffcce6d423a566f1fe (patch)
tree8890b3404d3ca2045e6bb6ceb433069b60d77de0 /OpenSim/Region/Framework
parentMerge branch 'careminster' into windlight (diff)
downloadopensim-SC_OLD-e3f229225c5a1506090bfcffcce6d423a566f1fe.zip
opensim-SC_OLD-e3f229225c5a1506090bfcffcce6d423a566f1fe.tar.gz
opensim-SC_OLD-e3f229225c5a1506090bfcffcce6d423a566f1fe.tar.bz2
opensim-SC_OLD-e3f229225c5a1506090bfcffcce6d423a566f1fe.tar.xz
Enable scripting interface for windlight
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs4
4 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs
index 225cc9a..7312799 100644
--- a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs
+++ b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs
@@ -104,6 +104,7 @@ namespace OpenSim.Region.Framework.Interfaces
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); 106 RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID);
107 void StoreRegionWindlightSettings(RegionMeta7WindlightData wl);
107 108
108 void Shutdown(); 109 void Shutdown();
109 } 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 8d91d65..475d775 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1505,6 +1505,13 @@ namespace OpenSim.Region.Framework.Scenes
1505 m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); 1505 m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID);
1506 } 1506 }
1507 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
1508 /// <summary> 1515 /// <summary>
1509 /// Loads the World heightmap 1516 /// Loads the World heightmap
1510 /// </summary> 1517 /// </summary>
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
index e8cda60..5abbb82 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
@@ -107,6 +107,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests
107 //Return default LL windlight settings 107 //Return default LL windlight settings
108 return new RegionMeta7WindlightData(); 108 return new RegionMeta7WindlightData();
109 } 109 }
110 public void StoreRegionWindlightSettings(RegionMeta7WindlightData wl)
111 {
112 //This connector doesn't support the windlight module yet
113 }
110 public RegionSettings LoadRegionSettings(UUID regionUUID) 114 public RegionSettings LoadRegionSettings(UUID regionUUID)
111 { 115 {
112 return null; 116 return null;