make stack sort optional

This commit is contained in:
Tyfon
2024-07-14 21:42:22 -07:00
parent a295795198
commit 8d173b9f11
2 changed files with 15 additions and 0 deletions

View File

@@ -74,6 +74,11 @@ public static class SortPatches
[PatchPrefix]
public static bool Prefix(GridSortPanel __instance, LootItemClass ___lootItemClass, InventoryControllerClass ___inventoryControllerClass)
{
if (!Settings.StackBeforeSort.Value)
{
return true;
}
Sort(__instance, ___lootItemClass, ___inventoryControllerClass).HandleExceptions();
return false;
}