using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
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("LCParanoiaReset")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LCParanoiaReset")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("ced0e28c-61da-4f8c-9605-2ae837787aa4")]
[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")]
namespace GhostGirlFearReset
{
[BepInPlugin("financierhdn.GhostGirlFearReset", "GhostGirlFearReset", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
private readonly Harmony harmony = new Harmony("finacierhdn.GhostGirlFearReset");
private static Plugin Instance;
internal ManualLogSource logger;
private void Awake()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
if ((Object)Instance == (Object)null)
{
Instance = this;
}
logger = Logger.CreateLogSource("GhostGirlFearReset");
harmony.PatchAll(typeof(Plugin).Assembly);
logger.LogInfo((object)"GhostGirlFearReset has loaded!");
}
}
}
namespace GhostGirlFearReset.Patches
{
[HarmonyPatch(typeof(StartOfRound), "ResetStats")]
internal static class ParanoiaResetPatch
{
[HarmonyPostfix]
private static void ResetFearCounters()
{
for (int i = 0; i < StartOfRound.Instance.gameStats.allPlayerStats.Length; i++)
{
StartOfRound.Instance.gameStats.allPlayerStats[i].turnAmount = 0;
StartOfRound.Instance.allPlayerScripts[i].hasBeenCriticallyInjured = false;
}
}
}
}