Add plumbing for the SceneObjectDeleter to wait for the script engine to

allow final deletion of objects. Meant to support the attach(NULL_KEY) event,
This commit is contained in:
Melanie
2009-08-04 03:17:13 +01:00
parent 679cce6178
commit 17bdc45c5c
10 changed files with 72 additions and 3 deletions

View File

@@ -910,5 +910,30 @@ namespace OpenSim.Region.Framework.Scenes
}
return ret;
}
public bool CanBeDeleted()
{
if (!ContainsScripts())
return true;
IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
if (engines == null) // No engine at all
return true;
foreach (TaskInventoryItem item in m_items.Values)
{
if (item.InvType == (int)InventoryType.LSL)
{
foreach (IScriptModule e in engines)
{
if(!e.CanBeDeleted(item.ItemID))
return false;
}
}
}
return true;
}
}
}