using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using HarmonyLib;
using QModManager.API.ModLoading;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("Base_Deconstruct_Fix")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Base_Deconstruct_Fix")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("dcd591d8-8e05-4970-bf42-c5cff13460f3")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("2.1.0.0")]
[module: UnverifiableCode]
namespace Base_Deconstruct_Fix
{
[QModCore]
public static class Main
{
internal static Assembly assembly = Assembly.GetExecutingAssembly();
[QModPatch]
public static void Load()
{
Harmony.CreateAndPatchAll(assembly, "MrPurple6411_" + assembly.GetName().Name);
}
}
}
namespace Base_Deconstruct_Fix.Patches
{
[HarmonyPatch(typeof(BaseDeconstructable), "Deconstruct")]
public static class BaseDeconstructable_Patches
{
[HarmonyPrefix]
public static void Postfix(ref BaseDeconstructable __instance)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Invalid comparison between Unknown and I4
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Invalid comparison between Unknown and I4
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
if ((int)__instance.recipe == 5508 || (int)__instance.recipe == 5521)
{
switch (((Object)__instance).name)
{
case "BaseCorridorIShape(Clone)":
__instance.recipe = (TechType)5510;
break;
case "BaseCorridorIShapeGlass(Clone)":
__instance.recipe = (TechType)5516;
break;
case "BaseCorridorLShape(Clone)":
__instance.recipe = (TechType)5511;
break;
case "BaseCorridorLShapeGlass(Clone)":
__instance.recipe = (TechType)5517;
break;
case "BaseCorridorTShape(Clone)":
__instance.recipe = (TechType)5512;
break;
case "BaseCorridorXShape(Clone)":
__instance.recipe = (TechType)5513;
break;
}
}
}
}
}