Stoppable multi-unload in raid

This commit is contained in:
Tyfon
2024-06-21 11:49:40 -07:00
parent 936c3fad54
commit 26ba6810ad
3 changed files with 53 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
using Aki.Reflection.Patching;
using Aki.Reflection.Utils;
using Comfort.Common;
using EFT;
using EFT.Communications;
using EFT.InventoryLogic;
using EFT.UI;
@@ -55,6 +55,7 @@ namespace UIFixes
// Actions
new ItemViewClickPatch().Enable();
new ContextActionsPatch().Enable();
new StopProcessesPatch().Enable();
// GridView
new GridViewCanAcceptPatch().Enable();
@@ -296,6 +297,20 @@ namespace UIFixes
}
}
public class StopProcessesPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.DeclaredMethod(typeof(Player.PlayerInventoryController), nameof(Player.PlayerInventoryController.StopProcesses));
}
[PatchPostfix]
public static void Postfix()
{
MultiSelect.StopUnloading();
}
}
// TradingItemView overrides GridItemView.OnClick and doesn't call base
public class DeselectOnTradingItemViewClickPatch : ModulePatch
{