diff options
Diffstat (limited to 'OpenSim/Region/Framework')
5 files changed, 150 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs index ca2ad94..292efa4 100644 --- a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs | |||
@@ -46,6 +46,10 @@ namespace OpenSim.Region.Framework.Interfaces | |||
46 | /// </summary> | 46 | /// </summary> |
47 | void sendRegionHandshakeToAll(); | 47 | void sendRegionHandshakeToAll(); |
48 | void TriggerEstateInfoChange(); | 48 | void TriggerEstateInfoChange(); |
49 | |||
50 | /// <summary> | ||
51 | /// Fires the OnRegionInfoChange event. | ||
52 | /// </summary> | ||
49 | void TriggerRegionInfoChange(); | 53 | void TriggerRegionInfoChange(); |
50 | 54 | ||
51 | void setEstateTerrainBaseTexture(int level, UUID texture); | 55 | void setEstateTerrainBaseTexture(int level, UUID texture); |
diff --git a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs index baac6e8..da39e95 100644 --- a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs | |||
@@ -35,7 +35,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
35 | 35 | ||
36 | public interface IJsonStoreModule | 36 | public interface IJsonStoreModule |
37 | { | 37 | { |
38 | bool CreateStore(string value, out UUID result); | 38 | bool CreateStore(string value, ref UUID result); |
39 | bool DestroyStore(UUID storeID); | 39 | bool DestroyStore(UUID storeID); |
40 | bool TestPath(UUID storeID, string path, bool useJson); | 40 | bool TestPath(UUID storeID, string path, bool useJson); |
41 | bool SetValue(UUID storeID, string path, string value, bool useJson); | 41 | bool SetValue(UUID storeID, string path, string value, bool useJson); |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index eee5960..e257b57 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -47,30 +47,75 @@ namespace OpenSim.Region.Framework.Scenes | |||
47 | 47 | ||
48 | public delegate void OnFrameDelegate(); | 48 | public delegate void OnFrameDelegate(); |
49 | 49 | ||
50 | /// <summary> | ||
51 | /// Triggered on each sim frame. | ||
52 | /// </summary> | ||
53 | /// <remarks> | ||
54 | /// This gets triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.Update"/> | ||
55 | /// Core uses it for things like Sun, Wind & Clouds | ||
56 | /// The MRM module also uses it. | ||
57 | /// </remarks> | ||
50 | public event OnFrameDelegate OnFrame; | 58 | public event OnFrameDelegate OnFrame; |
51 | 59 | ||
52 | public delegate void ClientMovement(ScenePresence client); | 60 | public delegate void ClientMovement(ScenePresence client); |
53 | 61 | ||
62 | /// <summary> | ||
63 | /// Trigerred when an agent moves. | ||
64 | /// </summary> | ||
65 | /// <remarks> | ||
66 | /// This gets triggered in <see cref="OpenSim.Region.Framework.Scenes.ScenePresence.HandleAgentUpdate"/> | ||
67 | /// prior to <see cref="OpenSim.Region.Framework.Scenes.ScenePresence.TriggerScenePresenceUpdated"/> | ||
68 | /// </remarks> | ||
54 | public event ClientMovement OnClientMovement; | 69 | public event ClientMovement OnClientMovement; |
55 | 70 | ||
56 | public delegate void OnTerrainTaintedDelegate(); | 71 | public delegate void OnTerrainTaintedDelegate(); |
57 | 72 | ||
73 | /// <summary> | ||
74 | /// Triggered if the terrain has been edited | ||
75 | /// </summary> | ||
76 | /// <remarks> | ||
77 | /// This gets triggered in <see cref="OpenSim.Region.CoreModules.World.Terrain.CheckForTerrainUpdates"/> | ||
78 | /// after it determines that an update has been made. | ||
79 | /// </remarks> | ||
58 | public event OnTerrainTaintedDelegate OnTerrainTainted; | 80 | public event OnTerrainTaintedDelegate OnTerrainTainted; |
59 | 81 | ||
60 | public delegate void OnTerrainTickDelegate(); | 82 | public delegate void OnTerrainTickDelegate(); |
61 | 83 | ||
62 | public delegate void OnTerrainUpdateDelegate(); | 84 | /// <summary> |
63 | 85 | /// Triggered if the terrain has been edited | |
86 | /// </summary> | ||
87 | /// <remarks> | ||
88 | /// This gets triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.UpdateTerrain"/> | ||
89 | /// but is used by core solely to update the physics engine. | ||
90 | /// </remarks> | ||
64 | public event OnTerrainTickDelegate OnTerrainTick; | 91 | public event OnTerrainTickDelegate OnTerrainTick; |
65 | 92 | ||
93 | public delegate void OnTerrainUpdateDelegate(); | ||
94 | |||
66 | public event OnTerrainUpdateDelegate OnTerrainUpdate; | 95 | public event OnTerrainUpdateDelegate OnTerrainUpdate; |
67 | 96 | ||
68 | public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup); | 97 | public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup); |
69 | 98 | ||
99 | /// <summary> | ||
100 | /// Triggered when a region is backed up/persisted to storage | ||
101 | /// </summary> | ||
102 | /// <remarks> | ||
103 | /// This gets triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.Backup"/> | ||
104 | /// and is fired before the persistence occurs. | ||
105 | /// </remarks> | ||
70 | public event OnBackupDelegate OnBackup; | 106 | public event OnBackupDelegate OnBackup; |
71 | 107 | ||
72 | public delegate void OnClientConnectCoreDelegate(IClientCore client); | 108 | public delegate void OnClientConnectCoreDelegate(IClientCore client); |
73 | 109 | ||
110 | /// <summary> | ||
111 | /// Triggered when a new client connects to the scene. | ||
112 | /// </summary> | ||
113 | /// <remarks> | ||
114 | /// This gets triggered in <see cref="TriggerOnNewClient"/>, | ||
115 | /// which checks if an instance of <see cref="OpenSim.Framework.IClientAPI"/> | ||
116 | /// also implements <see cref="OpenSim.Framework.Client.IClientCore"/> and as such, | ||
117 | /// is not triggered by <see cref="OpenSim.Region.OptionalModules.World.NPC">NPCs</see>. | ||
118 | /// </remarks> | ||
74 | public event OnClientConnectCoreDelegate OnClientConnect; | 119 | public event OnClientConnectCoreDelegate OnClientConnect; |
75 | 120 | ||
76 | public delegate void OnNewClientDelegate(IClientAPI client); | 121 | public delegate void OnNewClientDelegate(IClientAPI client); |
@@ -91,18 +136,54 @@ namespace OpenSim.Region.Framework.Scenes | |||
91 | 136 | ||
92 | public delegate void OnNewPresenceDelegate(ScenePresence presence); | 137 | public delegate void OnNewPresenceDelegate(ScenePresence presence); |
93 | 138 | ||
139 | /// <summary> | ||
140 | /// Triggered when a new presence is added to the scene | ||
141 | /// </summary> | ||
142 | /// <remarks> | ||
143 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> which is used by both | ||
144 | /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> | ||
145 | /// </remarks> | ||
94 | public event OnNewPresenceDelegate OnNewPresence; | 146 | public event OnNewPresenceDelegate OnNewPresence; |
95 | 147 | ||
96 | public delegate void OnRemovePresenceDelegate(UUID agentId); | 148 | public delegate void OnRemovePresenceDelegate(UUID agentId); |
97 | 149 | ||
150 | /// <summary> | ||
151 | /// Triggered when a presence is removed from the scene | ||
152 | /// </summary> | ||
153 | /// <remarks> | ||
154 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> which is used by both | ||
155 | /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> | ||
156 | /// </remarks> | ||
98 | public event OnRemovePresenceDelegate OnRemovePresence; | 157 | public event OnRemovePresenceDelegate OnRemovePresence; |
99 | 158 | ||
100 | public delegate void OnParcelPrimCountUpdateDelegate(); | 159 | public delegate void OnParcelPrimCountUpdateDelegate(); |
101 | 160 | ||
161 | /// <summary> | ||
162 | /// Triggered whenever the prim count may have been altered, or prior | ||
163 | /// to an action that requires the current prim count to be accurate. | ||
164 | /// </summary> | ||
165 | /// <remarks> | ||
166 | /// Triggered by <see cref="TriggerParcelPrimCountUpdate"/> in | ||
167 | /// <see cref="OpenSim.OpenSimBase.CreateRegion"/>, | ||
168 | /// <see cref="OpenSim.Region.CoreModules.World.Land.LandManagementModule.EventManagerOnRequestParcelPrimCountUpdate"/>, | ||
169 | /// <see cref="OpenSim.Region.CoreModules.World.Land.LandManagementModule.ClientOnParcelObjectOwnerRequest"/>, | ||
170 | /// <see cref="OpenSim.Region.CoreModules.World.Land.LandObject.GetPrimsFree"/>, | ||
171 | /// <see cref="OpenSim.Region.CoreModules.World.Land.LandObject.UpdateLandSold"/>, | ||
172 | /// <see cref="OpenSim.Region.CoreModules.World.Land.LandObject.DeedToGroup"/>, | ||
173 | /// <see cref="OpenSim.Region.CoreModules.World.Land.LandObject.SendLandUpdateToClient"/> | ||
174 | /// </remarks> | ||
102 | public event OnParcelPrimCountUpdateDelegate OnParcelPrimCountUpdate; | 175 | public event OnParcelPrimCountUpdateDelegate OnParcelPrimCountUpdate; |
103 | 176 | ||
104 | public delegate void OnParcelPrimCountAddDelegate(SceneObjectGroup obj); | 177 | public delegate void OnParcelPrimCountAddDelegate(SceneObjectGroup obj); |
105 | 178 | ||
179 | /// <summary> | ||
180 | /// Triggered in response to <see cref="OnParcelPrimCountUpdate"/> for | ||
181 | /// objects that actually contribute to parcel prim count. | ||
182 | /// </summary> | ||
183 | /// <remarks> | ||
184 | /// Triggered by <see cref="TriggerParcelPrimCountAdd"/> in | ||
185 | /// <see cref="OpenSim.Region.CoreModules.World.Land.LandManagementModule.EventManagerOnParcelPrimCountUpdate"/> | ||
186 | /// </remarks> | ||
106 | public event OnParcelPrimCountAddDelegate OnParcelPrimCountAdd; | 187 | public event OnParcelPrimCountAddDelegate OnParcelPrimCountAdd; |
107 | 188 | ||
108 | public delegate void OnPluginConsoleDelegate(string[] args); | 189 | public delegate void OnPluginConsoleDelegate(string[] args); |
@@ -123,6 +204,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
123 | 204 | ||
124 | public event OnSetRootAgentSceneDelegate OnSetRootAgentScene; | 205 | public event OnSetRootAgentSceneDelegate OnSetRootAgentScene; |
125 | 206 | ||
207 | /// <summary> | ||
208 | /// Triggered after parcel properties have been updated. | ||
209 | /// </summary> | ||
210 | /// <remarks> | ||
211 | /// Triggered by <see cref="TriggerOnParcelPropertiesUpdateRequest"/> in | ||
212 | /// <see cref="OpenSim.Region.CoreModules.World.Land.LandManagementModule.ClientOnParcelPropertiesUpdateRequest"/>, | ||
213 | /// <see cref="OpenSim.Region.CoreModules.World.Land.LandManagementModule.ProcessPropertiesUpdate"/> | ||
214 | /// </remarks> | ||
126 | public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; | 215 | public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; |
127 | 216 | ||
128 | /// <summary> | 217 | /// <summary> |
@@ -373,6 +462,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
373 | public event RequestParcelPrimCountUpdate OnRequestParcelPrimCountUpdate; | 462 | public event RequestParcelPrimCountUpdate OnRequestParcelPrimCountUpdate; |
374 | 463 | ||
375 | public delegate void ParcelPrimCountTainted(); | 464 | public delegate void ParcelPrimCountTainted(); |
465 | |||
466 | /// <summary> | ||
467 | /// Triggered when the parcel prim count has been altered. | ||
468 | /// </summary> | ||
469 | /// <remarks> | ||
470 | /// Triggered by <see cref="TriggerParcelPrimCountTainted"/> in | ||
471 | /// <see cref="OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.DetachSingleAttachmentToGround"/>, | ||
472 | /// <see cref="OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.AttachToAgent"/>, | ||
473 | /// <see cref="Scene.DeleteSceneObject"/>, | ||
474 | /// <see cref="Scene.SelectPrim"/>, | ||
475 | /// <see cref="Scene.DeselectPrim"/>, | ||
476 | /// <see cref="SceneObjectGroup.UpdatePrimFlags"/>, | ||
477 | /// <see cref="SceneObjectGroup.AbsolutePosition"/> | ||
478 | /// </remarks> | ||
376 | public event ParcelPrimCountTainted OnParcelPrimCountTainted; | 479 | public event ParcelPrimCountTainted OnParcelPrimCountTainted; |
377 | public event GetScriptRunning OnGetScriptRunning; | 480 | public event GetScriptRunning OnGetScriptRunning; |
378 | 481 | ||
@@ -432,7 +535,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
432 | /// the scripts may not have started yet | 535 | /// the scripts may not have started yet |
433 | /// Message is non empty string if there were problems loading the oar file | 536 | /// Message is non empty string if there were problems loading the oar file |
434 | /// </summary> | 537 | /// </summary> |
435 | public delegate void OarFileLoaded(Guid guid, string message); | 538 | public delegate void OarFileLoaded(Guid guid, List<UUID> loadedScenes, string message); |
436 | public event OarFileLoaded OnOarFileLoaded; | 539 | public event OarFileLoaded OnOarFileLoaded; |
437 | 540 | ||
438 | /// <summary> | 541 | /// <summary> |
@@ -485,6 +588,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
485 | /// <param name="copy"></param> | 588 | /// <param name="copy"></param> |
486 | /// <param name="original"></param> | 589 | /// <param name="original"></param> |
487 | /// <param name="userExposed">True if the duplicate will immediately be in the scene, false otherwise</param> | 590 | /// <param name="userExposed">True if the duplicate will immediately be in the scene, false otherwise</param> |
591 | /// <remarks> | ||
592 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.SceneObjectPart.Copy"/> | ||
593 | /// </remarks> | ||
488 | public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy; | 594 | public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy; |
489 | public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); | 595 | public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); |
490 | 596 | ||
@@ -593,8 +699,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
593 | 699 | ||
594 | public delegate void LandBuy(Object sender, LandBuyArgs e); | 700 | public delegate void LandBuy(Object sender, LandBuyArgs e); |
595 | 701 | ||
702 | /// <summary> | ||
703 | /// Triggered when an attempt to transfer grid currency occurs | ||
704 | /// </summary> | ||
705 | /// <remarks> | ||
706 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.ProcessMoneyTransferRequest"/> | ||
707 | /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.SubscribeToClientGridEvents"/> | ||
708 | /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.SubscribeToClientEvents"/> | ||
709 | /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> | ||
710 | /// </remarks> | ||
596 | public event MoneyTransferEvent OnMoneyTransfer; | 711 | public event MoneyTransferEvent OnMoneyTransfer; |
712 | |||
713 | /// <summary> | ||
714 | /// Triggered after after <see cref="OnValidateLandBuy"/> | ||
715 | /// </summary> | ||
597 | public event LandBuy OnLandBuy; | 716 | public event LandBuy OnLandBuy; |
717 | |||
718 | /// <summary> | ||
719 | /// Triggered to allow or prevent a real estate transaction | ||
720 | /// </summary> | ||
721 | /// <remarks> | ||
722 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.ProcessParcelBuy"/> | ||
723 | /// <seealso cref="OpenSim.Region.OptionalModules.World.MoneyModule.SampleMoneyModule.ValidateLandBuy"/> | ||
724 | /// </remarks> | ||
598 | public event LandBuy OnValidateLandBuy; | 725 | public event LandBuy OnValidateLandBuy; |
599 | 726 | ||
600 | public void TriggerOnAttach(uint localID, UUID itemID, UUID avatarID) | 727 | public void TriggerOnAttach(uint localID, UUID itemID, UUID avatarID) |
@@ -2093,7 +2220,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2093 | return 6; | 2220 | return 6; |
2094 | } | 2221 | } |
2095 | 2222 | ||
2096 | public void TriggerOarFileLoaded(Guid requestId, string message) | 2223 | public void TriggerOarFileLoaded(Guid requestId, List<UUID> loadedScenes, string message) |
2097 | { | 2224 | { |
2098 | OarFileLoaded handlerOarFileLoaded = OnOarFileLoaded; | 2225 | OarFileLoaded handlerOarFileLoaded = OnOarFileLoaded; |
2099 | if (handlerOarFileLoaded != null) | 2226 | if (handlerOarFileLoaded != null) |
@@ -2102,7 +2229,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2102 | { | 2229 | { |
2103 | try | 2230 | try |
2104 | { | 2231 | { |
2105 | d(requestId, message); | 2232 | d(requestId, loadedScenes, message); |
2106 | } | 2233 | } |
2107 | catch (Exception e) | 2234 | catch (Exception e) |
2108 | { | 2235 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index f1b09ca..dba3a61 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs | |||
@@ -92,7 +92,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
92 | private static SceneManager m_instance = null; | 92 | private static SceneManager m_instance = null; |
93 | public static SceneManager Instance | 93 | public static SceneManager Instance |
94 | { | 94 | { |
95 | get { return m_instance; } | 95 | get { |
96 | if (m_instance == null) | ||
97 | m_instance = new SceneManager(); | ||
98 | return m_instance; | ||
99 | } | ||
96 | } | 100 | } |
97 | 101 | ||
98 | private readonly DoubleDictionary<UUID, string, Scene> m_localScenes = new DoubleDictionary<UUID, string, Scene>(); | 102 | private readonly DoubleDictionary<UUID, string, Scene> m_localScenes = new DoubleDictionary<UUID, string, Scene>(); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 18e74c1..f1df6d6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2750,13 +2750,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2750 | m_scene.m_linksetCapacity) | 2750 | m_scene.m_linksetCapacity) |
2751 | { | 2751 | { |
2752 | m_log.DebugFormat( | 2752 | m_log.DebugFormat( |
2753 | "[SCENE OBJECT GROUP]: Cannot link group with root" + | 2753 | "[SCENE OBJECT GROUP]: Cannot link group with root" + |
2754 | " part {0}, {1} ({2} prims) to group with root part" + | 2754 | " part {0}, {1} ({2} prims) to group with root part" + |
2755 | " {3}, {4} ({5} prims) because the new linkset" + | 2755 | " {3}, {4} ({5} prims) because the new linkset" + |
2756 | " would exceed the configured maximum of {6}", | 2756 | " would exceed the configured maximum of {6}", |
2757 | objectGroup.RootPart.Name, objectGroup.RootPart.UUID, | 2757 | objectGroup.RootPart.Name, objectGroup.RootPart.UUID, |
2758 | objectGroup.PrimCount, RootPart.Name, RootPart.UUID, | 2758 | objectGroup.PrimCount, RootPart.Name, RootPart.UUID, |
2759 | PrimCount, m_scene.m_linksetCapacity); | 2759 | PrimCount, m_scene.m_linksetCapacity); |
2760 | |||
2760 | return; | 2761 | return; |
2761 | } | 2762 | } |
2762 | 2763 | ||