aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
diff options
context:
space:
mode:
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}