aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
diff options
context:
space:
mode:
authorSean Dague2008-04-24 12:27:24 +0000
committerSean Dague2008-04-24 12:27:24 +0000
commit2a2ef42e64e202c81762adf0cc0e4cb1393f71ef (patch)
tree20768ffd9610712a51a4cc7f9f0ffbe667fbe2e2 /OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
parent* Adds much better support for attachments that you right click on in world. (diff)
downloadopensim-SC_OLD-2a2ef42e64e202c81762adf0cc0e4cb1393f71ef.zip
opensim-SC_OLD-2a2ef42e64e202c81762adf0cc0e4cb1393f71ef.tar.gz
opensim-SC_OLD-2a2ef42e64e202c81762adf0cc0e4cb1393f71ef.tar.bz2
opensim-SC_OLD-2a2ef42e64e202c81762adf0cc0e4cb1393f71ef.tar.xz
replace hard tabs with 4 spaces to be consistant in the source.
Please adjust your editors to not use hard tabs.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs60
1 files changed, 30 insertions, 30 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 6e815a6..dd361bf 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -258,32 +258,32 @@ namespace OpenSim.Region.Environment.Scenes
258 } 258 }
259 } 259 }
260 260
261 // Assumes a lock is held on the inventory 261 // Assumes a lock is held on the inventory
262 private bool InventoryContainsName(string name) 262 private bool InventoryContainsName(string name)
263 { 263 {
264 foreach (TaskInventoryItem item in m_taskInventory.Values) 264 foreach (TaskInventoryItem item in m_taskInventory.Values)
265 { 265 {
266 if(item.Name == name) 266 if(item.Name == name)
267 return true; 267 return true;
268 } 268 }
269 return false; 269 return false;
270 } 270 }
271 271
272 private string FindAvailableInventoryName(string name) 272 private string FindAvailableInventoryName(string name)
273 { 273 {
274 if(!InventoryContainsName(name)) 274 if(!InventoryContainsName(name))
275 return name; 275 return name;
276 276
277 int suffix=1; 277 int suffix=1;
278 while(suffix < 256) 278 while(suffix < 256)
279 { 279 {
280 string tryName=String.Format("{0} {1}", name, suffix); 280 string tryName=String.Format("{0} {1}", name, suffix);
281 if(!InventoryContainsName(tryName)) 281 if(!InventoryContainsName(tryName))
282 return tryName; 282 return tryName;
283 suffix++; 283 suffix++;
284 } 284 }
285 return String.Empty; 285 return String.Empty;
286 } 286 }
287 287
288 /// <summary> 288 /// <summary>
289 /// Add an item to this prim's inventory. 289 /// Add an item to this prim's inventory.
@@ -295,11 +295,11 @@ namespace OpenSim.Region.Environment.Scenes
295 item.CreationDate = 1000; 295 item.CreationDate = 1000;
296 item.ParentPartID = UUID; 296 item.ParentPartID = UUID;
297 297
298 string name=FindAvailableInventoryName(item.Name); 298 string name=FindAvailableInventoryName(item.Name);
299 if(name == String.Empty) 299 if(name == String.Empty)
300 return; 300 return;
301 301
302 item.Name=name; 302 item.Name=name;
303 303
304 lock (m_taskInventory) 304 lock (m_taskInventory)
305 { 305 {