Deduplicate inventory items in folder view
This commit is contained in:
parent
0223fdffc5
commit
a37bc42a0e
1 changed files with 7 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.ImportExport.Collada14;
|
using OpenMetaverse.ImportExport.Collada14;
|
||||||
using SecondBotEvents.Services;
|
using SecondBotEvents.Services;
|
||||||
using System;
|
using System;
|
||||||
|
|
@ -131,8 +131,14 @@ namespace BetterSecondBot.Static
|
||||||
{
|
{
|
||||||
if (contents.Count > 0)
|
if (contents.Count > 0)
|
||||||
{
|
{
|
||||||
|
HashSet<UUID> seen = [];
|
||||||
foreach (InventoryBase item in contents)
|
foreach (InventoryBase item in contents)
|
||||||
{
|
{
|
||||||
|
if (seen.Contains(item.UUID))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
seen.Add(item.UUID);
|
||||||
mapitem = new InventoryMapItem
|
mapitem = new InventoryMapItem
|
||||||
{
|
{
|
||||||
name = item.Name,
|
name = item.Name,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue