aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-07 00:04:24 +0000
committerJustin Clark-Casey (justincc)2012-03-19 21:26:32 +0000
commit7e4bd492fd3042c33b4da67cd59ad5c4d3d3a501 (patch)
treef3a030323f7063afb09210fa1f448daac6f3b7a1 /OpenSim
parentRemove unnecessary explicit ElapsedEventHandler in SimReporter (diff)
downloadopensim-SC_OLD-7e4bd492fd3042c33b4da67cd59ad5c4d3d3a501.zip
opensim-SC_OLD-7e4bd492fd3042c33b4da67cd59ad5c4d3d3a501.tar.gz
opensim-SC_OLD-7e4bd492fd3042c33b4da67cd59ad5c4d3d3a501.tar.bz2
opensim-SC_OLD-7e4bd492fd3042c33b4da67cd59ad5c4d3d3a501.tar.xz
Add documentation to make more explicit the difference between OnRezScript and OnNewScript in the event manager
OnNewScript fires when a script is added to a scene OnRezScript fires when the script actually runs (i.e. after permission checks, state retrieval, etc.)
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs25
1 files changed, 20 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 569c235..6ff2a6f 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -138,8 +138,11 @@ namespace OpenSim.Region.Framework.Scenes
138 public event OnPermissionErrorDelegate OnPermissionError; 138 public event OnPermissionErrorDelegate OnPermissionError;
139 139
140 /// <summary> 140 /// <summary>
141 /// Fired when a new script is created. 141 /// Fired when a script is run.
142 /// </summary> 142 /// </summary>
143 /// <remarks>
144 /// Occurs after OnNewScript.
145 /// </remarks>
143 public event NewRezScript OnRezScript; 146 public event NewRezScript OnRezScript;
144 public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource); 147 public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource);
145 148
@@ -187,10 +190,16 @@ namespace OpenSim.Region.Framework.Scenes
187 190
188 public event ClientClosed OnClientClosed; 191 public event ClientClosed OnClientClosed;
189 192
190 // Fired when a script is created
191 // The indication that a new script exists in this region.
192 public delegate void NewScript(UUID clientID, SceneObjectPart part, UUID itemID); 193 public delegate void NewScript(UUID clientID, SceneObjectPart part, UUID itemID);
194
195 /// <summary>
196 /// Fired when a script is created.
197 /// </summary>
198 /// <remarks>
199 /// Occurs before OnRezScript
200 /// </remarks>
193 public event NewScript OnNewScript; 201 public event NewScript OnNewScript;
202
194 public virtual void TriggerNewScript(UUID clientID, SceneObjectPart part, UUID itemID) 203 public virtual void TriggerNewScript(UUID clientID, SceneObjectPart part, UUID itemID)
195 { 204 {
196 NewScript handlerNewScript = OnNewScript; 205 NewScript handlerNewScript = OnNewScript;
@@ -212,10 +221,16 @@ namespace OpenSim.Region.Framework.Scenes
212 } 221 }
213 } 222 }
214 223
215 //TriggerUpdateScript: triggered after Scene receives client's upload of updated script and stores it as asset
216 // An indication that the script has changed.
217 public delegate void UpdateScript(UUID clientID, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID); 224 public delegate void UpdateScript(UUID clientID, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID);
225
226 /// <summary>
227 /// An indication that the script has changed.
228 /// </summary>
229 /// <remarks>
230 /// Triggered after the scene receives a client's upload of an updated script and has stored it in an asset.
231 /// </remarks>
218 public event UpdateScript OnUpdateScript; 232 public event UpdateScript OnUpdateScript;
233
219 public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID) 234 public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID)
220 { 235 {
221 UpdateScript handlerUpdateScript = OnUpdateScript; 236 UpdateScript handlerUpdateScript = OnUpdateScript;