mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 19:36:07 +08:00
Thank you kindly, Melanie for a patch for script reset
that creates the event handler chain ready to hook by script engines
This commit is contained in:
@@ -85,11 +85,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public delegate void ObjectGrabDelegate(uint localID, LLVector3 offsetPos, IClientAPI remoteClient);
|
||||
public delegate void ObjectDeGrabDelegate(uint localID, IClientAPI remoteClient);
|
||||
public delegate void ScriptResetDelegate(uint localID, LLUUID itemID);
|
||||
|
||||
public delegate void OnPermissionErrorDelegate(LLUUID user, string reason);
|
||||
|
||||
public event ObjectGrabDelegate OnObjectGrab;
|
||||
public event ObjectDeGrabDelegate OnObjectDeGrab;
|
||||
public event ScriptResetDelegate OnScriptReset;
|
||||
|
||||
public event OnPermissionErrorDelegate OnPermissionError;
|
||||
|
||||
@@ -310,6 +312,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
private OnShutdownDelegate handlerShutdown = null; //OnShutdown;
|
||||
private ObjectGrabDelegate handlerObjectGrab = null; //OnObjectGrab;
|
||||
private ObjectDeGrabDelegate handlerObjectDeGrab = null; //OnObjectDeGrab;
|
||||
private ScriptResetDelegate handlerScriptReset = null; // OnScriptReset
|
||||
private NewRezScript handlerRezScript = null; //OnRezScript;
|
||||
private RemoveScript handlerRemoveScript = null; //OnRemoveScript;
|
||||
private SceneGroupMoved handlerSceneGroupMove = null; //OnSceneGroupMove;
|
||||
@@ -484,6 +487,15 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerScriptReset(uint localID, LLUUID itemID)
|
||||
{
|
||||
handlerScriptReset = OnScriptReset;
|
||||
if (handlerScriptReset != null)
|
||||
{
|
||||
handlerScriptReset(localID, itemID);
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerRezScript(uint localID, LLUUID itemID, string script)
|
||||
{
|
||||
handlerRezScript = OnRezScript;
|
||||
|
||||
Reference in New Issue
Block a user