Decompiled source of FlameMod v2.0.0

BepInEx/plugins/raisin.muck.flamemod.dll

Decompiled 4 days ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;

[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.6", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("FlameMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyInformationalVersion("2.0.0")]
[assembly: AssemblyProduct("FlameMod")]
[assembly: AssemblyTitle("FlameMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("2.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace FlameMod
{
	[BepInPlugin("raisin.muck.flamemod", "FlameMod", "2.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		private const string GUID = "raisin.muck.flamemod";

		private const string NAME = "FlameMod";

		private const string VERSION = "2.0.0";

		internal static ManualLogSource Logger;

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			Logger.LogInfo((object)"Plugin raisin.muck.flamemod is loaded!");
			Harmony.CreateAndPatchAll(typeof(Plugin), (string)null);
		}

		[HarmonyPatch(typeof(HitableResource), "Start")]
		[HarmonyPostfix]
		public static void DoTorching(HitableResource __instance)
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			if (!(((Hitable)__instance).entityName != "Torch"))
			{
				Light val = ((Component)__instance).gameObject.AddComponent<Light>();
				Color32 val2 = default(Color32);
				ColorUtility.DoTryParseHtmlColor("#fb6500ff", ref val2);
				val.color = Color32.op_Implicit(val2);
				val.intensity = 5f;
			}
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "FlameMod";

		public const string PLUGIN_NAME = "FlameMod";

		public const string PLUGIN_VERSION = "2.0.0";
	}
}