Allow for richer semantics of object derez. Specifically, allow the existence of region modules that do other kinds of garbage collection. Instead of placing deleted objects in the user's Trash folder, or deleting them immediately (UseTrashOnDelete = false), a module may decide to take garbage collection under its control. For example, it may place derezzed objects in a certain area inworld and delete them later.

This commit is contained in:
Diva Canto
2014-12-25 12:17:07 -08:00
parent 789cd4e928
commit bb82076a4d
2 changed files with 54 additions and 13 deletions

View File

@@ -2182,13 +2182,16 @@ namespace OpenSim.Region.Framework.Scenes
}
}
// OK, we're done with permissions. Let's check if any part of the code prevents the objects from being deleted
bool canDelete = EventManager.TriggerDeRezRequested(remoteClient, deleteGroups, action);
if (permissionToTake && (action != DeRezAction.Delete || this.m_useTrashOnDelete))
{
m_asyncSceneObjectDeleter.DeleteToInventory(
action, destinationID, deleteGroups, remoteClient,
permissionToDelete);
permissionToDelete && canDelete);
}
else if (permissionToDelete)
else if (permissionToDelete && canDelete)
{
foreach (SceneObjectGroup g in deleteGroups)
DeleteSceneObject(g, false);