using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using UnityEngine;
using UnityEngine.SceneManagement;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("CellarStandToIceBox")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CellarStandToIceBox")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("116685BE-2CE0-4732-AE59-076CE69431E4")]
[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.lan.CellarStandToIceBox", "地窖摊位变冰箱", "1.1.0")]
[HarmonyPatch]
public class CellarStandToIceBox : BaseUnityPlugin
{
private void Awake()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
Harmony val = new Harmony("com.lan.CellarStandToIceBox");
val.PatchAll();
Debug.LogWarning((object)"地窖摊位变冰箱--CellarStand to IceBox --作者:她说缝上都不给我");
SceneManager.sceneLoaded += OnSceneLoaded;
}
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)GameManager.Instance == (Object)null))
{
ItemSO itemById = GameManager.Instance.GetItemById(1715710690842L);
itemById.basePrice = 2000;
BlockSO val = (BlockSO)(object)((itemById is BlockSO) ? itemById : null);
val.placementLayerMask = LayerMask.op_Implicit(LayerMask.GetMask(new string[1] { "MarketFloor" }));
val.maintenanceCost = 150;
val.isStand = true;
}
}
[HarmonyPostfix]
[HarmonyPatch(typeof(Block), "OnNetworkSpawn")]
public static void PostfixOnNetworkSpawn(Block __instance)
{
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
BlockSO blockSO = __instance.blockSO;
if (((ItemSO)blockSO).id == 1715710690842L)
{
Vector3 size = __instance.blueprintTrigger.size;
size.y += 1f;
size.x += 1f;
size.z += 1f;
__instance.blueprintTrigger.size = size;
((Component)__instance.blueprintTrigger).tag = "Freezer";
}
}
}