aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-21 21:16:42 +0000
committerJustin Clarke Casey2008-11-21 21:16:42 +0000
commit915593bfbc2f0d6729efe4dfe8d4c8a3f0fc9fbe (patch)
tree1f62bf777f73c4f3fffb2f5237cd7e5eaeddcb6f /OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
parent* Extend sog delete to inventory test to crank the normally async sog deleter... (diff)
downloadopensim-SC-915593bfbc2f0d6729efe4dfe8d4c8a3f0fc9fbe.zip
opensim-SC-915593bfbc2f0d6729efe4dfe8d4c8a3f0fc9fbe.tar.gz
opensim-SC-915593bfbc2f0d6729efe4dfe8d4c8a3f0fc9fbe.tar.bz2
opensim-SC-915593bfbc2f0d6729efe4dfe8d4c8a3f0fc9fbe.tar.xz
* refactor: Rip out SOP inventory from the partial into a separate class
* SceneObjectPartInventory.cs isn't a particularly good name but it's probably not got a long life * A proper inventory interface to follow * Parallel changes for other inventory partial classes to follow at a later date
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs27
1 files changed, 13 insertions, 14 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index 21c7905..9ca5564 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Environment.Scenes
50 { 50 {
51 foreach (SceneObjectPart part in m_parts.Values) 51 foreach (SceneObjectPart part in m_parts.Values)
52 { 52 {
53 part.ForceInventoryPersistence(); 53 part.Inventory.ForceInventoryPersistence();
54 } 54 }
55 } 55 }
56 } 56 }
@@ -66,8 +66,7 @@ namespace OpenSim.Region.Environment.Scenes
66 { 66 {
67 foreach (SceneObjectPart part in m_parts.Values) 67 foreach (SceneObjectPart part in m_parts.Values)
68 { 68 {
69 part.CreateScriptInstances(startParam, postOnRez, engine, 69 part.Inventory.CreateScriptInstances(startParam, postOnRez, engine, stateSource);
70 stateSource);
71 } 70 }
72 } 71 }
73 } 72 }
@@ -81,7 +80,7 @@ namespace OpenSim.Region.Environment.Scenes
81 { 80 {
82 foreach (SceneObjectPart part in m_parts.Values) 81 foreach (SceneObjectPart part in m_parts.Values)
83 { 82 {
84 part.RemoveScriptInstances(); 83 part.Inventory.RemoveScriptInstances();
85 } 84 }
86 } 85 }
87 } 86 }
@@ -96,7 +95,7 @@ namespace OpenSim.Region.Environment.Scenes
96 SceneObjectPart part = GetChildPart(localID); 95 SceneObjectPart part = GetChildPart(localID);
97 if (part != null) 96 if (part != null)
98 { 97 {
99 return part.GetInventoryFileName(remoteClient, localID); 98 return part.Inventory.GetInventoryFileName(remoteClient, localID);
100 } 99 }
101 else 100 else
102 { 101 {
@@ -118,7 +117,7 @@ namespace OpenSim.Region.Environment.Scenes
118 SceneObjectPart part = GetChildPart(localID); 117 SceneObjectPart part = GetChildPart(localID);
119 if (part != null) 118 if (part != null)
120 { 119 {
121 part.RequestInventoryFile(client, xferManager); 120 part.Inventory.RequestInventoryFile(client, xferManager);
122 } 121 }
123 else 122 else
124 { 123 {
@@ -191,7 +190,7 @@ namespace OpenSim.Region.Environment.Scenes
191 addFromAllowedDrop = remoteClient.AgentId != part.OwnerID; 190 addFromAllowedDrop = remoteClient.AgentId != part.OwnerID;
192 } 191 }
193 192
194 part.AddInventoryItem(taskItem, addFromAllowedDrop); 193 part.Inventory.AddInventoryItem(taskItem, addFromAllowedDrop);
195 194
196 return true; 195 return true;
197 } 196 }
@@ -217,7 +216,7 @@ namespace OpenSim.Region.Environment.Scenes
217 SceneObjectPart part = GetChildPart(primID); 216 SceneObjectPart part = GetChildPart(primID);
218 if (part != null) 217 if (part != null)
219 { 218 {
220 return part.GetInventoryItem(itemID); 219 return part.Inventory.GetInventoryItem(itemID);
221 } 220 }
222 else 221 else
223 { 222 {
@@ -241,7 +240,7 @@ namespace OpenSim.Region.Environment.Scenes
241 SceneObjectPart part = GetChildPart(item.ParentPartID); 240 SceneObjectPart part = GetChildPart(item.ParentPartID);
242 if (part != null) 241 if (part != null)
243 { 242 {
244 part.UpdateInventoryItem(item); 243 part.Inventory.UpdateInventoryItem(item);
245 244
246 return true; 245 return true;
247 } 246 }
@@ -261,7 +260,7 @@ namespace OpenSim.Region.Environment.Scenes
261 SceneObjectPart part = GetChildPart(localID); 260 SceneObjectPart part = GetChildPart(localID);
262 if (part != null) 261 if (part != null)
263 { 262 {
264 int type = part.RemoveInventoryItem(itemID); 263 int type = part.Inventory.RemoveInventoryItem(itemID);
265 264
266 return type; 265 return type;
267 } 266 }
@@ -280,7 +279,7 @@ namespace OpenSim.Region.Environment.Scenes
280 foreach (SceneObjectPart part in m_parts.Values) 279 foreach (SceneObjectPart part in m_parts.Values)
281 { 280 {
282 ownerMask &= part.OwnerMask; 281 ownerMask &= part.OwnerMask;
283 perms &= part.MaskEffectivePermissions(); 282 perms &= part.Inventory.MaskEffectivePermissions();
284 } 283 }
285 284
286 if ((ownerMask & (uint)PermissionMask.Modify) == 0) 285 if ((ownerMask & (uint)PermissionMask.Modify) == 0)
@@ -303,7 +302,7 @@ namespace OpenSim.Region.Environment.Scenes
303 public void ApplyNextOwnerPermissions() 302 public void ApplyNextOwnerPermissions()
304 { 303 {
305 foreach (SceneObjectPart part in m_parts.Values) 304 foreach (SceneObjectPart part in m_parts.Values)
306 part.ApplyNextOwnerPermissions(); 305 part.Inventory.ApplyNextOwnerPermissions();
307 } 306 }
308 307
309 public string GetStateSnapshot() 308 public string GetStateSnapshot()
@@ -313,13 +312,13 @@ namespace OpenSim.Region.Environment.Scenes
313 312
314 foreach (SceneObjectPart part in m_parts.Values) 313 foreach (SceneObjectPart part in m_parts.Values)
315 { 314 {
316 foreach (string a in part.GetScriptAssemblies()) 315 foreach (string a in part.Inventory.GetScriptAssemblies())
317 { 316 {
318 if (a != "" && !assemblies.Contains(a)) 317 if (a != "" && !assemblies.Contains(a))
319 assemblies.Add(a); 318 assemblies.Add(a);
320 } 319 }
321 320
322 foreach (KeyValuePair<UUID, string> s in part.GetScriptStates()) 321 foreach (KeyValuePair<UUID, string> s in part.Inventory.GetScriptStates())
323 { 322 {
324 states[s.Key] = s.Value; 323 states[s.Key] = s.Value;
325 } 324 }