aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs100
-rw-r--r--bin/assets/TexturesAssetSet/TexturesAssetSet.xml6
-rw-r--r--bin/inventory/BodyPartsLibrary/BodyPartsLibraryItems.xml28
3 files changed, 133 insertions, 1 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index 55646dd..4738d88 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -35,6 +35,104 @@ using log4net;
35 35
36namespace OpenSim.Framework 36namespace OpenSim.Framework
37{ 37{
38 // A special dictionary for avatar appearance
39 public struct LayerItem
40 {
41 public UUID ItemID;
42 public UUID AssetID;
43
44 public LayerItem(UUID itemID, UUID assetID)
45 {
46 ItemID = itemID;
47 AssetID = assetID;
48 }
49 }
50
51 public class Layer
52 {
53 protected int m_layerType;
54 protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
55 protected List<UUID> m_ids = new List<UUID>();
56
57 public Layer(int type)
58 {
59 m_layerType = type;
60 }
61
62 public int LayerType
63 {
64 get { return m_layerType; }
65 }
66
67 public int Count
68 {
69 get { return m_ids.Count; }
70 }
71
72 public void Add(UUID itemID, UUID assetID)
73 {
74 if (m_items.ContainsKey(itemID))
75 return;
76 if (m_ids.Count >= 5)
77 return;
78
79 m_ids.Add(itemID);
80 m_items[itemID] = assetID;
81 }
82
83 public void Wear(UUID itemID, UUID assetID)
84 {
85 Clear();
86 Add(itemID, assetID);
87 }
88
89 public void Clear()
90 {
91 m_ids.Clear();
92 m_items.Clear();
93 }
94
95 public void RemoveItem(UUID itemID)
96 {
97 if (m_items.ContainsKey(itemID))
98 {
99 m_ids.Remove(itemID);
100 m_items.Remove(itemID);
101 }
102 }
103
104 public void RemoveAsset(UUID assetID)
105 {
106 UUID itemID = UUID.Zero;
107
108 foreach (KeyValuePair<UUID, UUID> kvp in m_items)
109 {
110 if (kvp.Value == assetID)
111 {
112 itemID = kvp.Key;
113 break;
114 }
115 }
116
117 if (itemID != UUID.Zero)
118 {
119 m_ids.Remove(itemID);
120 m_items.Remove(itemID);
121 }
122 }
123
124 public LayerItem this [int idx]
125 {
126 get
127 {
128 if (idx >= m_ids.Count || idx < 0)
129 return new LayerItem(UUID.Zero, UUID.Zero);
130
131 return new LayerItem(m_ids[idx], m_items[m_ids[idx]]);
132 }
133 }
134 }
135
38 /// <summary> 136 /// <summary>
39 /// Contains the Avatar's Appearance and methods to manipulate the appearance. 137 /// Contains the Avatar's Appearance and methods to manipulate the appearance.
40 /// </summary> 138 /// </summary>
@@ -1456,4 +1554,4 @@ namespace OpenSim.Framework
1456 SKIRT_SKIRT_BLUE = 217 1554 SKIRT_SKIRT_BLUE = 217
1457 } 1555 }
1458 } 1556 }
1459} \ No newline at end of file 1557}
diff --git a/bin/assets/TexturesAssetSet/TexturesAssetSet.xml b/bin/assets/TexturesAssetSet/TexturesAssetSet.xml
index c5cafa7..7c74a48 100644
--- a/bin/assets/TexturesAssetSet/TexturesAssetSet.xml
+++ b/bin/assets/TexturesAssetSet/TexturesAssetSet.xml
@@ -1,4 +1,10 @@
1<Nini> 1<Nini>
2 <Section Name="Default Alpha">
3 <Key Name="assetID" Value="1578a2b1-5179-4b53-b618-fe00ca5a5594" />
4 <Key Name="name" Value="alpha" />
5 <Key Name="assetType" Value="0" />
6 <Key Name="fileName" Value="defaultalpha.jp2" />
7 </Section>
2 <Section Name="texture1"> 8 <Section Name="texture1">
3 <Key Name="assetID" Value="00000000-0000-2222-3333-000000000099" /> 9 <Key Name="assetID" Value="00000000-0000-2222-3333-000000000099" />
4 <Key Name="name" Value="femface" /> 10 <Key Name="name" Value="femface" />
diff --git a/bin/inventory/BodyPartsLibrary/BodyPartsLibraryItems.xml b/bin/inventory/BodyPartsLibrary/BodyPartsLibraryItems.xml
index aa8d9d9..5cb71c0 100644
--- a/bin/inventory/BodyPartsLibrary/BodyPartsLibraryItems.xml
+++ b/bin/inventory/BodyPartsLibrary/BodyPartsLibraryItems.xml
@@ -16,6 +16,34 @@
16 </Section> 16 </Section>
17--> 17-->
18<!-- 18<!--
19 <Section Name="Tattoo">
20 <Key Name="inventoryID" Value="c47e22bd-3021-4ba4-82aa-2b5cb34d35e1" />
21 <Key Name="assetID" Value="00000000-0000-2222-3333-100000001007" />
22 <Key Name="folderID" Value="d499e5e0-b9bf-11dc-95ff-0800200c9a66"/>
23 <Key Name="description" Value="Tattoo" />
24 <Key Name="name" Value="Tattoo" />
25 <Key Name="assetType" Value="13" />
26 <Key Name="inventoryType" Value="18" />
27 <Key Name="currentPermissions" Value="2147483647" />
28 <Key Name="nextPermissions" Value="2147483647" />
29 <Key Name="everyonePermissions" Value="2147483647" />
30 <Key Name="basePermissions" Value="2147483647" />
31 </Section>
32
33 <Section Name="Alpha">
34 <Key Name="inventoryID" Value="bfb9923c-4838-4d2d-bf07-608c5b1165c8" />
35 <Key Name="assetID" Value="1578a2b1-5179-4b53-b618-fe00ca5a5594" />
36 <Key Name="folderID" Value="d499e5e0-b9bf-11dc-95ff-0800200c9a66"/>
37 <Key Name="description" Value="Hair" />
38 <Key Name="name" Value="Hair" />
39 <Key Name="assetType" Value="13" />
40 <Key Name="inventoryType" Value="18" />
41 <Key Name="currentPermissions" Value="2147483647" />
42 <Key Name="nextPermissions" Value="2147483647" />
43 <Key Name="everyonePermissions" Value="2147483647" />
44 <Key Name="basePermissions" Value="2147483647" />
45 </Section>
46
19 <Section Name="Hair"> 47 <Section Name="Hair">
20 <Key Name="inventoryID" Value="d342e6c1-b9d2-11dc-95ff-0800200c9a66" /> 48 <Key Name="inventoryID" Value="d342e6c1-b9d2-11dc-95ff-0800200c9a66" />
21 <Key Name="assetID" Value="d342e6c0-b9d2-11dc-95ff-0800200c9a66" /> 49 <Key Name="assetID" Value="d342e6c0-b9d2-11dc-95ff-0800200c9a66" />