using file-scoped namespaces

This commit is contained in:
Tyfon
2024-07-12 16:17:42 -07:00
parent 29b6094b20
commit 7ea249114d
63 changed files with 8789 additions and 8855 deletions

View File

@@ -4,8 +4,8 @@ using EFT.UI.Ragfair;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace UIFixes.ContextMenus namespace UIFixes;
{
public class EmptySlotMenu(Slot slot, ItemContextAbstractClass itemContext, ItemUiContext itemUiContext, Action closeAction) : BaseItemInfoInteractions(itemContext, itemUiContext, closeAction) public class EmptySlotMenu(Slot slot, ItemContextAbstractClass itemContext, ItemUiContext itemUiContext, Action closeAction) : BaseItemInfoInteractions(itemContext, itemUiContext, closeAction)
{ {
private static readonly List<EItemInfoButton> Actions = [EItemInfoButton.LinkedSearch]; private static readonly List<EItemInfoButton> Actions = [EItemInfoButton.LinkedSearch];
@@ -26,4 +26,3 @@ namespace UIFixes.ContextMenus
} }
} }
} }
}

View File

@@ -4,8 +4,8 @@ using System;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
namespace UIFixes.ContextMenus namespace UIFixes;
{
public class EmptySlotMenuTrigger : MonoBehaviour, IPointerClickHandler, IPointerDownHandler, IPointerUpHandler, IPointerEnterHandler, IPointerExitHandler public class EmptySlotMenuTrigger : MonoBehaviour, IPointerClickHandler, IPointerDownHandler, IPointerUpHandler, IPointerEnterHandler, IPointerExitHandler
{ {
private ItemUiContext itemUiContext; private ItemUiContext itemUiContext;
@@ -79,4 +79,3 @@ namespace UIFixes.ContextMenus
throw new NotImplementedException(); throw new NotImplementedException();
} }
} }
}

View File

@@ -5,8 +5,8 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
namespace UIFixes namespace UIFixes;
{
public class InsuranceInteractions(IEnumerable<Item> items, ItemUiContext uiContext, int playerRubles) : ItemInfoInteractionsAbstractClass<InsuranceInteractions.EInsurers>(uiContext) public class InsuranceInteractions(IEnumerable<Item> items, ItemUiContext uiContext, int playerRubles) : ItemInfoInteractionsAbstractClass<InsuranceInteractions.EInsurers>(uiContext)
{ {
private readonly InsuranceCompanyClass insurance = uiContext.Session.InsuranceCompany; private readonly InsuranceCompanyClass insurance = uiContext.Session.InsuranceCompany;
@@ -102,4 +102,3 @@ namespace UIFixes
return interaction.Id.StartsWith("UIFixesInsurerId:"); return interaction.Id.StartsWith("UIFixesInsurerId:");
} }
} }
}

View File

@@ -6,8 +6,8 @@ using System;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
namespace UIFixes namespace UIFixes;
{
public class RepairInteractions : ItemInfoInteractionsAbstractClass<RepairInteractions.ERepairers> public class RepairInteractions : ItemInfoInteractionsAbstractClass<RepairInteractions.ERepairers>
{ {
private readonly RepairControllerClass repairController; private readonly RepairControllerClass repairController;
@@ -178,4 +178,3 @@ namespace UIFixes
return interaction.Id.StartsWith("UIFixesRepairerId:"); return interaction.Id.StartsWith("UIFixesRepairerId:");
} }
} }
}

View File

@@ -2,8 +2,8 @@
using EFT.UI.DragAndDrop; using EFT.UI.DragAndDrop;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace UIFixes namespace UIFixes;
{
public static class ExtraItemProperties public static class ExtraItemProperties
{ {
private static readonly ConditionalWeakTable<Item, Properties> properties = new(); private static readonly ConditionalWeakTable<Item, Properties> properties = new();
@@ -29,4 +29,3 @@ namespace UIFixes
public static bool GetReordered(this TemplatedGridsView gridsView) => properties.GetOrCreateValue(gridsView).Reordered; public static bool GetReordered(this TemplatedGridsView gridsView) => properties.GetOrCreateValue(gridsView).Reordered;
public static void SetReordered(this TemplatedGridsView gridsView, bool value) => properties.GetOrCreateValue(gridsView).Reordered = value; public static void SetReordered(this TemplatedGridsView gridsView, bool value) => properties.GetOrCreateValue(gridsView).Reordered = value;
} }
}

View File

@@ -9,8 +9,8 @@ using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
public class DrawMultiSelect : MonoBehaviour public class DrawMultiSelect : MonoBehaviour
{ {
private Texture2D selectTexture; private Texture2D selectTexture;
@@ -241,4 +241,3 @@ namespace UIFixes
return false; return false;
} }
} }
}

View File

@@ -5,8 +5,8 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public static class MultiGrid public static class MultiGrid
{ {
private static readonly Dictionary<string, Dictionary<string, Vector2Int>> GridOffsets = []; private static readonly Dictionary<string, Dictionary<string, Vector2Int>> GridOffsets = [];
@@ -124,4 +124,3 @@ namespace UIFixes
return lootItem.Grids.Length > 1; return lootItem.Grids.Length > 1;
} }
} }
}

View File

@@ -7,8 +7,8 @@ using System.Threading.Tasks;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public class MultiSelect public class MultiSelect
{ {
private static GameObject SelectedMarkTemplate = null; private static GameObject SelectedMarkTemplate = null;
@@ -555,5 +555,4 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -2,8 +2,8 @@
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public class MultiSelectDebug : MonoBehaviour public class MultiSelectDebug : MonoBehaviour
{ {
private GUIStyle guiStyle; private GUIStyle guiStyle;
@@ -60,4 +60,3 @@ namespace UIFixes
GUI.Box(guiRect, guiContent, guiStyle); GUI.Box(guiRect, guiContent, guiStyle);
} }
} }
}

View File

@@ -9,8 +9,8 @@ using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
public static class AddOfferClickablePricesPatches public static class AddOfferClickablePricesPatches
{ {
public static void Enable() public static void Enable()
@@ -95,4 +95,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -5,8 +5,8 @@ using SPT.Reflection.Patching;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public static class AddOfferRememberAutoselectPatches public static class AddOfferRememberAutoselectPatches
{ {
private static readonly string PlayerPrefKey = "UIFixes.AddOffer.AutoselectSimilar"; private static readonly string PlayerPrefKey = "UIFixes.AddOffer.AutoselectSimilar";
@@ -59,4 +59,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -6,8 +6,8 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public static class AimToggleHoldPatches public static class AimToggleHoldPatches
{ {
public static void Enable() public static void Enable()
@@ -70,4 +70,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -9,8 +9,8 @@ using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace UIFixes namespace UIFixes;
{
public class AssortUnlocksPatch : ModulePatch public class AssortUnlocksPatch : ModulePatch
{ {
private static bool Loading = false; private static bool Loading = false;
@@ -62,4 +62,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -4,8 +4,8 @@ using SPT.Reflection.Patching;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public class AutofillQuestItemsPatch : ModulePatch public class AutofillQuestItemsPatch : ModulePatch
{ {
protected override MethodBase GetTargetMethod() protected override MethodBase GetTargetMethod()
@@ -30,4 +30,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -6,8 +6,8 @@ using System.Reflection;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
public static class ConfirmDialogKeysPatches public static class ConfirmDialogKeysPatches
{ {
public static void Enable() public static void Enable()
@@ -222,4 +222,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -9,11 +9,10 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using TMPro; using TMPro;
using UIFixes.ContextMenus;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public static class ContextMenuPatches public static class ContextMenuPatches
{ {
private static InsuranceInteractions CurrentInsuranceInteractions = null; private static InsuranceInteractions CurrentInsuranceInteractions = null;
@@ -517,4 +516,3 @@ namespace UIFixes
return R.Money.GetMoneySums(stash.Grid.ContainedItems.Keys)[ECurrencyType.RUB]; return R.Money.GetMoneySums(stash.Grid.ContainedItems.Keys)[ECurrencyType.RUB];
} }
} }
}

View File

@@ -8,8 +8,8 @@ using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
namespace UIFixes namespace UIFixes;
{
public static class ContextMenuShortcutPatches public static class ContextMenuShortcutPatches
{ {
private static TMP_InputField LastSelectedInput = null; private static TMP_InputField LastSelectedInput = null;
@@ -221,4 +221,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -6,8 +6,8 @@ using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
public static class FixFleaPatches public static class FixFleaPatches
{ {
public static void Enable() public static void Enable()
@@ -96,4 +96,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -3,8 +3,8 @@ using HarmonyLib;
using SPT.Reflection.Patching; using SPT.Reflection.Patching;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public class FixMailRecieveAllPatch : ModulePatch public class FixMailRecieveAllPatch : ModulePatch
{ {
protected override MethodBase GetTargetMethod() protected override MethodBase GetTargetMethod()
@@ -19,5 +19,4 @@ namespace UIFixes
dialogue.HasMessagesWithRewards = false; dialogue.HasMessagesWithRewards = false;
} }
} }
}

View File

@@ -6,8 +6,8 @@ using System.Reflection;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public static class FixTooltipPatches public static class FixTooltipPatches
{ {
public static void Enable() public static void Enable()
@@ -67,4 +67,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -4,8 +4,8 @@ using HarmonyLib;
using SPT.Reflection.Patching; using SPT.Reflection.Patching;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public class FixTraderControllerSimulateFalsePatch : ModulePatch public class FixTraderControllerSimulateFalsePatch : ModulePatch
{ {
protected override MethodBase GetTargetMethod() protected override MethodBase GetTargetMethod()
@@ -79,4 +79,3 @@ namespace UIFixes
return false; return false;
} }
} }
}

View File

@@ -4,8 +4,8 @@ using SPT.Reflection.Patching;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public class FixUnloadLastBulletPatch : ModulePatch public class FixUnloadLastBulletPatch : ModulePatch
{ {
protected override MethodBase GetTargetMethod() protected override MethodBase GetTargetMethod()
@@ -49,4 +49,3 @@ namespace UIFixes
return false; return false;
} }
} }
}

View File

@@ -11,8 +11,8 @@ using System.Threading.Tasks;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
public static class FleaPrevSearchPatches public static class FleaPrevSearchPatches
{ {
private class HistoryEntry private class HistoryEntry
@@ -432,4 +432,3 @@ namespace UIFixes
one.NeededSearchId == two.NeededSearchId; one.NeededSearchId == two.NeededSearchId;
} }
} }
}

View File

@@ -4,8 +4,8 @@ using SPT.Reflection.Patching;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public static class FleaSlotSearchPatches public static class FleaSlotSearchPatches
{ {
public static void Enable() public static void Enable()
@@ -52,4 +52,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -6,8 +6,8 @@ using System.Reflection;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public static class FocusFleaOfferNumberPatches public static class FocusFleaOfferNumberPatches
{ {
public static void Enable() public static void Enable()
@@ -72,4 +72,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -4,8 +4,8 @@ using SPT.Reflection.Patching;
using System.Reflection; using System.Reflection;
using TMPro; using TMPro;
namespace UIFixes namespace UIFixes;
{
public class FocusTradeQuantityPatch : ModulePatch public class FocusTradeQuantityPatch : ModulePatch
{ {
protected override MethodBase GetTargetMethod() protected override MethodBase GetTargetMethod()
@@ -23,4 +23,3 @@ namespace UIFixes
____quantity.Select(); ____quantity.Select();
} }
} }
}

View File

@@ -9,8 +9,8 @@ using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
public static class GPCoinPatches public static class GPCoinPatches
{ {
public static void Enable() public static void Enable()
@@ -122,4 +122,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -6,8 +6,8 @@ using System.Reflection;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
public class GridWindowButtonsPatch : ModulePatch public class GridWindowButtonsPatch : ModulePatch
{ {
protected override MethodBase GetTargetMethod() protected override MethodBase GetTargetMethod()
@@ -98,4 +98,3 @@ namespace UIFixes
inspectRect.anchoredPosition = new Vector2((float)Screen.width * 3f / 4f / inspectRect.lossyScale.x, inspectRect.anchoredPosition.y); inspectRect.anchoredPosition = new Vector2((float)Screen.width * 3f / 4f / inspectRect.lossyScale.x, inspectRect.anchoredPosition.y);
} }
} }
}

View File

@@ -3,8 +3,8 @@ using HarmonyLib;
using SPT.Reflection.Patching; using SPT.Reflection.Patching;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public static class HideoutLevelPatches public static class HideoutLevelPatches
{ {
private static string CurrentArea; private static string CurrentArea;
@@ -60,7 +60,8 @@ namespace UIFixes
[PatchPrefix] [PatchPrefix]
public static bool Prefix(ref ELevelType __result) public static bool Prefix(ref ELevelType __result)
{ {
if (CurrentLevel != ELevelType.NotSet) { if (CurrentLevel != ELevelType.NotSet)
{
__result = CurrentLevel; __result = CurrentLevel;
return false; return false;
} }
@@ -84,4 +85,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -11,8 +11,8 @@ using TMPro;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
public static class HideoutSearchPatches public static class HideoutSearchPatches
{ {
private static readonly Dictionary<string, string> LastSearches = []; private static readonly Dictionary<string, string> LastSearches = [];
@@ -235,4 +235,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -9,8 +9,7 @@ using System.Reflection;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
internal static class InspectWindowResizePatches internal static class InspectWindowResizePatches
{ {
private static float SavedPreferredWidth = -1f; private static float SavedPreferredWidth = -1f;
@@ -279,4 +278,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -13,8 +13,8 @@ using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
public static class InspectWindowStatsPatches public static class InspectWindowStatsPatches
{ {
public static void Enable() public static void Enable()
@@ -517,4 +517,3 @@ namespace UIFixes
return Regex.Replace(input, @"(?<integer>\d)((?<significantDecimals>\.[0-9]*[1-9])0*\b)?(\.0+\b)?", "${integer}${significantDecimals}"); return Regex.Replace(input, @"(?<integer>\d)((?<significantDecimals>\.[0-9]*[1-9])0*\b)?(\.0+\b)?", "${integer}${significantDecimals}");
} }
} }
}

View File

@@ -5,8 +5,8 @@ using HarmonyLib;
using SPT.Reflection.Patching; using SPT.Reflection.Patching;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public static class KeepMessagesOpenPatches public static class KeepMessagesOpenPatches
{ {
private static bool ReopenMessages = false; private static bool ReopenMessages = false;
@@ -52,4 +52,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -7,8 +7,8 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace UIFixes namespace UIFixes;
{
public static class KeepOfferWindowOpenPatches public static class KeepOfferWindowOpenPatches
{ {
private static bool BlockClose = false; private static bool BlockClose = false;
@@ -156,4 +156,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -6,8 +6,8 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public static class KeepWindowsOnScreenPatches public static class KeepWindowsOnScreenPatches
{ {
public static void Enable() public static void Enable()
@@ -38,4 +38,3 @@ namespace UIFixes
public static void Postfix(List<InputNode> ____children) => FixNewestWindow(____children); public static void Postfix(List<InputNode> ____children) => FixNewestWindow(____children);
} }
} }
}

View File

@@ -8,8 +8,8 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace UIFixes namespace UIFixes;
{
public class LoadAmmoInRaidPatches public class LoadAmmoInRaidPatches
{ {
public static void Enable() public static void Enable()
@@ -80,4 +80,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -5,8 +5,8 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public class LoadMagPresetsPatch : ModulePatch public class LoadMagPresetsPatch : ModulePatch
{ {
protected override MethodBase GetTargetMethod() protected override MethodBase GetTargetMethod()
@@ -48,4 +48,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -9,8 +9,8 @@ using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public static class LoadMultipleMagazinesPatches public static class LoadMultipleMagazinesPatches
{ {
private static ItemFilter[] CombinedFilters; private static ItemFilter[] CombinedFilters;
@@ -147,4 +147,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -5,8 +5,8 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public class MoveTaskbarPatch : ModulePatch public class MoveTaskbarPatch : ModulePatch
{ {
protected override MethodBase GetTargetMethod() protected override MethodBase GetTargetMethod()
@@ -22,4 +22,3 @@ namespace UIFixes
bottomPanel.localPosition = new Vector3(0f, -3f, 0f); bottomPanel.localPosition = new Vector3(0f, -3f, 0f);
} }
} }
}

View File

@@ -17,8 +17,8 @@ using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
public static class MultiSelectPatches public static class MultiSelectPatches
{ {
// Used to prevent infinite recursion of CanAccept/AcceptItem // Used to prevent infinite recursion of CanAccept/AcceptItem
@@ -1375,4 +1375,3 @@ namespace UIFixes
return hoveredGridAddress; return hoveredGridAddress;
} }
} }
}

View File

@@ -4,8 +4,8 @@ using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using System.Reflection.Emit; using System.Reflection.Emit;
namespace UIFixes namespace UIFixes;
{
public class NoRandomGrenadesPatch : ModulePatch public class NoRandomGrenadesPatch : ModulePatch
{ {
private static NoRandomGrenadesPatch Patch; private static NoRandomGrenadesPatch Patch;
@@ -57,4 +57,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -6,8 +6,8 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public class OpenSortingTablePatch : ModulePatch public class OpenSortingTablePatch : ModulePatch
{ {
private static readonly EItemUiContextType[] AllowedScreens = [EItemUiContextType.InventoryScreen, EItemUiContextType.ScavengerInventoryScreen]; private static readonly EItemUiContextType[] AllowedScreens = [EItemUiContextType.InventoryScreen, EItemUiContextType.ScavengerInventoryScreen];
@@ -48,4 +48,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -7,8 +7,8 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public class PutToolsBackPatch : ModulePatch public class PutToolsBackPatch : ModulePatch
{ {
protected override MethodBase GetTargetMethod() protected override MethodBase GetTargetMethod()
@@ -70,4 +70,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -8,8 +8,8 @@ using HarmonyLib;
using SPT.Reflection.Patching; using SPT.Reflection.Patching;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public static class QuickAccessPanelPatches public static class QuickAccessPanelPatches
{ {
public static void Enable() public static void Enable()
@@ -102,4 +102,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -7,8 +7,8 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public class RebindGrenadesPatch : ModulePatch public class RebindGrenadesPatch : ModulePatch
{ {
private static readonly EquipmentSlot[] Slots = [EquipmentSlot.Pockets, EquipmentSlot.TacticalVest, EquipmentSlot.Backpack, EquipmentSlot.SecuredContainer, EquipmentSlot.ArmBand]; private static readonly EquipmentSlot[] Slots = [EquipmentSlot.Pockets, EquipmentSlot.TacticalVest, EquipmentSlot.Backpack, EquipmentSlot.SecuredContainer, EquipmentSlot.ArmBand];
@@ -45,4 +45,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -4,8 +4,8 @@ using SPT.Reflection.Patching;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public static class RememberRepairerPatches public static class RememberRepairerPatches
{ {
public static void Enable() public static void Enable()
@@ -49,4 +49,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -4,8 +4,8 @@ using System;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public class RemoveDoorActionsPatch : ModulePatch public class RemoveDoorActionsPatch : ModulePatch
{ {
private static readonly string[] UnimplementedActions = ["Bang & clear", "Flash & clear", "Move in"]; private static readonly string[] UnimplementedActions = ["Bang & clear", "Flash & clear", "Move in"];
@@ -35,4 +35,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -7,8 +7,8 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public static class ReorderGridsPatches public static class ReorderGridsPatches
{ {
public static void Enable() public static void Enable()
@@ -140,4 +140,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -13,8 +13,8 @@ using UnityEngine.Events;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
public static class ScrollPatches public static class ScrollPatches
{ {
public static void Enable() public static void Enable()
@@ -363,4 +363,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -6,8 +6,8 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
namespace UIFixes namespace UIFixes;
{
public static class StackFirItemsPatches public static class StackFirItemsPatches
{ {
public static void Enable() public static void Enable()
@@ -98,4 +98,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -6,8 +6,8 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public static class StackMoveGreedyPatches public static class StackMoveGreedyPatches
{ {
private static bool InPatch = false; private static bool InPatch = false;
@@ -86,4 +86,3 @@ namespace UIFixes
return false; return false;
} }
} }
}

View File

@@ -14,8 +14,8 @@ using System.Reflection;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
namespace UIFixes namespace UIFixes;
{
public static class SwapPatches public static class SwapPatches
{ {
// Source container for the drag - grab this early to check it // Source container for the drag - grab this early to check it
@@ -597,4 +597,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -6,8 +6,8 @@ using System.Reflection;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
public static class SyncScrollPositionPatches public static class SyncScrollPositionPatches
{ {
private static float StashScrollPosition = 1f; private static float StashScrollPosition = 1f;
@@ -85,4 +85,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -7,8 +7,8 @@ using System.Reflection;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
namespace UIFixes namespace UIFixes;
{
public static class TradingAutoSwitchPatches public static class TradingAutoSwitchPatches
{ {
private static Tab BuyTab; private static Tab BuyTab;
@@ -102,4 +102,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -4,8 +4,8 @@ using SPT.Reflection.Patching;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace UIFixes namespace UIFixes;
{
public class TransferConfirmPatch : ModulePatch public class TransferConfirmPatch : ModulePatch
{ {
protected override MethodBase GetTargetMethod() protected override MethodBase GetTargetMethod()
@@ -25,5 +25,4 @@ namespace UIFixes
return false; return false;
} }
} }
}

View File

@@ -9,8 +9,8 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace UIFixes namespace UIFixes;
{
public static class UnloadAmmoPatches public static class UnloadAmmoPatches
{ {
public static void Enable() public static void Enable()
@@ -99,4 +99,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -6,8 +6,7 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace UIFixes namespace UIFixes;
{
// Two patches are required for the edit preset screen - one to grab the value of moveForward from CloseScreenInterruption(), and one to use it. // Two patches are required for the edit preset screen - one to grab the value of moveForward from CloseScreenInterruption(), and one to use it.
// This is because BSG didn't think to pass the argument in to method_35 // This is because BSG didn't think to pass the argument in to method_35
public static class WeaponPresetConfirmPatches public static class WeaponPresetConfirmPatches
@@ -61,5 +60,4 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -5,8 +5,8 @@ using SPT.Reflection.Patching;
using System.Reflection; using System.Reflection;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
namespace UIFixes namespace UIFixes;
{
public static class WeaponZoomPatches public static class WeaponZoomPatches
{ {
public static void Enable() public static void Enable()
@@ -59,4 +59,3 @@ namespace UIFixes
} }
} }
} }
}

View File

@@ -2,8 +2,8 @@
using Comfort.Common; using Comfort.Common;
using EFT; using EFT;
namespace UIFixes namespace UIFixes;
{
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)] [BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
public class Plugin : BaseUnityPlugin public class Plugin : BaseUnityPlugin
{ {
@@ -71,4 +71,3 @@ namespace UIFixes
return inRaid.HasValue && inRaid.Value; return inRaid.HasValue && inRaid.Value;
} }
} }
}

5
R.cs
View File

@@ -17,8 +17,8 @@ using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
namespace UIFixes namespace UIFixes;
{
public static class R public static class R
{ {
public static void Init() public static void Init()
@@ -878,4 +878,3 @@ namespace UIFixes
public static R.InventoryScreen R(this InventoryScreen value) => new(value); public static R.InventoryScreen R(this InventoryScreen value) => new(value);
public static R.ScavengerInventoryScreen R(this ScavengerInventoryScreen value) => new(value); public static R.ScavengerInventoryScreen R(this ScavengerInventoryScreen value) => new(value);
} }
}

View File

@@ -4,8 +4,7 @@ using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
internal enum WeaponPresetConfirmationOption internal enum WeaponPresetConfirmationOption
{ {
Never, Never,
@@ -781,4 +780,3 @@ namespace UIFixes
onChange(configEntry.Value); onChange(configEntry.Value);
} }
} }
}

View File

@@ -3,8 +3,8 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using UnityEngine; using UnityEngine;
namespace UIFixes namespace UIFixes;
{
public class TaskSerializer<T> : MonoBehaviour public class TaskSerializer<T> : MonoBehaviour
{ {
private Func<T, Task> func; private Func<T, Task> func;
@@ -76,4 +76,3 @@ namespace UIFixes
Destroy(this); Destroy(this);
} }
} }
}

View File

@@ -1,7 +1,7 @@
using EFT.InputSystem; using EFT.InputSystem;
namespace UIFixes namespace UIFixes;
{
public enum ToggleHoldState public enum ToggleHoldState
{ {
Idle = 13, Idle = 13,
@@ -83,4 +83,3 @@ namespace UIFixes
return disableCommand; return disableCommand;
} }
} }
}