From 23aba007dd0c6e8983feef6fc078b3d5b674ed3a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 7 Mar 2012 00:04:24 +0000 Subject: 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.) --- OpenSim/Region/Framework/Scenes/EventManager.cs | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'OpenSim') 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 public event OnPermissionErrorDelegate OnPermissionError; /// - /// Fired when a new script is created. + /// Fired when a script is run. /// + /// + /// Occurs after OnNewScript. + /// 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); + + /// + /// Fired when a script is created. + /// + /// + /// Occurs before OnRezScript + /// 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); + + /// + /// An indication that the script has changed. + /// + /// + /// Triggered after the scene receives a client's upload of an updated script and has stored it in an asset. + /// public event UpdateScript OnUpdateScript; + public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID) { UpdateScript handlerUpdateScript = OnUpdateScript; -- cgit v1.1