diff --git a/CustomInteractions.Prepatch/CustomInteractions.Prepatch.csproj b/CustomInteractions.Prepatch/CustomInteractions.Prepatch.csproj index cf5bfd2..ad6167f 100644 --- a/CustomInteractions.Prepatch/CustomInteractions.Prepatch.csproj +++ b/CustomInteractions.Prepatch/CustomInteractions.Prepatch.csproj @@ -3,7 +3,7 @@ net472 IcyClawz.CustomInteractions.Prepatch - 1.4.0 + 1.5.0 IcyClawz.CustomInteractions latest diff --git a/CustomInteractions/CustomInteractions.cs b/CustomInteractions/CustomInteractions.cs index f607632..5c3f09a 100644 --- a/CustomInteractions/CustomInteractions.cs +++ b/CustomInteractions/CustomInteractions.cs @@ -9,7 +9,7 @@ using System.Linq; using System.Reflection; using UnityEngine; -using EmptyInteractionsAbstractClass = GClass3039; +using EmptyInteractionsAbstractClass = GClass3061; namespace IcyClawz.CustomInteractions; diff --git a/CustomInteractions/CustomInteractions.csproj b/CustomInteractions/CustomInteractions.csproj index 08f961d..e9530d2 100644 --- a/CustomInteractions/CustomInteractions.csproj +++ b/CustomInteractions/CustomInteractions.csproj @@ -3,15 +3,12 @@ net472 IcyClawz.CustomInteractions - 1.4.0 + 1.5.0 IcyClawz.CustomInteractions latest - - ..\Shared\Aki.Reflection.dll - ..\Shared\Assembly-CSharp-CustomInteractions.dll @@ -24,6 +21,9 @@ ..\Shared\Sirenix.Serialization.dll + + ..\Shared\spt-reflection.dll + ..\Shared\UnityEngine.dll diff --git a/CustomInteractions/Plugin.cs b/CustomInteractions/Plugin.cs index ec15f64..585ac44 100644 --- a/CustomInteractions/Plugin.cs +++ b/CustomInteractions/Plugin.cs @@ -1,12 +1,12 @@ -using Aki.Reflection.Patching; using BepInEx; using EFT.UI; +using SPT.Reflection.Patching; using System.Linq; using System.Reflection; namespace IcyClawz.CustomInteractions; -[BepInPlugin("com.IcyClawz.CustomInteractions", "IcyClawz.CustomInteractions", "1.4.0")] +[BepInPlugin("com.IcyClawz.CustomInteractions", "IcyClawz.CustomInteractions", "1.5.0")] public class Plugin : BaseUnityPlugin { private void Awake() diff --git a/ItemAttributeFix/ItemAttributeFix.csproj b/ItemAttributeFix/ItemAttributeFix.csproj index da0dcb2..fe800a1 100644 --- a/ItemAttributeFix/ItemAttributeFix.csproj +++ b/ItemAttributeFix/ItemAttributeFix.csproj @@ -3,21 +3,21 @@ net472 IcyClawz.ItemAttributeFix - 1.3.0 + 1.4.0 IcyClawz.ItemAttributeFix latest - - ..\Shared\Aki.Reflection.dll - ..\Shared\Assembly-CSharp.dll ..\Shared\BepInEx.dll + + ..\Shared\spt-reflection.dll + ..\Shared\UnityEngine.dll diff --git a/ItemAttributeFix/Plugin.cs b/ItemAttributeFix/Plugin.cs index 50c8247..9535d5f 100644 --- a/ItemAttributeFix/Plugin.cs +++ b/ItemAttributeFix/Plugin.cs @@ -1,11 +1,11 @@ -using Aki.Reflection.Patching; using BepInEx; using EFT.UI; +using SPT.Reflection.Patching; using System.Reflection; namespace IcyClawz.ItemAttributeFix; -[BepInPlugin("com.IcyClawz.ItemAttributeFix", "IcyClawz.ItemAttributeFix", "1.3.0")] +[BepInPlugin("com.IcyClawz.ItemAttributeFix", "IcyClawz.ItemAttributeFix", "1.4.0")] public class Plugin : BaseUnityPlugin { private void Awake() => diff --git a/ItemContextMenuExt/ItemContextMenuExt.cs b/ItemContextMenuExt/ItemContextMenuExt.cs index b32780a..7892da8 100644 --- a/ItemContextMenuExt/ItemContextMenuExt.cs +++ b/ItemContextMenuExt/ItemContextMenuExt.cs @@ -8,8 +8,8 @@ using System.Linq; using System.Reflection; using UnityEngine; -using ILightTemplate = GInterface295; -using GlobalEvents = GClass3019; +using ILightTemplate = GInterface310; +using GlobalEvents = GClass3040; namespace IcyClawz.ItemContextMenuExt; diff --git a/ItemContextMenuExt/ItemContextMenuExt.csproj b/ItemContextMenuExt/ItemContextMenuExt.csproj index 72735d2..14e4391 100644 --- a/ItemContextMenuExt/ItemContextMenuExt.csproj +++ b/ItemContextMenuExt/ItemContextMenuExt.csproj @@ -3,11 +3,15 @@ net472 IcyClawz.ItemContextMenuExt - 1.4.0 + 1.5.0 IcyClawz.ItemContextMenuExt latest + + + + ..\Shared\Assembly-CSharp.dll diff --git a/ItemContextMenuExt/Plugin.cs b/ItemContextMenuExt/Plugin.cs index 488b3e2..940b56c 100644 --- a/ItemContextMenuExt/Plugin.cs +++ b/ItemContextMenuExt/Plugin.cs @@ -3,7 +3,7 @@ using IcyClawz.CustomInteractions; namespace IcyClawz.ItemContextMenuExt; -[BepInPlugin("com.IcyClawz.ItemContextMenuExt", "IcyClawz.ItemContextMenuExt", "1.4.0")] +[BepInPlugin("com.IcyClawz.ItemContextMenuExt", "IcyClawz.ItemContextMenuExt", "1.5.0")] [BepInDependency("com.IcyClawz.CustomInteractions")] public class Plugin : BaseUnityPlugin { diff --git a/ItemSellPrice/ItemSellPrice.cs b/ItemSellPrice/ItemSellPrice.cs index 7eb6486..026d89b 100644 --- a/ItemSellPrice/ItemSellPrice.cs +++ b/ItemSellPrice/ItemSellPrice.cs @@ -1,14 +1,14 @@ -using Aki.Reflection.Utils; using Comfort.Common; using EFT; using EFT.InventoryLogic; +using SPT.Reflection.Utils; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using UnityEngine; -using CurrencyUtil = GClass2517; +using CurrencyUtil = GClass2531; namespace IcyClawz.ItemSellPrice; diff --git a/ItemSellPrice/ItemSellPrice.csproj b/ItemSellPrice/ItemSellPrice.csproj index 1df5fe0..f9a5d6e 100644 --- a/ItemSellPrice/ItemSellPrice.csproj +++ b/ItemSellPrice/ItemSellPrice.csproj @@ -3,15 +3,12 @@ net472 IcyClawz.ItemSellPrice - 1.3.0 + 1.4.0 IcyClawz.ItemSellPrice latest - - ..\Shared\Aki.Reflection.dll - ..\Shared\Assembly-CSharp.dll @@ -21,6 +18,9 @@ ..\Shared\Comfort.dll + + ..\Shared\spt-reflection.dll + ..\Shared\UnityEngine.dll diff --git a/ItemSellPrice/Plugin.cs b/ItemSellPrice/Plugin.cs index 72f2ede..ecd1fb8 100644 --- a/ItemSellPrice/Plugin.cs +++ b/ItemSellPrice/Plugin.cs @@ -1,11 +1,11 @@ -using Aki.Reflection.Patching; using BepInEx; using EFT.InventoryLogic; +using SPT.Reflection.Patching; using System.Reflection; namespace IcyClawz.ItemSellPrice; -[BepInPlugin("com.IcyClawz.ItemSellPrice", "IcyClawz.ItemSellPrice", "1.3.0")] +[BepInPlugin("com.IcyClawz.ItemSellPrice", "IcyClawz.ItemSellPrice", "1.4.0")] public class Plugin : BaseUnityPlugin { private void Awake() diff --git a/MagazineInspector/MagazineInspector.cs b/MagazineInspector/MagazineInspector.cs index d01c866..85ded91 100644 --- a/MagazineInspector/MagazineInspector.cs +++ b/MagazineInspector/MagazineInspector.cs @@ -1,13 +1,13 @@ -using Aki.Reflection.Utils; using Comfort.Common; using EFT; using EFT.InventoryLogic; +using SPT.Reflection.Utils; using System; using System.Collections.Generic; using System.Linq; using UnityEngine; -using InGameStatus = GClass1849; +using InGameStatus = GClass1864; namespace IcyClawz.MagazineInspector; diff --git a/MagazineInspector/MagazineInspector.csproj b/MagazineInspector/MagazineInspector.csproj index 20d2fad..45bb251 100644 --- a/MagazineInspector/MagazineInspector.csproj +++ b/MagazineInspector/MagazineInspector.csproj @@ -3,15 +3,12 @@ net472 IcyClawz.MagazineInspector - 1.3.0 + 1.4.0 IcyClawz.MagazineInspector latest - - ..\Shared\Aki.Reflection.dll - ..\Shared\Assembly-CSharp.dll @@ -21,6 +18,9 @@ ..\Shared\Comfort.dll + + ..\Shared\spt-reflection.dll + ..\Shared\UnityEngine.dll diff --git a/MagazineInspector/Plugin.cs b/MagazineInspector/Plugin.cs index 98d0149..4686071 100644 --- a/MagazineInspector/Plugin.cs +++ b/MagazineInspector/Plugin.cs @@ -1,10 +1,10 @@ -using Aki.Reflection.Patching; using BepInEx; +using SPT.Reflection.Patching; using System.Reflection; namespace IcyClawz.MagazineInspector; -[BepInPlugin("com.IcyClawz.MagazineInspector", "IcyClawz.MagazineInspector", "1.3.0")] +[BepInPlugin("com.IcyClawz.MagazineInspector", "IcyClawz.MagazineInspector", "1.4.0")] public class Plugin : BaseUnityPlugin { private void Awake() => diff --git a/MunitionsExpert/MunitionsExpert.cs b/MunitionsExpert/MunitionsExpert.cs index 64b606d..c5381eb 100644 --- a/MunitionsExpert/MunitionsExpert.cs +++ b/MunitionsExpert/MunitionsExpert.cs @@ -39,7 +39,7 @@ internal static class ColorCache internal enum EAmmoExtraAttributeId { - Damage, PenetrationPower, ArmorDamage, FragmentationChance, RicochetChance + ArmorDamage, FragmentationChance, RicochetChance } internal static class ImageExtensions @@ -48,8 +48,8 @@ internal static class ImageExtensions { using MemoryStream ms = new(); instance.Save(ms, System.Drawing.Imaging.ImageFormat.Png); - Texture2D texture = new(instance.Width, instance.Height); - ImageConversion.LoadImage(texture, ms.ToArray()); + Texture2D texture = new(instance.Width, instance.Height, TextureFormat.RGBA32, false); + texture.LoadImage(ms.ToArray()); return Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), Vector2.zero); } } @@ -58,8 +58,6 @@ internal static class IconCache { private static readonly Dictionary Cache = new() { - [EAmmoExtraAttributeId.Damage] = Properties.Resources.Damage.ToSprite(), - [EAmmoExtraAttributeId.PenetrationPower] = Properties.Resources.PenetrationPower.ToSprite(), [EAmmoExtraAttributeId.ArmorDamage] = Properties.Resources.ArmorDamage.ToSprite(), [EAmmoExtraAttributeId.FragmentationChance] = Properties.Resources.FragmentationChance.ToSprite(), [EAmmoExtraAttributeId.RicochetChance] = Properties.Resources.RicochetChance.ToSprite() @@ -78,34 +76,6 @@ internal static class AmmoTemplateExtensions public static void AddExtraAttributes(this AmmoTemplate instance) { - instance.SafelyAddQualityToList(new ItemAttributeClass(EAmmoExtraAttributeId.Damage) - { - Name = EAmmoExtraAttributeId.Damage.ToString(), - DisplayNameFunc = () => "Damage", - Base = () => instance.Damage * instance.ProjectileCount, - StringValue = () => - { - int totalDamage = instance.Damage * instance.ProjectileCount; - return instance.ProjectileCount > 1 - ? $"{instance.ProjectileCount} × {instance.Damage} = {totalDamage}" - : totalDamage.ToString(); - }, - DisplayType = () => EItemAttributeDisplayType.Compact - }); - - instance.SafelyAddQualityToList(new ItemAttributeClass(EAmmoExtraAttributeId.PenetrationPower) - { - Name = EAmmoExtraAttributeId.PenetrationPower.ToString(), - DisplayNameFunc = () => "Penetration power", - Base = () => instance.PenetrationPower, - StringValue = () => - { - int armorClass = instance.GetPenetrationArmorClass(); - return (armorClass > 0 ? $"Class {armorClass}" : "Unarmored") + $" ({instance.PenetrationPower})"; - }, - DisplayType = () => EItemAttributeDisplayType.Compact - }); - instance.SafelyAddQualityToList(new ItemAttributeClass(EAmmoExtraAttributeId.ArmorDamage) { Name = EAmmoExtraAttributeId.ArmorDamage.ToString(), diff --git a/MunitionsExpert/MunitionsExpert.csproj b/MunitionsExpert/MunitionsExpert.csproj index 0340f4a..52b96d8 100644 --- a/MunitionsExpert/MunitionsExpert.csproj +++ b/MunitionsExpert/MunitionsExpert.csproj @@ -3,15 +3,12 @@ net472 IcyClawz.MunitionsExpert - 1.3.0 + 1.4.0 IcyClawz.MunitionsExpert latest - - ..\Shared\Aki.Reflection.dll - ..\Shared\Assembly-CSharp.dll @@ -24,6 +21,9 @@ ..\Shared\Sirenix.Serialization.dll + + ..\Shared\spt-reflection.dll + ..\Shared\UnityEngine.dll diff --git a/MunitionsExpert/Plugin.cs b/MunitionsExpert/Plugin.cs index e074534..38992ae 100644 --- a/MunitionsExpert/Plugin.cs +++ b/MunitionsExpert/Plugin.cs @@ -1,10 +1,10 @@ -using Aki.Reflection.Patching; using BepInEx; using BepInEx.Configuration; using EFT.HandBook; using EFT.InventoryLogic; using EFT.UI; using EFT.UI.DragAndDrop; +using SPT.Reflection.Patching; using System; using System.Collections.Generic; using System.Reflection; @@ -13,7 +13,7 @@ using UnityEngine.UI; namespace IcyClawz.MunitionsExpert; -[BepInPlugin("com.IcyClawz.MunitionsExpert", "IcyClawz.MunitionsExpert", "1.3.0")] +[BepInPlugin("com.IcyClawz.MunitionsExpert", "IcyClawz.MunitionsExpert", "1.4.0")] public class Plugin : BaseUnityPlugin { private static ConfigEntry ColorizeSwitch { get; set; } diff --git a/MunitionsExpert/Properties/Resources.Designer.cs b/MunitionsExpert/Properties/Resources.Designer.cs index 0c0ac3d..c2bf260 100644 --- a/MunitionsExpert/Properties/Resources.Designer.cs +++ b/MunitionsExpert/Properties/Resources.Designer.cs @@ -70,16 +70,6 @@ internal class Resources { } } - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Damage { - get { - object obj = ResourceManager.GetObject("Damage", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -90,16 +80,6 @@ internal class Resources { } } - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap PenetrationPower { - get { - object obj = ResourceManager.GetObject("PenetrationPower", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/MunitionsExpert/Properties/Resources.resx b/MunitionsExpert/Properties/Resources.resx index 4286fde..db5cb96 100644 --- a/MunitionsExpert/Properties/Resources.resx +++ b/MunitionsExpert/Properties/Resources.resx @@ -121,15 +121,9 @@ ..\Resources\ArmorDamage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Damage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\FragmentationChance.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\PenetrationPower.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\RicochetChance.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/MunitionsExpert/Resources/Damage.png b/MunitionsExpert/Resources/Damage.png deleted file mode 100644 index ba8012a..0000000 Binary files a/MunitionsExpert/Resources/Damage.png and /dev/null differ diff --git a/MunitionsExpert/Resources/PenetrationPower.png b/MunitionsExpert/Resources/PenetrationPower.png deleted file mode 100644 index 9cfda7d..0000000 Binary files a/MunitionsExpert/Resources/PenetrationPower.png and /dev/null differ