Decompiled source of quiet conditions v1.0.3

quiet conditions.dll

Decompiled 2 weeks ago
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;
using quiet_conditions.Patches;

[assembly: AssemblyTitle("quiet conditions")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("quiet conditions")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("1be1c769-1b80-41c9-83b6-dbbd9146ea74")]
[assembly: AssemblyFileVersion("1.0.2")]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.2.0")]
namespace quiet_conditions
{
	[BepInPlugin("quiet-conditions", "quiet conditions", "1.0.3")]
	public class QConditions : BaseUnityPlugin
	{
		private const string modGUID = "quiet-conditions";

		private const string modName = "quiet conditions";

		private const string modVersion = "1.0.3";

		private readonly Harmony harmony = new Harmony("quiet-conditions");

		private static QConditions qconditions;

		public static ManualLogSource mls { get; private set; }

		private void Awake()
		{
			if ((Object)(object)qconditions == (Object)null)
			{
				qconditions = this;
			}
			mls = Logger.CreateLogSource("quiet-conditions");
			mls.LogInfo((object)"quiet conditions initialized!");
			harmony.PatchAll(typeof(QConditions));
			harmony.PatchAll(typeof(ScriptableConditionPatch));
		}
	}
}
namespace quiet_conditions.Patches
{
	[HarmonyPatch(typeof(ScriptableCondition))]
	internal class ScriptableConditionPatch
	{
		[HarmonyPatch("Apply_ConditionToEntity")]
		[HarmonyPrefix]
		private static void HushConditionsPatch(ref ScriptableCondition __instance)
		{
			if ((Object)(object)__instance._conditionObject != (Object)null)
			{
				__instance._conditionObject = null;
			}
			if ((Object)(object)__instance._endConditionObject != (Object)null)
			{
				__instance._endConditionObject = null;
			}
			if (__instance._tintEntityOnEffect)
			{
				__instance._tintEntityOnEffect = false;
			}
			if (__instance._shineEntityOnEffect)
			{
				__instance._shineEntityOnEffect = false;
			}
		}
	}
}