diff options
author | Melanie | 2012-09-16 04:11:20 +0100 |
---|---|---|
committer | Melanie | 2012-09-16 04:11:20 +0100 |
commit | db774d4292588db1e2ac4a9fafe977ddbec353ee (patch) | |
tree | 5fc381d7cb96cc0d2b47e4807821f488c339ec13 /OpenSim/Region/Framework/Scenes/EventManager.cs | |
parent | Merge branch 'avination' into careminster (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-db774d4292588db1e2ac4a9fafe977ddbec353ee.zip opensim-SC_OLD-db774d4292588db1e2ac4a9fafe977ddbec353ee.tar.gz opensim-SC_OLD-db774d4292588db1e2ac4a9fafe977ddbec353ee.tar.bz2 opensim-SC_OLD-db774d4292588db1e2ac4a9fafe977ddbec353ee.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
OpenSim/Region/Framework/Scenes/EventManager.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 137 |
1 files changed, 132 insertions, 5 deletions
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 | { |