diff --git a/MunitionsExpert/MunitionsExpert.csproj b/MunitionsExpert/MunitionsExpert.csproj
index 99f4f1f..d071336 100644
--- a/MunitionsExpert/MunitionsExpert.csproj
+++ b/MunitionsExpert/MunitionsExpert.csproj
@@ -3,7 +3,7 @@
net472
IcyClawz.MunitionsExpert
- 1.1.0
+ 1.1.1
IcyClawz.MunitionsExpert
diff --git a/MunitionsExpert/Plugin.cs b/MunitionsExpert/Plugin.cs
index c4949af..124f0fc 100644
--- a/MunitionsExpert/Plugin.cs
+++ b/MunitionsExpert/Plugin.cs
@@ -1,5 +1,6 @@
using Aki.Reflection.Patching;
using BepInEx;
+using BepInEx.Configuration;
using EFT.HandBook;
using EFT.InventoryLogic;
using EFT.UI;
@@ -11,11 +12,14 @@ using UnityEngine;
namespace IcyClawz.MunitionsExpert
{
- [BepInPlugin("com.IcyClawz.MunitionsExpert", "IcyClawz.MunitionsExpert", "1.1.0")]
+ [BepInPlugin("com.IcyClawz.MunitionsExpert", "IcyClawz.MunitionsExpert", "1.1.1")]
public class Plugin : BaseUnityPlugin
{
+ internal static ConfigEntry ColorizeItemBackgrounds;
+
private void Awake()
{
+ ColorizeItemBackgrounds = Config.Bind("General", "Colorize Icon Backgrounds", true);
IconCache.Initialize();
new StaticIconsPatch().Enable();
new AmmoTemplatePatch().Enable();
@@ -78,7 +82,10 @@ namespace IcyClawz.MunitionsExpert
[PatchPrefix]
private static void PatchPrefix(ref ItemView __instance)
{
- __instance.OverrideColor(__instance.Item);
+ if (Plugin.ColorizeItemBackgrounds.Value)
+ {
+ __instance.OverrideColor(__instance.Item);
+ }
}
}
@@ -90,7 +97,10 @@ namespace IcyClawz.MunitionsExpert
[PatchPostfix]
private static void PatchPostfix(ref EntityIcon __instance, Item item)
{
- __instance.OverrideColor(item);
+ if (Plugin.ColorizeItemBackgrounds.Value)
+ {
+ __instance.OverrideColor(item);
+ }
}
}
}