From 74654dc7351baf092ecae12c90a236ec43c86c98 Mon Sep 17 00:00:00 2001
From: MW
Date: Wed, 25 Jul 2007 19:18:34 +0000
Subject: Added the default shape to the OpenSim library. Now need to get the
new ruth into asset format and add that.
---
.../Communications/Cache/LibraryRootFolder.cs | 50 +++++++++++++++++-----
OpenSim/Framework/Data/InventoryData.cs | 8 ++++
OpenSim/Framework/General/Types/AgentWearable.cs | 2 +-
OpenSim/Region/ClientStack/ClientView.API.cs | 30 ++++++-------
4 files changed, 63 insertions(+), 27 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index 2608145..18803c0 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -19,6 +19,11 @@ namespace OpenSim.Framework.Communications.Caches
this.type = (short)-1;
this.version = (ushort) 1;
+ this.CreateLibraryItems();
+ }
+
+ private void CreateLibraryItems()
+ {
InventoryItemBase item = new InventoryItemBase();
item.avatarID = libOwner;
item.creatorsID = libOwner;
@@ -26,10 +31,12 @@ namespace OpenSim.Framework.Communications.Caches
item.assetID = new LLUUID("00000000-0000-0000-9999-000000000002");
item.inventoryDescription = "Plywood texture";
item.inventoryName = "Plywood";
- item.type =0;
+ item.type = 0;
item.parentFolderID = this.folderID;
- item.inventoryCurrentPermissions = 2147483647;
- item.inventoryNextPermissions = 2147483647;
+ item.inventoryBasePermissions = 0x7FFFFFFF;
+ item.inventoryEveryOnePermissions = 0x7FFFFFFF;
+ item.inventoryCurrentPermissions = 0x7FFFFFFF;
+ item.inventoryNextPermissions = 0x7FFFFFFF;
this.Items.Add(item.inventoryID, item);
item = new InventoryItemBase();
@@ -41,8 +48,10 @@ namespace OpenSim.Framework.Communications.Caches
item.inventoryName = "Rocks";
item.type = 0;
item.parentFolderID = this.folderID;
- item.inventoryCurrentPermissions = 2147483647;
- item.inventoryNextPermissions = 2147483647;
+ item.inventoryBasePermissions = 0x7FFFFFFF;
+ item.inventoryEveryOnePermissions = 0x7FFFFFFF;
+ item.inventoryCurrentPermissions = 0x7FFFFFFF;
+ item.inventoryNextPermissions = 0x7FFFFFFF;
this.Items.Add(item.inventoryID, item);
item = new InventoryItemBase();
@@ -54,8 +63,10 @@ namespace OpenSim.Framework.Communications.Caches
item.inventoryName = "Bricks";
item.type = 0;
item.parentFolderID = this.folderID;
- item.inventoryCurrentPermissions = 2147483647;
- item.inventoryNextPermissions = 2147483647;
+ item.inventoryBasePermissions = 0x7FFFFFFF;
+ item.inventoryEveryOnePermissions = 0x7FFFFFFF;
+ item.inventoryCurrentPermissions = 0x7FFFFFFF;
+ item.inventoryNextPermissions = 0x7FFFFFFF;
this.Items.Add(item.inventoryID, item);
item = new InventoryItemBase();
@@ -67,8 +78,10 @@ namespace OpenSim.Framework.Communications.Caches
item.inventoryName = "Granite";
item.type = 0;
item.parentFolderID = this.folderID;
- item.inventoryCurrentPermissions = 2147483647;
- item.inventoryNextPermissions = 2147483647;
+ item.inventoryBasePermissions = 0x7FFFFFFF;
+ item.inventoryEveryOnePermissions = 0x7FFFFFFF;
+ item.inventoryCurrentPermissions = 0x7FFFFFFF;
+ item.inventoryNextPermissions = 0x7FFFFFFF;
this.Items.Add(item.inventoryID, item);
item = new InventoryItemBase();
@@ -80,8 +93,23 @@ namespace OpenSim.Framework.Communications.Caches
item.inventoryName = "Hardwood";
item.type = 0;
item.parentFolderID = this.folderID;
- item.inventoryCurrentPermissions = 2147483647;
- item.inventoryNextPermissions = 2147483647;
+ item.inventoryBasePermissions = 0x7FFFFFFF;
+ item.inventoryEveryOnePermissions = 0x7FFFFFFF;
+ item.inventoryCurrentPermissions = 0x7FFFFFFF;
+ item.inventoryNextPermissions = 0x7FFFFFFF;
+ this.Items.Add(item.inventoryID, item);
+
+ item = new InventoryItemBase();
+ item.avatarID = libOwner;
+ item.creatorsID = libOwner;
+ item.inventoryID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9");
+ item.assetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
+ item.inventoryDescription = "Default Shape";
+ item.inventoryName = "Default Shape";
+ item.type = 13;
+ item.parentFolderID = this.folderID;
+ item.inventoryCurrentPermissions = 0;
+ item.inventoryNextPermissions = 0;
this.Items.Add(item.inventoryID, item);
}
diff --git a/OpenSim/Framework/Data/InventoryData.cs b/OpenSim/Framework/Data/InventoryData.cs
index d7130f4..c43ff1a 100644
--- a/OpenSim/Framework/Data/InventoryData.cs
+++ b/OpenSim/Framework/Data/InventoryData.cs
@@ -75,6 +75,14 @@ namespace OpenSim.Framework.Data
/// A mask containing permissions for the current owner (cannot be enforced)
///
public uint inventoryCurrentPermissions;
+ ///
+ ///
+ ///
+ public uint inventoryBasePermissions;
+ ///
+ ///
+ ///
+ public uint inventoryEveryOnePermissions;
}
///
diff --git a/OpenSim/Framework/General/Types/AgentWearable.cs b/OpenSim/Framework/General/Types/AgentWearable.cs
index 404df0d..9de25b5 100644
--- a/OpenSim/Framework/General/Types/AgentWearable.cs
+++ b/OpenSim/Framework/General/Types/AgentWearable.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Framework.Types
defaultWearables[i] = new AvatarWearable();
}
defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
- defaultWearables[0].ItemID = LLUUID.Random();
+ defaultWearables[0].ItemID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9");
return defaultWearables;
}
}
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index 2f5c5c3..0da89a1 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -526,19 +526,19 @@ namespace OpenSim.Region.ClientStack
descend.ItemData[i].ItemID = item.inventoryID;
descend.ItemData[i].AssetID = item.assetID;
descend.ItemData[i].CreatorID = item.creatorsID;
- descend.ItemData[i].BaseMask = FULL_MASK_PERMISSIONS;
+ descend.ItemData[i].BaseMask = item.inventoryBasePermissions;
descend.ItemData[i].CreationDate = 1000;
descend.ItemData[i].Description = enc.GetBytes(item.inventoryDescription+ "\0");
- descend.ItemData[i].EveryoneMask = FULL_MASK_PERMISSIONS;
+ descend.ItemData[i].EveryoneMask = item.inventoryEveryOnePermissions;
descend.ItemData[i].Flags = 1;
descend.ItemData[i].FolderID = item.parentFolderID;
descend.ItemData[i].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
- descend.ItemData[i].GroupMask = FULL_MASK_PERMISSIONS;
+ descend.ItemData[i].GroupMask = 0;
descend.ItemData[i].InvType = (sbyte)item.type;
descend.ItemData[i].Name = enc.GetBytes(item.inventoryName+ "\0");
- descend.ItemData[i].NextOwnerMask = FULL_MASK_PERMISSIONS;
+ descend.ItemData[i].NextOwnerMask = item.inventoryNextPermissions;
descend.ItemData[i].OwnerID = item.avatarID;
- descend.ItemData[i].OwnerMask = FULL_MASK_PERMISSIONS;
+ descend.ItemData[i].OwnerMask = item.inventoryCurrentPermissions;
descend.ItemData[i].SalePrice = 0;
descend.ItemData[i].SaleType = 0;
descend.ItemData[i].Type = (sbyte)item.type;
@@ -562,19 +562,19 @@ namespace OpenSim.Region.ClientStack
inventoryReply.InventoryData[0].ItemID = item.inventoryID;
inventoryReply.InventoryData[0].AssetID = item.assetID;
inventoryReply.InventoryData[0].CreatorID = item.creatorsID;
- inventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS;
+ inventoryReply.InventoryData[0].BaseMask = item.inventoryBasePermissions;
inventoryReply.InventoryData[0].CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
inventoryReply.InventoryData[0].Description = enc.GetBytes(item.inventoryDescription + "\0");
- inventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS;
+ inventoryReply.InventoryData[0].EveryoneMask = item.inventoryEveryOnePermissions;
inventoryReply.InventoryData[0].Flags = 0;
inventoryReply.InventoryData[0].FolderID = item.parentFolderID;
inventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
- inventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS;
+ inventoryReply.InventoryData[0].GroupMask = 0;
inventoryReply.InventoryData[0].InvType = (sbyte)item.type;
inventoryReply.InventoryData[0].Name = enc.GetBytes(item.inventoryName + "\0");
- inventoryReply.InventoryData[0].NextOwnerMask = FULL_MASK_PERMISSIONS;
+ inventoryReply.InventoryData[0].NextOwnerMask = item.inventoryNextPermissions;
inventoryReply.InventoryData[0].OwnerID = item.avatarID;
- inventoryReply.InventoryData[0].OwnerMask = FULL_MASK_PERMISSIONS;
+ inventoryReply.InventoryData[0].OwnerMask = item.inventoryCurrentPermissions;
inventoryReply.InventoryData[0].SalePrice = 0;
inventoryReply.InventoryData[0].SaleType = 0;
inventoryReply.InventoryData[0].Type = (sbyte)item.type;
@@ -595,19 +595,19 @@ namespace OpenSim.Region.ClientStack
InventoryReply.InventoryData[0].ItemID = Item.inventoryID;
InventoryReply.InventoryData[0].AssetID = Item.assetID;
InventoryReply.InventoryData[0].CreatorID = Item.creatorsID;
- InventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS;
+ InventoryReply.InventoryData[0].BaseMask = Item.inventoryBasePermissions;
InventoryReply.InventoryData[0].CreationDate = 1000;
InventoryReply.InventoryData[0].Description = enc.GetBytes(Item.inventoryDescription + "\0");
- InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS;
+ InventoryReply.InventoryData[0].EveryoneMask = Item.inventoryEveryOnePermissions;
InventoryReply.InventoryData[0].Flags = 0;
InventoryReply.InventoryData[0].FolderID = Item.parentFolderID;
InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
- InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS;
+ InventoryReply.InventoryData[0].GroupMask = 0;
InventoryReply.InventoryData[0].InvType =(sbyte) Item.type;
InventoryReply.InventoryData[0].Name = enc.GetBytes(Item.inventoryName + "\0");
- InventoryReply.InventoryData[0].NextOwnerMask = FULL_MASK_PERMISSIONS;
+ InventoryReply.InventoryData[0].NextOwnerMask = Item.inventoryNextPermissions;
InventoryReply.InventoryData[0].OwnerID = Item.avatarID;
- InventoryReply.InventoryData[0].OwnerMask = FULL_MASK_PERMISSIONS;
+ InventoryReply.InventoryData[0].OwnerMask = Item.inventoryCurrentPermissions;
InventoryReply.InventoryData[0].SalePrice = 100;
InventoryReply.InventoryData[0].SaleType = 0;
InventoryReply.InventoryData[0].Type =(sbyte) Item.type;
--
cgit v1.1