aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/EventManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs58
1 files changed, 55 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 6586437..569c235 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -187,10 +187,62 @@ namespace OpenSim.Region.Framework.Scenes
187 187
188 public event ClientClosed OnClientClosed; 188 public event ClientClosed OnClientClosed;
189 189
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 event NewScript OnNewScript;
194 public virtual void TriggerNewScript(UUID clientID, SceneObjectPart part, UUID itemID)
195 {
196 NewScript handlerNewScript = OnNewScript;
197 if (handlerNewScript != null)
198 {
199 foreach (NewScript d in handlerNewScript.GetInvocationList())
200 {
201 try
202 {
203 d(clientID, part, itemID);
204 }
205 catch (Exception e)
206 {
207 m_log.ErrorFormat(
208 "[EVENT MANAGER]: Delegate for TriggerNewScript failed - continuing. {0} {1}",
209 e.Message, e.StackTrace);
210 }
211 }
212 }
213 }
214
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);
218 public event UpdateScript OnUpdateScript;
219 public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID)
220 {
221 UpdateScript handlerUpdateScript = OnUpdateScript;
222 if (handlerUpdateScript != null)
223 {
224 foreach (UpdateScript d in handlerUpdateScript.GetInvocationList())
225 {
226 try
227 {
228 d(clientId, itemId, primId, isScriptRunning, newAssetID);
229 }
230 catch (Exception e)
231 {
232 m_log.ErrorFormat(
233 "[EVENT MANAGER]: Delegate for TriggerUpdateScript failed - continuing. {0} {1}",
234 e.Message, e.StackTrace);
235 }
236 }
237 }
238 }
239
190 /// <summary> 240 /// <summary>
191 /// This is fired when a scene object property that a script might be interested in (such as color, scale or 241 /// ScriptChangedEvent is fired when a scene object property that a script might be interested
192 /// inventory) changes. Only enough information is sent for the LSL changed event 242 /// in (such as color, scale or inventory) changes. Only enough information sent is for the LSL changed event.
193 /// (see http://lslwiki.net/lslwiki/wakka.php?wakka=changed) 243 /// This is not an indication that the script has changed (see OnUpdateScript for that).
244 /// This event is sent to a script to tell it that some property changed on
245 /// the object the script is in. See http://lslwiki.net/lslwiki/wakka.php?wakka=changed .
194 /// </summary> 246 /// </summary>
195 public event ScriptChangedEvent OnScriptChangedEvent; 247 public event ScriptChangedEvent OnScriptChangedEvent;
196 public delegate void ScriptChangedEvent(uint localID, uint change); 248 public delegate void ScriptChangedEvent(uint localID, uint change);