diff options
author | Justin Clarke Casey | 2007-12-29 19:41:50 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2007-12-29 19:41:50 +0000 |
commit | 40e89678b71937e7dd103e845794574f6a6ed73c (patch) | |
tree | 555a7b7e9c4d1a4b9232a047ec7accac6d8a347d /OpenSim | |
parent | Allow OpenSim operators to specify their own asset sets without needing to ch... (diff) | |
download | opensim-SC_OLD-40e89678b71937e7dd103e845794574f6a6ed73c.zip opensim-SC_OLD-40e89678b71937e7dd103e845794574f6a6ed73c.tar.gz opensim-SC_OLD-40e89678b71937e7dd103e845794574f6a6ed73c.tar.bz2 opensim-SC_OLD-40e89678b71937e7dd103e845794574f6a6ed73c.tar.xz |
Make inventory items nominate explicit inventory folders rather than hardcoding
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs index 216e13f..7ff2c97 100644 --- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs +++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | |||
@@ -142,8 +142,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
142 | item.avatarID = libOwner; | 142 | item.avatarID = libOwner; |
143 | item.creatorsID = libOwner; | 143 | item.creatorsID = libOwner; |
144 | item.inventoryID = | 144 | item.inventoryID = |
145 | new LLUUID(source.Configs[i].GetString("inventoryID", LLUUID.Random().ToString())); | 145 | new LLUUID(source.Configs[i].GetString("inventoryID", folderID.ToString())); |
146 | item.assetID = new LLUUID(source.Configs[i].GetString("assetID", LLUUID.Random().ToString())); | 146 | item.assetID = new LLUUID(source.Configs[i].GetString("assetID", LLUUID.Random().ToString())); |
147 | item.parentFolderID | ||
148 | = new LLUUID(source.Configs[i].GetString("folderID", LLUUID.Random().ToString())); | ||
147 | item.inventoryDescription = source.Configs[i].GetString("description", ""); | 149 | item.inventoryDescription = source.Configs[i].GetString("description", ""); |
148 | item.inventoryName = source.Configs[i].GetString("name", ""); | 150 | item.inventoryName = source.Configs[i].GetString("name", ""); |
149 | item.assetType = source.Configs[i].GetInt("assetType", 0); | 151 | item.assetType = source.Configs[i].GetInt("assetType", 0); |
@@ -152,16 +154,19 @@ namespace OpenSim.Framework.Communications.Cache | |||
152 | item.inventoryNextPermissions = (uint) source.Configs[i].GetLong("nextPermissions", 0x7FFFFFFF); | 154 | item.inventoryNextPermissions = (uint) source.Configs[i].GetLong("nextPermissions", 0x7FFFFFFF); |
153 | item.inventoryEveryOnePermissions = (uint) source.Configs[i].GetLong("everyonePermissions", 0x7FFFFFFF); | 155 | item.inventoryEveryOnePermissions = (uint) source.Configs[i].GetLong("everyonePermissions", 0x7FFFFFFF); |
154 | item.inventoryBasePermissions = (uint) source.Configs[i].GetLong("basePermissions", 0x7FFFFFFF); | 156 | item.inventoryBasePermissions = (uint) source.Configs[i].GetLong("basePermissions", 0x7FFFFFFF); |
155 | if (item.assetType == 0) | 157 | |
158 | if (item.parentFolderID == folderID) | ||
156 | { | 159 | { |
157 | item.parentFolderID = m_textureFolder.folderID; | 160 | Items.Add(item.inventoryID, item); |
158 | m_textureFolder.Items.Add(item.inventoryID, item); | ||
159 | } | 161 | } |
160 | else | 162 | else |
161 | { | 163 | { |
162 | item.parentFolderID = folderID; | 164 | // Very temporary - will only work for immediate child folders |
163 | Items.Add(item.inventoryID, item); | 165 | if (SubFolders.ContainsKey(item.parentFolderID)) |
164 | } | 166 | { |
167 | SubFolders[item.parentFolderID].Items.Add(item.inventoryID, item); | ||
168 | } | ||
169 | } | ||
165 | } | 170 | } |
166 | } | 171 | } |
167 | } | 172 | } |