remove inspect window hack

This commit is contained in:
Tyfon
2024-06-19 12:16:41 -07:00
parent 465d06e0b9
commit 7fc1c0068b

View File

@@ -45,7 +45,6 @@ namespace UIFixes
new HandleItemViewKillPatch().Enable();
new BeginDragPatch().Enable();
new EndDragPatch().Enable();
//new InspectWindowHack().Enable();
new DisableSplitPatch().Enable();
new DisableSplitTargetPatch().Enable();
@@ -838,29 +837,6 @@ namespace UIFixes
}
}
// The inspect window likes to recreate itself entirely when a slot is removed, which destroys all of the gridviews and
// borks the multiselect. This patch just stops it from responding until the last one (since by then the selection is down to 1, which
// is considered inactive multiselect)
public class InspectWindowHack : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(ItemSpecificationPanel), nameof(ItemSpecificationPanel.OnRemoveFromSlotEvent));
}
[PatchPrefix]
public static bool Prefix()
{
if (!MultiSelect.Active)
{
return true;
}
// Just skip it when multiselect is active
return false;
}
}
public class DisableSplitPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()