using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("FogRepellerModifier")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("FogRepellerModifier")]
[assembly: AssemblyTitle("FogRepellerModifier")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace FogRepellerModifier
{
[HarmonyPatch]
internal static class Patch
{
[HarmonyPatch(typeof(FogRepellerInstance), "Start")]
[HarmonyPostfix]
public static void Start_Postfix(FogRepellerInstance __instance)
{
if (!((Object)(object)__instance == (Object)null) && !((Object)(object)__instance.m_repellerSphere == (Object)null))
{
__instance.m_repellerSphere.LifeDuration = Plugin.lifetime.Value;
__instance.m_repellerSphere.Range = Plugin.range.Value;
__instance.m_repellerSphere.GrowDuration = Plugin.growDuration.Value;
__instance.m_repellerSphere.ShrinkDuration = Plugin.shrinkDuration.Value;
__instance.m_repellerSphere.Density = Plugin.density.Value;
}
}
}
[BepInPlugin("INF.FogRepellerModifier", "FogRepellerModifier", "1.0.0")]
public class Plugin : BasePlugin
{
public static ManualLogSource L;
public static ConfigEntry<float> range { get; set; }
public static ConfigEntry<float> lifetime { get; set; }
public static ConfigEntry<float> growDuration { get; set; }
public static ConfigEntry<float> shrinkDuration { get; set; }
public static ConfigEntry<float> density { get; set; }
public override void Load()
{
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
range = ((BasePlugin)this).Config.Bind<float>("Properties", "Range", 11f, "Fog repeller range");
lifetime = ((BasePlugin)this).Config.Bind<float>("Properties", "Lifetime", 70f, "Fog repeller duration in seconds");
growDuration = ((BasePlugin)this).Config.Bind<float>("Properties", "GrowDuration", 8f, "Growth duration of the fog repelled area until its full range");
shrinkDuration = ((BasePlugin)this).Config.Bind<float>("Properties", "ShrinkDuration", 10f, "Shrink duration of the fog repelled area until its fully gone");
density = ((BasePlugin)this).Config.Bind<float>("Properties", "Density", -7f, "Density of the fog repelled area");
new Harmony("INF.FogRepellerModifier").PatchAll();
((BasePlugin)this).Log.LogInfo((object)"=== > [ INF.MaxConsumables is Loaded ] < ===");
L = ((BasePlugin)this).Log;
}
}
}