Skip to content

Commit a4fff77

Browse files
committed
Always sort item subsets via the standard item name comparator (push NPC items to last).
1 parent cb996e9 commit a4fff77

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

xivModdingFramework/Cache/XivCache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static class XivCache
2727
private static GameInfo _gameInfo;
2828
private static DirectoryInfo _dbPath;
2929
private static DirectoryInfo _rootCachePath;
30-
public static readonly Version CacheVersion = new Version("1.0.0.2");
30+
public static readonly Version CacheVersion = new Version("1.0.1.0");
3131
private const string dbFileName = "mod_cache.db";
3232
private const string rootCacheFileName = "item_sets.db";
3333
private const string creationScript = "CreateCacheDB.sql";

xivModdingFramework/Cache/XivDependencyGraph.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ public static async Task<List<IItemModel>> GetSharedImcSubsetItems(this IItemMod
5252
var root = item.GetRoot();
5353
if (root != null)
5454
{
55-
return await root.GetAllItems(item.ModelInfo.ImcSubsetID);
55+
var items = await root.GetAllItems(item.ModelInfo.ImcSubsetID);
56+
items = items.OrderBy(x => x.Name, new ItemNameComparer()).ToList();
57+
return items;
5658
}
5759
else
5860
{
@@ -78,6 +80,7 @@ public static async Task<List<IItemModel>> GetSharedMaterialItems(this IItemMode
7880
}
7981
}
8082

83+
sameMaterialItems = sameMaterialItems.OrderBy(x => x.Name, new ItemNameComparer()).ToList();
8184
return sameMaterialItems;
8285
}
8386
public static async Task<List<IItemModel>> GetSharedModelItems(this IItemModel item)
@@ -90,6 +93,8 @@ public static async Task<List<IItemModel>> GetSharedModelItems(this IItemModel i
9093
if (items.Count == 0) {
9194
items.Add((IItemModel)item.Clone());
9295
}
96+
97+
items = items.OrderBy(x => x.Name, new ItemNameComparer()).ToList();
9398
return items;
9499
}
95100

@@ -878,6 +883,8 @@ public async Task<List<IItemModel>> GetAllItems(int imcSubset = -1)
878883
items = items.Where(x => x.ModelInfo.ImcSubsetID == imcSubset).ToList();
879884
}
880885

886+
items = items.OrderBy(x => x.Name, new ItemNameComparer()).ToList();
887+
881888
return items;
882889
}
883890
}

0 commit comments

Comments
 (0)