Add default shirt and pants

Curiously, all items are now starting off worn except the eyes.  Hmm.
viewer-2-initial-appearance
Justin Clark-Casey (justincc) 2011-01-08 01:23:56 +00:00
parent 6626834c6b
commit 298cf1ae67
1 changed files with 28 additions and 2 deletions

View File

@ -137,8 +137,9 @@ namespace OpenSim.Services.InventoryService
CreateFolder(principalID, rootFolder.ID, (int)AssetType.TrashFolder, "Trash");
InventoryFolderBase bodypartFolder = GetFolderForType(principalID, AssetType.Bodypart);
InventoryFolderBase clothingFolder = GetFolderForType(principalID, AssetType.Clothing);
// Default items
// Default minimum body parts for viewer 2 appearance
InventoryItemBase defaultShape = new InventoryItemBase();
defaultShape.Name = "Default shape";
defaultShape.Description = "Default shape description";
@ -187,6 +188,31 @@ namespace OpenSim.Services.InventoryService
defaultEyes.CreatorId = UUID.Zero.ToString();
AddItem(defaultEyes);
// Default minimum clothes for viewer 2 non-naked appearance
InventoryItemBase defaultShirt = new InventoryItemBase();
defaultShirt.Name = "Default shirt";
defaultShirt.Description = "Default shirt description";
defaultShirt.AssetType = (int)AssetType.Clothing;
defaultShirt.InvType = (int)InventoryType.Wearable;
defaultShirt.Flags = (uint)WearableType.Shirt;
defaultShirt.ID = AvatarWearable.DEFAULT_SHIRT_ITEM;
defaultShirt.AssetID = AvatarWearable.DEFAULT_SHIRT_ASSET;
defaultShirt.Folder = clothingFolder.ID;
defaultShirt.CreatorId = UUID.Zero.ToString();
AddItem(defaultShirt);
InventoryItemBase defaultPants = new InventoryItemBase();
defaultPants.Name = "Default pants";
defaultPants.Description = "Default pants description";
defaultPants.AssetType = (int)AssetType.Clothing;
defaultPants.InvType = (int)InventoryType.Wearable;
defaultPants.Flags = (uint)WearableType.Pants;
defaultPants.ID = AvatarWearable.DEFAULT_PANTS_ITEM;
defaultPants.AssetID = AvatarWearable.DEFAULT_PANTS_ASSET;
defaultPants.Folder = clothingFolder.ID;
defaultPants.CreatorId = UUID.Zero.ToString();
AddItem(defaultPants);
return result;
}