make stack sort optional
This commit is contained in:
@@ -74,6 +74,11 @@ public static class SortPatches
|
|||||||
[PatchPrefix]
|
[PatchPrefix]
|
||||||
public static bool Prefix(GridSortPanel __instance, LootItemClass ___lootItemClass, InventoryControllerClass ___inventoryControllerClass)
|
public static bool Prefix(GridSortPanel __instance, LootItemClass ___lootItemClass, InventoryControllerClass ___inventoryControllerClass)
|
||||||
{
|
{
|
||||||
|
if (!Settings.StackBeforeSort.Value)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
Sort(__instance, ___lootItemClass, ___inventoryControllerClass).HandleExceptions();
|
Sort(__instance, ___lootItemClass, ___inventoryControllerClass).HandleExceptions();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
10
Settings.cs
10
Settings.cs
@@ -85,6 +85,7 @@ internal class Settings
|
|||||||
public static ConfigEntry<bool> ReorderGrids { get; set; }
|
public static ConfigEntry<bool> ReorderGrids { get; set; }
|
||||||
public static ConfigEntry<bool> SynchronizeStashScrolling { get; set; }
|
public static ConfigEntry<bool> SynchronizeStashScrolling { get; set; }
|
||||||
public static ConfigEntry<bool> GreedyStackMove { get; set; }
|
public static ConfigEntry<bool> GreedyStackMove { get; set; }
|
||||||
|
public static ConfigEntry<bool> StackBeforeSort { get; set; }
|
||||||
public static ConfigEntry<bool> MergeFIRMoney { get; set; }
|
public static ConfigEntry<bool> MergeFIRMoney { get; set; }
|
||||||
public static ConfigEntry<bool> MergeFIRAmmo { get; set; }
|
public static ConfigEntry<bool> MergeFIRAmmo { get; set; }
|
||||||
public static ConfigEntry<bool> MergeFIROther { get; set; }
|
public static ConfigEntry<bool> MergeFIROther { get; set; }
|
||||||
@@ -433,6 +434,15 @@ internal class Settings
|
|||||||
null,
|
null,
|
||||||
new ConfigurationManagerAttributes { })));
|
new ConfigurationManagerAttributes { })));
|
||||||
|
|
||||||
|
configEntries.Add(StackBeforeSort = config.Bind(
|
||||||
|
InventorySection,
|
||||||
|
"Combine Stacks Before Sorting",
|
||||||
|
true,
|
||||||
|
new ConfigDescription(
|
||||||
|
"When sorting containers, first combine stacks of the same type. This will not be undone if the sorting fails.",
|
||||||
|
null,
|
||||||
|
new ConfigurationManagerAttributes { })));
|
||||||
|
|
||||||
configEntries.Add(MergeFIRMoney = config.Bind(
|
configEntries.Add(MergeFIRMoney = config.Bind(
|
||||||
InventorySection,
|
InventorySection,
|
||||||
"Autostack Money with FiR Money",
|
"Autostack Money with FiR Money",
|
||||||
|
Reference in New Issue
Block a user