aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
diff options
context:
space:
mode:
authorMelanie2009-08-04 03:17:13 +0100
committerMelanie2009-08-04 03:17:13 +0100
commit17bdc45c5ce623549b185a6c4bd5e8fdf00c8d8e (patch)
treeb1e75c63acc472c6e211f2054abedf99ccf1bf06 /OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
parentMinor: formatting changes. (diff)
downloadopensim-SC_OLD-17bdc45c5ce623549b185a6c4bd5e8fdf00c8d8e.zip
opensim-SC_OLD-17bdc45c5ce623549b185a6c4bd5e8fdf00c8d8e.tar.gz
opensim-SC_OLD-17bdc45c5ce623549b185a6c4bd5e8fdf00c8d8e.tar.bz2
opensim-SC_OLD-17bdc45c5ce623549b185a6c4bd5e8fdf00c8d8e.tar.xz
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,
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 084aa50..582f44d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -910,5 +910,30 @@ namespace OpenSim.Region.Framework.Scenes
910 } 910 }
911 return ret; 911 return ret;
912 } 912 }
913
914 public bool CanBeDeleted()
915 {
916 if (!ContainsScripts())
917 return true;
918
919 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
920
921 if (engines == null) // No engine at all
922 return true;
923
924 foreach (TaskInventoryItem item in m_items.Values)
925 {
926 if (item.InvType == (int)InventoryType.LSL)
927 {
928 foreach (IScriptModule e in engines)
929 {
930 if(!e.CanBeDeleted(item.ItemID))
931 return false;
932 }
933 }
934 }
935
936 return true;
937 }
913 } 938 }
914} 939}