using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using Assets.Scripts.Inventory__Items__Pickups.Chests;
using Assets.Scripts.Inventory__Items__Pickups.GoldAndMoney;
using BepInEx;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("firstmod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("firstmod")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("23b709b4-55e0-4ba2-b35f-80102d64fe1e")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
[BepInPlugin("com.waynethepro250.freechests", "Free Chests by waynethepro250", "1.0.0")]
public class FreeChestsByWayne : BasePlugin
{
public override void Load()
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
((BasePlugin)this).Log.LogInfo((object)"Free Chests by waynethepro250 loaded!");
new Harmony("com.waynethepro250.freechests").PatchAll();
}
}
[HarmonyPatch(typeof(InteractableChest))]
internal static class InteractableChestPatches
{
[HarmonyPatch("GetPrice")]
[HarmonyPrefix]
private static bool GetPrice_Prefix(ref int __result)
{
__result = 0;
Debug.Log((object)"[FreeChests by waynethepro250] InteractableChest.GetPrice() → 0");
return false;
}
[HarmonyPatch("CanAfford")]
[HarmonyPrefix]
private static bool CanAfford_Prefix(ref bool __result)
{
__result = true;
return false;
}
}
[HarmonyPatch(typeof(MoneyUtility))]
internal static class MoneyUtilityPatches
{
[HarmonyPatch("GetChestPrice")]
[HarmonyPrefix]
private static bool GetChestPrice_Prefix(ref int __result)
{
__result = 0;
Debug.Log((object)"[FreeChests by waynethepro250] MoneyUtility.GetChestPrice() → 0");
return false;
}
}