diff options
author | Justin Clarke Casey | 2008-06-23 18:01:58 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-06-23 18:01:58 +0000 |
commit | de243802334c44967273be2d1455a5f191f75955 (patch) | |
tree | 7228d224717ff5b5c021161225ac9f4e46b39174 /OpenSim/Framework | |
parent | add migration to go from varchar -> char for uuid. Tested (diff) | |
download | opensim-SC_OLD-de243802334c44967273be2d1455a5f191f75955.zip opensim-SC_OLD-de243802334c44967273be2d1455a5f191f75955.tar.gz opensim-SC_OLD-de243802334c44967273be2d1455a5f191f75955.tar.bz2 opensim-SC_OLD-de243802334c44967273be2d1455a5f191f75955.tar.xz |
* Remove all use of asset.InvType, as outlined in mailing list discussion
* This is stage 1, the field will be removed from AssetType and the assets table if this change doesn't prove problematic
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/AgentInventory.cs | 53 | ||||
-rw-r--r-- | OpenSim/Framework/AssetBase.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/AssetLandmark.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs | 2 |
4 files changed, 29 insertions, 31 deletions
diff --git a/OpenSim/Framework/AgentInventory.cs b/OpenSim/Framework/AgentInventory.cs index 61e8636..e3f078b 100644 --- a/OpenSim/Framework/AgentInventory.cs +++ b/OpenSim/Framework/AgentInventory.cs | |||
@@ -157,31 +157,32 @@ namespace OpenSim.Framework | |||
157 | return true; | 157 | return true; |
158 | } | 158 | } |
159 | 159 | ||
160 | public LLUUID AddToInventory(LLUUID folderID, AssetBase asset) | 160 | // FIXME: Unused, pending possible cleanup for this whole class. |
161 | { | 161 | // public LLUUID AddToInventory(LLUUID folderID, AssetBase asset) |
162 | if (InventoryFolders.ContainsKey(folderID)) | 162 | // { |
163 | { | 163 | // if (InventoryFolders.ContainsKey(folderID)) |
164 | LLUUID NewItemID = LLUUID.Random(); | 164 | // { |
165 | 165 | // LLUUID NewItemID = LLUUID.Random(); | |
166 | InventoryItem Item = new InventoryItem(); | 166 | // |
167 | Item.FolderID = folderID; | 167 | // InventoryItem Item = new InventoryItem(); |
168 | Item.OwnerID = AgentID; | 168 | // Item.FolderID = folderID; |
169 | Item.AssetID = asset.FullID; | 169 | // Item.OwnerID = AgentID; |
170 | Item.ItemID = NewItemID; | 170 | // Item.AssetID = asset.FullID; |
171 | Item.Type = asset.Type; | 171 | // Item.ItemID = NewItemID; |
172 | Item.Name = asset.Name; | 172 | // Item.Type = asset.Type; |
173 | Item.Description = asset.Description; | 173 | // Item.Name = asset.Name; |
174 | Item.InvType = asset.InvType; | 174 | // Item.Description = asset.Description; |
175 | InventoryItems.Add(Item.ItemID, Item); | 175 | // Item.InvType = asset.InvType; |
176 | InventoryFolder Folder = InventoryFolders[Item.FolderID]; | 176 | // InventoryItems.Add(Item.ItemID, Item); |
177 | Folder.Items.Add(Item); | 177 | // InventoryFolder Folder = InventoryFolders[Item.FolderID]; |
178 | return (Item.ItemID); | 178 | // Folder.Items.Add(Item); |
179 | } | 179 | // return (Item.ItemID); |
180 | else | 180 | // } |
181 | { | 181 | // else |
182 | return (null); | 182 | // { |
183 | } | 183 | // return (null); |
184 | } | 184 | // } |
185 | // } | ||
185 | 186 | ||
186 | public bool DeleteFromInventory(LLUUID itemID) | 187 | public bool DeleteFromInventory(LLUUID itemID) |
187 | { | 188 | { |
@@ -252,4 +253,4 @@ namespace OpenSim.Framework | |||
252 | return result; | 253 | return result; |
253 | } | 254 | } |
254 | } | 255 | } |
255 | } \ No newline at end of file | 256 | } |
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs index 29d996b..5435a43 100644 --- a/OpenSim/Framework/AssetBase.cs +++ b/OpenSim/Framework/AssetBase.cs | |||
@@ -106,4 +106,4 @@ namespace OpenSim.Framework | |||
106 | set { _temporary = value; } | 106 | set { _temporary = value; } |
107 | } | 107 | } |
108 | } | 108 | } |
109 | } \ No newline at end of file | 109 | } |
diff --git a/OpenSim/Framework/AssetLandmark.cs b/OpenSim/Framework/AssetLandmark.cs index de3028b..004e472 100644 --- a/OpenSim/Framework/AssetLandmark.cs +++ b/OpenSim/Framework/AssetLandmark.cs | |||
@@ -42,7 +42,6 @@ namespace OpenSim.Framework | |||
42 | Data = a.Data; | 42 | Data = a.Data; |
43 | FullID = a.FullID; | 43 | FullID = a.FullID; |
44 | Type = a.Type; | 44 | Type = a.Type; |
45 | InvType = a.InvType; | ||
46 | Name = a.Name; | 45 | Name = a.Name; |
47 | Description = a.Description; | 46 | Description = a.Description; |
48 | InternData(); | 47 | InternData(); |
@@ -58,4 +57,4 @@ namespace OpenSim.Framework | |||
58 | ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle); | 57 | ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle); |
59 | } | 58 | } |
60 | } | 59 | } |
61 | } \ No newline at end of file | 60 | } |
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs index 7adcb4a..ba23d82 100644 --- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs +++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs | |||
@@ -137,13 +137,11 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
137 | string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToString()); | 137 | string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToString()); |
138 | string name = source.Configs[i].GetString("name", String.Empty); | 138 | string name = source.Configs[i].GetString("name", String.Empty); |
139 | sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0); | 139 | sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0); |
140 | sbyte invType = (sbyte) source.Configs[i].GetInt("inventoryType", 0); | ||
141 | string assetPath = Path.Combine(dir, source.Configs[i].GetString("fileName", String.Empty)); | 140 | string assetPath = Path.Combine(dir, source.Configs[i].GetString("fileName", String.Empty)); |
142 | 141 | ||
143 | AssetBase newAsset = CreateAsset(assetIdStr, name, assetPath, false); | 142 | AssetBase newAsset = CreateAsset(assetIdStr, name, assetPath, false); |
144 | 143 | ||
145 | newAsset.Type = type; | 144 | newAsset.Type = type; |
146 | newAsset.InvType = invType; | ||
147 | assets.Add(newAsset); | 145 | assets.Add(newAsset); |
148 | } | 146 | } |
149 | } | 147 | } |