Code updates

This commit is contained in:
pan.codes 2025-06-08 21:38:33 +02:00
parent 6e2d2fac98
commit eefc098b20
6 changed files with 109 additions and 8 deletions

View file

@ -0,0 +1,14 @@
using HarmonyLib;
using System.Linq;
namespace CurrencyChanger2.Patches
{
[HarmonyPatch(typeof(PriceManager), "ChangeCurrentCost")]
public static class PriceManager_ChangeCurrentCost_Patch
{
public static void Postfix(int productID, PriceManager __instance)
{
if(PriceChanger.Override.Value) PriceChanger.ConfigEntries[productID].Value = __instance.m_CurrentCosts.FirstOrDefault((Pricing i) => i.ProductID == productID).Price;
}
}
}