From 921ac14e86fab329c3135b24b2a1be83813fce1b Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 21 Aug 2007 21:03:18 +0000 Subject: Added OnRezScript event to Scene.EventManager.Which the script engine should subscribe to. This is triggered whenever a script is moved into a primitive (and includes the localid of the prim and the script text as params) . Currently though the script item isn't deleted from a users inventory, nor does it actually show up in the objects inventory (this will be fixed soon.) So that means that it isn't currently possible to edit a script (or delete it) once it has been added to a primitive. --- OpenSim/Region/Environment/Scenes/SceneEvents.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes/SceneEvents.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs index 050207c..89aeda6 100644 --- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs +++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs @@ -37,6 +37,9 @@ namespace OpenSim.Region.Environment.Scenes public event ObjectGrabDelegate OnObjectGrab; public event OnPermissionErrorDelegate OnPermissionError; + public delegate void NewRezScript(uint localID, string script); + public event NewRezScript OnRezScript; + public void TriggerPermissionError(LLUUID user, string reason) { @@ -106,5 +109,13 @@ namespace OpenSim.Region.Environment.Scenes if (OnObjectGrab != null) OnObjectGrab(localID, offsetPos, remoteClient); } + + public void TriggerRezScript(uint localID, string script) + { + if (OnRezScript != null) + { + OnRezScript(localID, script); + } + } } } -- cgit v1.1