mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 10:15:33 +08:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user