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.)
0.7.3-post-fixes
Justin Clark-Casey (justincc) 2012-03-07 00:04:24 +00:00
parent 588d56503d
commit 7e4bd492fd
1 changed files with 20 additions and 5 deletions

View File

@ -138,8 +138,11 @@ namespace OpenSim.Region.Framework.Scenes
public event OnPermissionErrorDelegate OnPermissionError;
/// <summary>
/// Fired when a new script is created.
/// Fired when a script is run.
/// </summary>
/// <remarks>
/// Occurs after OnNewScript.
/// </remarks>
public event NewRezScript OnRezScript;
public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource);
@ -187,10 +190,16 @@ namespace OpenSim.Region.Framework.Scenes
public event ClientClosed OnClientClosed;
// Fired when a script is created
// The indication that a new script exists in this region.
public delegate void NewScript(UUID clientID, SceneObjectPart part, UUID itemID);
/// <summary>
/// Fired when a script is created.
/// </summary>
/// <remarks>
/// Occurs before OnRezScript
/// </remarks>
public event NewScript OnNewScript;
public virtual void TriggerNewScript(UUID clientID, SceneObjectPart part, UUID itemID)
{
NewScript handlerNewScript = OnNewScript;
@ -212,10 +221,16 @@ namespace OpenSim.Region.Framework.Scenes
}
}
//TriggerUpdateScript: triggered after Scene receives client's upload of updated script and stores it as asset
// An indication that the script has changed.
public delegate void UpdateScript(UUID clientID, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID);
/// <summary>
/// An indication that the script has changed.
/// </summary>
/// <remarks>
/// Triggered after the scene receives a client's upload of an updated script and has stored it in an asset.
/// </remarks>
public event UpdateScript OnUpdateScript;
public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID)
{
UpdateScript handlerUpdateScript = OnUpdateScript;