Add offer with space/enter; hide scary slot swap error tooltip
This commit is contained in:
@@ -49,6 +49,7 @@ namespace UIFixes
|
||||
new RememberSwapGridHoverPatch().Enable();
|
||||
new InspectWindowUpdateStatsOnSwapPatch().Enable();
|
||||
new FixAddModFirearmOperationPatch().Enable();
|
||||
new HideScaryTooltipPatch().Enable();
|
||||
}
|
||||
|
||||
private static bool ValidPrerequisites(ItemContextClass itemContext, ItemContextAbstractClass targetItemContext, IInventoryEventResult operation)
|
||||
@@ -521,6 +522,26 @@ namespace UIFixes
|
||||
}
|
||||
}
|
||||
|
||||
public class HideScaryTooltipPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
||||
return AccessTools.Method(typeof(SimpleTooltip), nameof(SimpleTooltip.ShowInventoryError));
|
||||
}
|
||||
|
||||
[PatchPrefix]
|
||||
public static bool Prefix(SimpleTooltip __instance, InventoryError error)
|
||||
{
|
||||
if (error is StashGridClass.GClass3310 || error is StashGridClass.GClass3311)
|
||||
{
|
||||
__instance.Close();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class FixAddModFirearmOperationPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
|
||||
Reference in New Issue
Block a user