diff options
author | Justin Clarke Casey | 2008-11-21 21:16:42 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-11-21 21:16:42 +0000 |
commit | 915593bfbc2f0d6729efe4dfe8d4c8a3f0fc9fbe (patch) | |
tree | 1f62bf777f73c4f3fffb2f5237cd7e5eaeddcb6f /OpenSim/Data | |
parent | * Extend sog delete to inventory test to crank the normally async sog deleter... (diff) | |
download | opensim-SC_OLD-915593bfbc2f0d6729efe4dfe8d4c8a3f0fc9fbe.zip opensim-SC_OLD-915593bfbc2f0d6729efe4dfe8d4c8a3f0fc9fbe.tar.gz opensim-SC_OLD-915593bfbc2f0d6729efe4dfe8d4c8a3f0fc9fbe.tar.bz2 opensim-SC_OLD-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/Data')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLRegionData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateRegionData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteRegionData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/Tests/BasicRegionTest.cs | 16 |
5 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs index 6298a19..c29f566 100644 --- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs +++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs | |||
@@ -718,7 +718,7 @@ VALUES | |||
718 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); | 718 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); |
719 | } | 719 | } |
720 | 720 | ||
721 | prim.RestoreInventoryItems(inventory); | 721 | prim.Inventory.RestoreInventoryItems(inventory); |
722 | 722 | ||
723 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in | 723 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in |
724 | // every item). This data should really be stored in the prim table itself. | 724 | // every item). This data should really be stored in the prim table itself. |
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 1daefe4..2e36123 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -511,7 +511,7 @@ namespace OpenSim.Data.MySQL | |||
511 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); | 511 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); |
512 | } | 512 | } |
513 | 513 | ||
514 | prim.RestoreInventoryItems(inventory); | 514 | prim.Inventory.RestoreInventoryItems(inventory); |
515 | 515 | ||
516 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in | 516 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in |
517 | // every item). This data should really be stored in the prim table itself. | 517 | // every item). This data should really be stored in the prim table itself. |
diff --git a/OpenSim/Data/NHibernate/NHibernateRegionData.cs b/OpenSim/Data/NHibernate/NHibernateRegionData.cs index 833f1b7..475cd71 100644 --- a/OpenSim/Data/NHibernate/NHibernateRegionData.cs +++ b/OpenSim/Data/NHibernate/NHibernateRegionData.cs | |||
@@ -261,7 +261,7 @@ namespace OpenSim.Data.NHibernate | |||
261 | } | 261 | } |
262 | 262 | ||
263 | if (inventory.Count > 0) | 263 | if (inventory.Count > 0) |
264 | p.RestoreInventoryItems(inventory); | 264 | p.Inventory.RestoreInventoryItems(inventory); |
265 | } | 265 | } |
266 | foreach (SceneObjectGroup g in SOG.Values) | 266 | foreach (SceneObjectGroup g in SOG.Values) |
267 | { | 267 | { |
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index a959d56..c436205 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -514,7 +514,7 @@ namespace OpenSim.Data.SQLite | |||
514 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); | 514 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); |
515 | } | 515 | } |
516 | 516 | ||
517 | prim.RestoreInventoryItems(inventory); | 517 | prim.Inventory.RestoreInventoryItems(inventory); |
518 | 518 | ||
519 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in | 519 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in |
520 | // every item). This data should really be stored in the prim table itself. | 520 | // every item). This data should really be stored in the prim table itself. |
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs index a7d62d0..e68ec2e 100644 --- a/OpenSim/Data/Tests/BasicRegionTest.cs +++ b/OpenSim/Data/Tests/BasicRegionTest.cs | |||
@@ -255,8 +255,8 @@ namespace OpenSim.Data.Tests | |||
255 | sop.GroupPosition = groupos; | 255 | sop.GroupPosition = groupos; |
256 | sop.RotationOffset = rotoff; | 256 | sop.RotationOffset = rotoff; |
257 | sop.CreatorID = creator; | 257 | sop.CreatorID = creator; |
258 | sop.InventorySerial = iserial; | 258 | sop.Inventory.Serial = iserial; |
259 | sop.TaskInventory = dic; | 259 | sop.Inventory.Items = dic; |
260 | sop.ObjectFlags = objf; | 260 | sop.ObjectFlags = objf; |
261 | sop.Name = name; | 261 | sop.Name = name; |
262 | sop.Material = material; | 262 | sop.Material = material; |
@@ -287,8 +287,8 @@ namespace OpenSim.Data.Tests | |||
287 | Assert.That(rotoff,Is.EqualTo(sop.RotationOffset)); | 287 | Assert.That(rotoff,Is.EqualTo(sop.RotationOffset)); |
288 | Assert.That(uuid,Is.EqualTo(sop.UUID)); | 288 | Assert.That(uuid,Is.EqualTo(sop.UUID)); |
289 | Assert.That(creator,Is.EqualTo(sop.CreatorID)); | 289 | Assert.That(creator,Is.EqualTo(sop.CreatorID)); |
290 | Assert.That(iserial,Is.EqualTo(sop.InventorySerial)); | 290 | Assert.That(iserial,Is.EqualTo(sop.Inventory.Serial)); |
291 | Assert.That(dic,Is.EqualTo(sop.TaskInventory)); | 291 | Assert.That(dic,Is.EqualTo(sop.Inventory.Items)); |
292 | Assert.That(objf,Is.EqualTo(sop.ObjectFlags)); | 292 | Assert.That(objf,Is.EqualTo(sop.ObjectFlags)); |
293 | Assert.That(name,Is.EqualTo(sop.Name)); | 293 | Assert.That(name,Is.EqualTo(sop.Name)); |
294 | Assert.That(material,Is.EqualTo(sop.Material)); | 294 | Assert.That(material,Is.EqualTo(sop.Material)); |
@@ -337,7 +337,7 @@ namespace OpenSim.Data.Tests | |||
337 | Assert.That(uuid,Is.EqualTo(p.UUID)); | 337 | Assert.That(uuid,Is.EqualTo(p.UUID)); |
338 | Assert.That(creator,Is.EqualTo(p.CreatorID)); | 338 | Assert.That(creator,Is.EqualTo(p.CreatorID)); |
339 | //Assert.That(iserial,Is.EqualTo(p.InventorySerial)); | 339 | //Assert.That(iserial,Is.EqualTo(p.InventorySerial)); |
340 | Assert.That(dic,Is.EqualTo(p.TaskInventory)); | 340 | Assert.That(dic,Is.EqualTo(p.Inventory.Items)); |
341 | //Assert.That(objf,Is.EqualTo(p.ObjectFlags)); | 341 | //Assert.That(objf,Is.EqualTo(p.ObjectFlags)); |
342 | Assert.That(name,Is.EqualTo(p.Name)); | 342 | Assert.That(name,Is.EqualTo(p.Name)); |
343 | Assert.That(material,Is.EqualTo(p.Material)); | 343 | Assert.That(material,Is.EqualTo(p.Material)); |
@@ -415,7 +415,7 @@ namespace OpenSim.Data.Tests | |||
415 | sog2.RootPart.GroupPosition = groupos; | 415 | sog2.RootPart.GroupPosition = groupos; |
416 | sog2.RootPart.RotationOffset = rotoff; | 416 | sog2.RootPart.RotationOffset = rotoff; |
417 | sog2.RootPart.CreatorID = creator; | 417 | sog2.RootPart.CreatorID = creator; |
418 | sog2.RootPart.TaskInventory = dic; | 418 | sog2.RootPart.Inventory.Items = dic; |
419 | sog2.RootPart.Name = name; | 419 | sog2.RootPart.Name = name; |
420 | sog2.RootPart.Material = material; | 420 | sog2.RootPart.Material = material; |
421 | sog2.RootPart.ScriptAccessPin = pin; | 421 | sog2.RootPart.ScriptAccessPin = pin; |
@@ -449,7 +449,7 @@ namespace OpenSim.Data.Tests | |||
449 | Assert.That(name,Is.EqualTo(p.Name)); | 449 | Assert.That(name,Is.EqualTo(p.Name)); |
450 | Assert.That(rotoff,Is.EqualTo(p.RotationOffset)); | 450 | Assert.That(rotoff,Is.EqualTo(p.RotationOffset)); |
451 | Assert.That(creator,Is.EqualTo(p.CreatorID)); | 451 | Assert.That(creator,Is.EqualTo(p.CreatorID)); |
452 | Assert.That(dic,Is.EqualTo(p.TaskInventory)); | 452 | Assert.That(dic,Is.EqualTo(p.Inventory.Items)); |
453 | Assert.That(name,Is.EqualTo(p.Name)); | 453 | Assert.That(name,Is.EqualTo(p.Name)); |
454 | Assert.That(material,Is.EqualTo(p.Material)); | 454 | Assert.That(material,Is.EqualTo(p.Material)); |
455 | Assert.That(pin,Is.EqualTo(p.ScriptAccessPin)); | 455 | Assert.That(pin,Is.EqualTo(p.ScriptAccessPin)); |
@@ -534,7 +534,7 @@ namespace OpenSim.Data.Tests | |||
534 | // TODO: seriously??? this is the way we need to loop to get this? | 534 | // TODO: seriously??? this is the way we need to loop to get this? |
535 | 535 | ||
536 | List<TaskInventoryItem> list = new List<TaskInventoryItem>(); | 536 | List<TaskInventoryItem> list = new List<TaskInventoryItem>(); |
537 | foreach (UUID uuid in sog.RootPart.GetInventoryList()) | 537 | foreach (UUID uuid in sog.RootPart.Inventory.GetInventoryList()) |
538 | { | 538 | { |
539 | list.Add(sog.GetInventoryItem(sog.RootPart.LocalId, uuid)); | 539 | list.Add(sog.GetInventoryItem(sog.RootPart.LocalId, uuid)); |
540 | } | 540 | } |