Decompiled source of RainbowFlames v0.0.7

RainbowFlames.dll

Decompiled 8 months ago
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security.Permissions;
using BepInEx;
using Jotunn;
using Jotunn.Configs;
using Jotunn.Entities;
using Jotunn.Managers;
using Jotunn.Utils;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("RainbowFlames")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RainbowFlames")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e3243d22-4307-4008-ba36-9f326008cde5")]
[assembly: AssemblyFileVersion("0.0.4.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.4.0")]
namespace RainbowFlames;

[BepInPlugin("com.jensen.valheim.rainbowflames", "RainbowFlames", "0.0.4")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
internal class RainbowFlames : BaseUnityPlugin
{
	public const string PluginGUID = "com.jensen.valheim.rainbowflames";

	public const string PluginName = "RainbowFlames";

	public const string PluginVersion = "0.0.4";

	public static CustomLocalization Localization = LocalizationManager.Instance.GetLocalization();

	private void Awake()
	{
		Logger.LogInfo((object)"Loading: RainbowFlames");
		PrefabManager.OnVanillaPrefabsAvailable += AddGroundTorches;
		PrefabManager.OnVanillaPrefabsAvailable += AddWallTorches;
	}

	private Sprite LoadIcon(string fileName)
	{
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Expected O, but got Unknown
		//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
		Assembly executingAssembly = Assembly.GetExecutingAssembly();
		string text = null;
		try
		{
			text = executingAssembly.GetManifestResourceNames().Single((string str) => str.EndsWith(fileName));
		}
		catch (Exception)
		{
		}
		if (text == null)
		{
			Logger.LogError((object)("Sprite image " + fileName + " not found in assembly manifest"));
			return null;
		}
		Texture2D val = new Texture2D(2, 2);
		using (Stream stream = executingAssembly.GetManifestResourceStream(text))
		{
			MemoryStream memoryStream = new MemoryStream();
			stream.CopyTo(memoryStream);
			ImageConversion.LoadImage(val, memoryStream.ToArray());
		}
		return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), default(Vector2), 100f);
	}

	private void AddGroundTorch(string name, Gradient flameGradient, Color32 pointLightColor, Color32 flareColor, RequirementConfig[] requirementConfigs)
	{
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Expected O, but got Unknown
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Expected O, but got Unknown
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_011f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0124: Unknown result type (might be due to invalid IL or missing references)
		//IL_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_0129: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0151: Unknown result type (might be due to invalid IL or missing references)
		//IL_0156: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Unknown result type (might be due to invalid IL or missing references)
		Sprite icon = LoadIcon(name + "TorchIcon.png");
		CustomPiece val = new CustomPiece("piece_groundtorch" + name.ToLower(), "piece_groundtorch", new PieceConfig
		{
			Name = "$piece_groundtorch" + name.ToLower(),
			Description = "",
			PieceTable = "Hammer",
			Category = "Furniture",
			Icon = icon,
			Requirements = requirementConfigs
		});
		GameObject gameObject = ((Component)((Component)val.Piece).transform.Find("_enabled")).gameObject;
		Fireplace component = val.PiecePrefab.GetComponent<Fireplace>();
		component.m_name = "$piece_groundtorch" + name.ToLower();
		((Object)component).name = "$piece_groundtorch" + name.ToLower();
		component.m_fuelItem = val.Piece.m_resources[1].m_resItem;
		((Component)gameObject.transform.Find("Point light")).gameObject.GetComponent<Light>().color = Color32.op_Implicit(pointLightColor);
		MainModule main = ((Component)gameObject.transform.Find("flare")).gameObject.GetComponent<ParticleSystem>().main;
		((MainModule)(ref main)).startColor = new MinMaxGradient(Color32.op_Implicit(flareColor));
		ColorOverLifetimeModule colorOverLifetime = ((Component)gameObject.transform.Find("flames (1)")).gameObject.GetComponent<ParticleSystem>().colorOverLifetime;
		((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(flameGradient);
		PieceManager.Instance.AddPiece(val);
		Logger.LogInfo((object)("Added " + name + " Ground Torch piece"));
	}

	private void AddGroundTorches()
	{
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Expected O, but got Unknown
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0076: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0085: 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_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0107: Unknown result type (might be due to invalid IL or missing references)
		//IL_010c: Unknown result type (might be due to invalid IL or missing references)
		//IL_011d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0122: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_014a: Unknown result type (might be due to invalid IL or missing references)
		//IL_014f: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0161: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Expected O, but got Unknown
		//IL_016b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0170: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0183: Expected O, but got Unknown
		//IL_018b: Unknown result type (might be due to invalid IL or missing references)
		//IL_018c: Unknown result type (might be due to invalid IL or missing references)
		//IL_01be: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c5: Expected O, but got Unknown
		//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_0209: Unknown result type (might be due to invalid IL or missing references)
		//IL_020e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0218: Unknown result type (might be due to invalid IL or missing references)
		//IL_021d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0232: Unknown result type (might be due to invalid IL or missing references)
		//IL_0237: Unknown result type (might be due to invalid IL or missing references)
		//IL_0241: Unknown result type (might be due to invalid IL or missing references)
		//IL_0246: Unknown result type (might be due to invalid IL or missing references)
		//IL_025d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0262: Unknown result type (might be due to invalid IL or missing references)
		//IL_0273: Unknown result type (might be due to invalid IL or missing references)
		//IL_0278: Unknown result type (might be due to invalid IL or missing references)
		//IL_0289: Unknown result type (might be due to invalid IL or missing references)
		//IL_028e: Unknown result type (might be due to invalid IL or missing references)
		//IL_029f: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d5: Expected O, but got Unknown
		//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ef: Expected O, but got Unknown
		//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0327: Unknown result type (might be due to invalid IL or missing references)
		//IL_032e: Expected O, but got Unknown
		//IL_0346: Unknown result type (might be due to invalid IL or missing references)
		//IL_034b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0355: Unknown result type (might be due to invalid IL or missing references)
		//IL_035a: Unknown result type (might be due to invalid IL or missing references)
		//IL_036f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0374: Unknown result type (might be due to invalid IL or missing references)
		//IL_037e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0383: Unknown result type (might be due to invalid IL or missing references)
		//IL_0396: Unknown result type (might be due to invalid IL or missing references)
		//IL_039b: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_03dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_03f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0403: Unknown result type (might be due to invalid IL or missing references)
		//IL_0408: Unknown result type (might be due to invalid IL or missing references)
		//IL_041a: Unknown result type (might be due to invalid IL or missing references)
		//IL_041f: Unknown result type (might be due to invalid IL or missing references)
		//IL_042a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0431: Unknown result type (might be due to invalid IL or missing references)
		//IL_0439: Expected O, but got Unknown
		//IL_043b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0440: Unknown result type (might be due to invalid IL or missing references)
		//IL_044b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0453: Expected O, but got Unknown
		//IL_045d: Unknown result type (might be due to invalid IL or missing references)
		//IL_045f: Unknown result type (might be due to invalid IL or missing references)
		//IL_049b: Unknown result type (might be due to invalid IL or missing references)
		//IL_04a2: Expected O, but got Unknown
		//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_04c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_04cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_04d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_04f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_04fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0503: Unknown result type (might be due to invalid IL or missing references)
		//IL_0515: Unknown result type (might be due to invalid IL or missing references)
		//IL_051a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0524: Unknown result type (might be due to invalid IL or missing references)
		//IL_0529: Unknown result type (might be due to invalid IL or missing references)
		//IL_0540: Unknown result type (might be due to invalid IL or missing references)
		//IL_0545: Unknown result type (might be due to invalid IL or missing references)
		//IL_0556: Unknown result type (might be due to invalid IL or missing references)
		//IL_055b: Unknown result type (might be due to invalid IL or missing references)
		//IL_056c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0571: Unknown result type (might be due to invalid IL or missing references)
		//IL_0582: Unknown result type (might be due to invalid IL or missing references)
		//IL_0587: Unknown result type (might be due to invalid IL or missing references)
		//IL_0599: Unknown result type (might be due to invalid IL or missing references)
		//IL_059e: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_05b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_05b8: Expected O, but got Unknown
		//IL_05ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_05bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_05ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d2: Expected O, but got Unknown
		//IL_05dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_05de: Unknown result type (might be due to invalid IL or missing references)
		//IL_060d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0614: Expected O, but got Unknown
		//IL_0632: Unknown result type (might be due to invalid IL or missing references)
		//IL_0637: Unknown result type (might be due to invalid IL or missing references)
		//IL_0641: Unknown result type (might be due to invalid IL or missing references)
		//IL_0646: Unknown result type (might be due to invalid IL or missing references)
		//IL_065d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0662: Unknown result type (might be due to invalid IL or missing references)
		//IL_066c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0671: Unknown result type (might be due to invalid IL or missing references)
		//IL_0685: Unknown result type (might be due to invalid IL or missing references)
		//IL_068a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0694: Unknown result type (might be due to invalid IL or missing references)
		//IL_0699: Unknown result type (might be due to invalid IL or missing references)
		//IL_06b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_06b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_06c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_06cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_06dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_06e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_06f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_06f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0709: Unknown result type (might be due to invalid IL or missing references)
		//IL_070e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0719: Unknown result type (might be due to invalid IL or missing references)
		//IL_0720: Unknown result type (might be due to invalid IL or missing references)
		//IL_0728: Expected O, but got Unknown
		//IL_072a: Unknown result type (might be due to invalid IL or missing references)
		//IL_072f: Unknown result type (might be due to invalid IL or missing references)
		//IL_073a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0742: Expected O, but got Unknown
		//IL_074c: Unknown result type (might be due to invalid IL or missing references)
		//IL_074e: Unknown result type (might be due to invalid IL or missing references)
		Color32 flareColor = default(Color32);
		((Color32)(ref flareColor))..ctor((byte)160, (byte)110, (byte)231, (byte)25);
		Color32 pointLightColor = default(Color32);
		((Color32)(ref pointLightColor))..ctor((byte)160, (byte)110, (byte)231, byte.MaxValue);
		Gradient val = new Gradient();
		val.SetKeys((GradientColorKey[])(object)new GradientColorKey[4]
		{
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)184, (byte)83, byte.MaxValue, byte.MaxValue)), 0f),
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)116, (byte)45, byte.MaxValue, byte.MaxValue)), 0.144f),
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)60, (byte)0, byte.MaxValue, byte.MaxValue)), 0.515f),
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)61, (byte)0, byte.MaxValue, byte.MaxValue)), 1f)
		}, (GradientAlphaKey[])(object)new GradientAlphaKey[4]
		{
			new GradientAlphaKey(0f, 0f),
			new GradientAlphaKey(1f, 0.215f),
			new GradientAlphaKey(1f, 0.532f),
			new GradientAlphaKey(0f, 1f)
		});
		RequirementConfig[] requirementConfigs = (RequirementConfig[])(object)new RequirementConfig[2]
		{
			new RequirementConfig
			{
				Item = "Iron",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "QueensJam",
				Amount = 2
			}
		};
		AddGroundTorch("Purple", val, pointLightColor, flareColor, requirementConfigs);
		Color32 flareColor2 = default(Color32);
		((Color32)(ref flareColor2))..ctor(byte.MaxValue, (byte)0, (byte)183, (byte)25);
		Color32 pointLightColor2 = default(Color32);
		((Color32)(ref pointLightColor2))..ctor(byte.MaxValue, (byte)0, (byte)183, byte.MaxValue);
		Gradient val2 = new Gradient();
		val2.SetKeys((GradientColorKey[])(object)new GradientColorKey[3]
		{
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)253, (byte)51, (byte)62, byte.MaxValue)), 0f),
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)253, (byte)82, (byte)135, byte.MaxValue)), 0.129f),
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, (byte)16, (byte)87, byte.MaxValue)), 0.332f)
		}, (GradientAlphaKey[])(object)new GradientAlphaKey[4]
		{
			new GradientAlphaKey(0f, 0f),
			new GradientAlphaKey(1f, 0.159f),
			new GradientAlphaKey(0.98f, 0.541f),
			new GradientAlphaKey(0f, 1f)
		});
		RequirementConfig[] requirementConfigs2 = (RequirementConfig[])(object)new RequirementConfig[2]
		{
			new RequirementConfig
			{
				Item = "Iron",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "Raspberry",
				Amount = 2
			}
		};
		AddGroundTorch("Pink", val2, pointLightColor2, flareColor2, requirementConfigs2);
		Color32 flareColor3 = default(Color32);
		((Color32)(ref flareColor3))..ctor(byte.MaxValue, (byte)0, (byte)0, (byte)75);
		Color32 pointLightColor3 = default(Color32);
		((Color32)(ref pointLightColor3))..ctor(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue);
		Gradient val3 = new Gradient();
		val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[3]
		{
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)253, (byte)100, (byte)100, byte.MaxValue)), 0f),
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, (byte)66, (byte)86, byte.MaxValue)), 0.141f),
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue)), 0.324f)
		}, (GradientAlphaKey[])(object)new GradientAlphaKey[4]
		{
			new GradientAlphaKey(0f, 0f),
			new GradientAlphaKey(1f, 0.147f),
			new GradientAlphaKey(0.98f, 0.406f),
			new GradientAlphaKey(0f, 1f)
		});
		RequirementConfig[] requirementConfigs3 = (RequirementConfig[])(object)new RequirementConfig[2]
		{
			new RequirementConfig
			{
				Item = "Iron",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "Bloodbag",
				Amount = 2
			}
		};
		AddGroundTorch("Red", val3, pointLightColor3, flareColor3, requirementConfigs3);
		Color32 flareColor4 = default(Color32);
		((Color32)(ref flareColor4))..ctor((byte)171, (byte)171, (byte)171, (byte)75);
		Color32 pointLightColor4 = default(Color32);
		((Color32)(ref pointLightColor4))..ctor((byte)171, (byte)171, (byte)171, byte.MaxValue);
		Gradient val4 = new Gradient();
		val4.SetKeys((GradientColorKey[])(object)new GradientColorKey[3]
		{
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)), 0f),
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)171, (byte)171, (byte)171, byte.MaxValue)), 0.141f),
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)85, (byte)85, (byte)85, byte.MaxValue)), 0.324f)
		}, (GradientAlphaKey[])(object)new GradientAlphaKey[4]
		{
			new GradientAlphaKey(0f, 0f),
			new GradientAlphaKey(1f, 0.147f),
			new GradientAlphaKey(0.98f, 0.406f),
			new GradientAlphaKey(0f, 1f)
		});
		RequirementConfig[] requirementConfigs4 = (RequirementConfig[])(object)new RequirementConfig[2]
		{
			new RequirementConfig
			{
				Item = "Iron",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "Cloudberry",
				Amount = 2
			}
		};
		AddGroundTorch("White", val4, pointLightColor4, flareColor4, requirementConfigs4);
		Color32 flareColor5 = default(Color32);
		((Color32)(ref flareColor5))..ctor(byte.MaxValue, (byte)96, (byte)0, (byte)75);
		Color32 pointLightColor5 = default(Color32);
		((Color32)(ref pointLightColor5))..ctor(byte.MaxValue, (byte)102, (byte)28, byte.MaxValue);
		Gradient val5 = new Gradient();
		val5.SetKeys((GradientColorKey[])(object)new GradientColorKey[3]
		{
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, (byte)217, (byte)169, byte.MaxValue)), 0f),
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, (byte)140, (byte)0, byte.MaxValue)), 0.141f),
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, (byte)99, (byte)0, byte.MaxValue)), 0.324f)
		}, (GradientAlphaKey[])(object)new GradientAlphaKey[4]
		{
			new GradientAlphaKey(0f, 0f),
			new GradientAlphaKey(1f, 0.147f),
			new GradientAlphaKey(0.98f, 0.406f),
			new GradientAlphaKey(0f, 1f)
		});
		RequirementConfig[] requirementConfigs5 = (RequirementConfig[])(object)new RequirementConfig[2]
		{
			new RequirementConfig
			{
				Item = "Iron",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "Ooze",
				Amount = 2
			}
		};
		AddGroundTorch("Orange", val5, pointLightColor5, flareColor5, requirementConfigs5);
		PrefabManager.OnVanillaPrefabsAvailable -= AddGroundTorches;
	}

	private void AddWallTorch(string name, Gradient flameGradient, Color32 pointLightColor, Color32 flareColor, RequirementConfig[] requirementConfigs)
	{
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Expected O, but got Unknown
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Expected O, but got Unknown
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_011f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0124: Unknown result type (might be due to invalid IL or missing references)
		//IL_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_0129: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0151: Unknown result type (might be due to invalid IL or missing references)
		//IL_0156: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Unknown result type (might be due to invalid IL or missing references)
		Sprite icon = LoadIcon(name + "WallTorchIcon.png");
		CustomPiece val = new CustomPiece("piece_walltorch" + name.ToLower(), "piece_walltorch", new PieceConfig
		{
			Name = "$piece_walltorch" + name.ToLower(),
			Description = "",
			PieceTable = "Hammer",
			Category = "Furniture",
			Icon = icon,
			Requirements = requirementConfigs
		});
		GameObject gameObject = ((Component)((Component)val.Piece).transform.Find("_enabled")).gameObject;
		Fireplace component = val.PiecePrefab.GetComponent<Fireplace>();
		component.m_name = "$piece_walltorch" + name.ToLower();
		((Object)component).name = "$piece_walltorch" + name.ToLower();
		component.m_fuelItem = val.Piece.m_resources[1].m_resItem;
		((Component)gameObject.transform.Find("Point light")).gameObject.GetComponent<Light>().color = Color32.op_Implicit(pointLightColor);
		MainModule main = ((Component)gameObject.transform.Find("flare")).gameObject.GetComponent<ParticleSystem>().main;
		((MainModule)(ref main)).startColor = new MinMaxGradient(Color32.op_Implicit(flareColor));
		ColorOverLifetimeModule colorOverLifetime = ((Component)gameObject.transform.Find("flames (1)")).gameObject.GetComponent<ParticleSystem>().colorOverLifetime;
		((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(flameGradient);
		PieceManager.Instance.AddPiece(val);
		Logger.LogInfo((object)("Added " + name + " Wall Torch piece"));
	}

	private void AddWallTorches()
	{
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Expected O, but got Unknown
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0076: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0085: 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_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0107: Unknown result type (might be due to invalid IL or missing references)
		//IL_010c: Unknown result type (might be due to invalid IL or missing references)
		//IL_011d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0122: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_014a: Unknown result type (might be due to invalid IL or missing references)
		//IL_014f: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0161: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Expected O, but got Unknown
		//IL_016b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0170: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0182: Unknown result type (might be due to invalid IL or missing references)
		//IL_018a: Expected O, but got Unknown
		//IL_018c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0191: Unknown result type (might be due to invalid IL or missing references)
		//IL_019c: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a4: Expected O, but got Unknown
		//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_01df: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e6: Expected O, but got Unknown
		//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0203: Unknown result type (might be due to invalid IL or missing references)
		//IL_020d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0212: Unknown result type (might be due to invalid IL or missing references)
		//IL_022a: Unknown result type (might be due to invalid IL or missing references)
		//IL_022f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0239: Unknown result type (might be due to invalid IL or missing references)
		//IL_023e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0253: Unknown result type (might be due to invalid IL or missing references)
		//IL_0258: Unknown result type (might be due to invalid IL or missing references)
		//IL_0262: Unknown result type (might be due to invalid IL or missing references)
		//IL_0267: Unknown result type (might be due to invalid IL or missing references)
		//IL_027e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0283: Unknown result type (might be due to invalid IL or missing references)
		//IL_0294: Unknown result type (might be due to invalid IL or missing references)
		//IL_0299: Unknown result type (might be due to invalid IL or missing references)
		//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_02af: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f6: Expected O, but got Unknown
		//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0308: Unknown result type (might be due to invalid IL or missing references)
		//IL_030f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0317: Expected O, but got Unknown
		//IL_0319: Unknown result type (might be due to invalid IL or missing references)
		//IL_031e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0329: Unknown result type (might be due to invalid IL or missing references)
		//IL_0331: Expected O, but got Unknown
		//IL_033b: Unknown result type (might be due to invalid IL or missing references)
		//IL_033d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0369: Unknown result type (might be due to invalid IL or missing references)
		//IL_0370: Expected O, but got Unknown
		//IL_0388: Unknown result type (might be due to invalid IL or missing references)
		//IL_038d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0397: Unknown result type (might be due to invalid IL or missing references)
		//IL_039c: Unknown result type (might be due to invalid IL or missing references)
		//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_03b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_03dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_03e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_0403: Unknown result type (might be due to invalid IL or missing references)
		//IL_0408: Unknown result type (might be due to invalid IL or missing references)
		//IL_0419: Unknown result type (might be due to invalid IL or missing references)
		//IL_041e: Unknown result type (might be due to invalid IL or missing references)
		//IL_042f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0434: Unknown result type (might be due to invalid IL or missing references)
		//IL_0445: Unknown result type (might be due to invalid IL or missing references)
		//IL_044a: Unknown result type (might be due to invalid IL or missing references)
		//IL_045c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0461: Unknown result type (might be due to invalid IL or missing references)
		//IL_046c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0473: Unknown result type (might be due to invalid IL or missing references)
		//IL_047b: Expected O, but got Unknown
		//IL_047d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0482: Unknown result type (might be due to invalid IL or missing references)
		//IL_048d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0494: Unknown result type (might be due to invalid IL or missing references)
		//IL_049c: Expected O, but got Unknown
		//IL_049e: Unknown result type (might be due to invalid IL or missing references)
		//IL_04a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_04b6: Expected O, but got Unknown
		//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_04c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_04fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0505: Expected O, but got Unknown
		//IL_0523: Unknown result type (might be due to invalid IL or missing references)
		//IL_0528: Unknown result type (might be due to invalid IL or missing references)
		//IL_0532: Unknown result type (might be due to invalid IL or missing references)
		//IL_0537: Unknown result type (might be due to invalid IL or missing references)
		//IL_0552: Unknown result type (might be due to invalid IL or missing references)
		//IL_0557: Unknown result type (might be due to invalid IL or missing references)
		//IL_0561: Unknown result type (might be due to invalid IL or missing references)
		//IL_0566: Unknown result type (might be due to invalid IL or missing references)
		//IL_0578: Unknown result type (might be due to invalid IL or missing references)
		//IL_057d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0587: Unknown result type (might be due to invalid IL or missing references)
		//IL_058c: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_05b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_05be: Unknown result type (might be due to invalid IL or missing references)
		//IL_05cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_05e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_05ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_05fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0601: Unknown result type (might be due to invalid IL or missing references)
		//IL_060c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0613: Unknown result type (might be due to invalid IL or missing references)
		//IL_061b: Expected O, but got Unknown
		//IL_061d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0622: Unknown result type (might be due to invalid IL or missing references)
		//IL_062d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0634: Unknown result type (might be due to invalid IL or missing references)
		//IL_063c: Expected O, but got Unknown
		//IL_063e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0643: Unknown result type (might be due to invalid IL or missing references)
		//IL_064e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0656: Expected O, but got Unknown
		//IL_0660: Unknown result type (might be due to invalid IL or missing references)
		//IL_0662: Unknown result type (might be due to invalid IL or missing references)
		//IL_0691: Unknown result type (might be due to invalid IL or missing references)
		//IL_0698: Expected O, but got Unknown
		//IL_06b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_06bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_06c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_06ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_06e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_06e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_06f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_06f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0709: Unknown result type (might be due to invalid IL or missing references)
		//IL_070e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0718: Unknown result type (might be due to invalid IL or missing references)
		//IL_071d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0734: Unknown result type (might be due to invalid IL or missing references)
		//IL_0739: Unknown result type (might be due to invalid IL or missing references)
		//IL_074a: Unknown result type (might be due to invalid IL or missing references)
		//IL_074f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0760: Unknown result type (might be due to invalid IL or missing references)
		//IL_0765: Unknown result type (might be due to invalid IL or missing references)
		//IL_0776: Unknown result type (might be due to invalid IL or missing references)
		//IL_077b: Unknown result type (might be due to invalid IL or missing references)
		//IL_078d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0792: Unknown result type (might be due to invalid IL or missing references)
		//IL_079d: Unknown result type (might be due to invalid IL or missing references)
		//IL_07a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_07ac: Expected O, but got Unknown
		//IL_07ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_07b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_07be: Unknown result type (might be due to invalid IL or missing references)
		//IL_07c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_07cd: Expected O, but got Unknown
		//IL_07cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_07d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_07df: Unknown result type (might be due to invalid IL or missing references)
		//IL_07e7: Expected O, but got Unknown
		//IL_07f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_07f3: Unknown result type (might be due to invalid IL or missing references)
		Color32 flareColor = default(Color32);
		((Color32)(ref flareColor))..ctor((byte)160, (byte)110, (byte)231, (byte)25);
		Color32 pointLightColor = default(Color32);
		((Color32)(ref pointLightColor))..ctor((byte)160, (byte)110, (byte)231, byte.MaxValue);
		Gradient val = new Gradient();
		val.SetKeys((GradientColorKey[])(object)new GradientColorKey[4]
		{
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)184, (byte)83, byte.MaxValue, byte.MaxValue)), 0f),
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)116, (byte)45, byte.MaxValue, byte.MaxValue)), 0.144f),
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)60, (byte)0, byte.MaxValue, byte.MaxValue)), 0.515f),
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)61, (byte)0, byte.MaxValue, byte.MaxValue)), 1f)
		}, (GradientAlphaKey[])(object)new GradientAlphaKey[4]
		{
			new GradientAlphaKey(0f, 0f),
			new GradientAlphaKey(1f, 0.215f),
			new GradientAlphaKey(1f, 0.532f),
			new GradientAlphaKey(0f, 1f)
		});
		RequirementConfig[] requirementConfigs = (RequirementConfig[])(object)new RequirementConfig[3]
		{
			new RequirementConfig
			{
				Item = "Wood",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "Copper",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "QueensJam",
				Amount = 2
			}
		};
		AddWallTorch("Purple", val, pointLightColor, flareColor, requirementConfigs);
		Color32 flareColor2 = default(Color32);
		((Color32)(ref flareColor2))..ctor(byte.MaxValue, (byte)0, (byte)183, (byte)25);
		Color32 pointLightColor2 = default(Color32);
		((Color32)(ref pointLightColor2))..ctor(byte.MaxValue, (byte)0, (byte)183, byte.MaxValue);
		Gradient val2 = new Gradient();
		val2.SetKeys((GradientColorKey[])(object)new GradientColorKey[3]
		{
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)253, (byte)51, (byte)62, byte.MaxValue)), 0f),
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)253, (byte)82, (byte)135, byte.MaxValue)), 0.129f),
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, (byte)16, (byte)87, byte.MaxValue)), 0.332f)
		}, (GradientAlphaKey[])(object)new GradientAlphaKey[4]
		{
			new GradientAlphaKey(0f, 0f),
			new GradientAlphaKey(1f, 0.159f),
			new GradientAlphaKey(0.98f, 0.541f),
			new GradientAlphaKey(0f, 1f)
		});
		RequirementConfig[] requirementConfigs2 = (RequirementConfig[])(object)new RequirementConfig[3]
		{
			new RequirementConfig
			{
				Item = "Wood",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "Copper",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "Raspberry",
				Amount = 2
			}
		};
		AddWallTorch("Pink", val2, pointLightColor2, flareColor2, requirementConfigs2);
		Color32 flareColor3 = default(Color32);
		((Color32)(ref flareColor3))..ctor(byte.MaxValue, (byte)0, (byte)0, (byte)75);
		Color32 pointLightColor3 = default(Color32);
		((Color32)(ref pointLightColor3))..ctor(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue);
		Gradient val3 = new Gradient();
		val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[3]
		{
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)253, (byte)100, (byte)100, byte.MaxValue)), 0f),
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, (byte)66, (byte)86, byte.MaxValue)), 0.141f),
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue)), 0.324f)
		}, (GradientAlphaKey[])(object)new GradientAlphaKey[4]
		{
			new GradientAlphaKey(0f, 0f),
			new GradientAlphaKey(1f, 0.147f),
			new GradientAlphaKey(0.98f, 0.406f),
			new GradientAlphaKey(0f, 1f)
		});
		RequirementConfig[] requirementConfigs3 = (RequirementConfig[])(object)new RequirementConfig[3]
		{
			new RequirementConfig
			{
				Item = "Wood",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "Copper",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "Bloodbag",
				Amount = 2
			}
		};
		AddWallTorch("Red", val3, pointLightColor3, flareColor3, requirementConfigs3);
		Color32 flareColor4 = default(Color32);
		((Color32)(ref flareColor4))..ctor((byte)171, (byte)171, (byte)171, (byte)75);
		Color32 pointLightColor4 = default(Color32);
		((Color32)(ref pointLightColor4))..ctor((byte)171, (byte)171, (byte)171, byte.MaxValue);
		Gradient val4 = new Gradient();
		val4.SetKeys((GradientColorKey[])(object)new GradientColorKey[3]
		{
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)), 0f),
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)171, (byte)171, (byte)171, byte.MaxValue)), 0.141f),
			new GradientColorKey(Color32.op_Implicit(new Color32((byte)85, (byte)85, (byte)85, byte.MaxValue)), 0.324f)
		}, (GradientAlphaKey[])(object)new GradientAlphaKey[4]
		{
			new GradientAlphaKey(0f, 0f),
			new GradientAlphaKey(1f, 0.147f),
			new GradientAlphaKey(0.98f, 0.406f),
			new GradientAlphaKey(0f, 1f)
		});
		RequirementConfig[] requirementConfigs4 = (RequirementConfig[])(object)new RequirementConfig[3]
		{
			new RequirementConfig
			{
				Item = "Wood",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "Copper",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "Cloudberry",
				Amount = 2
			}
		};
		AddWallTorch("White", val4, pointLightColor4, flareColor4, requirementConfigs4);
		Color32 flareColor5 = default(Color32);
		((Color32)(ref flareColor5))..ctor(byte.MaxValue, (byte)96, (byte)0, (byte)75);
		Color32 pointLightColor5 = default(Color32);
		((Color32)(ref pointLightColor5))..ctor(byte.MaxValue, (byte)102, (byte)28, byte.MaxValue);
		Gradient val5 = new Gradient();
		val5.SetKeys((GradientColorKey[])(object)new GradientColorKey[3]
		{
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, (byte)217, (byte)169, byte.MaxValue)), 0f),
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, (byte)140, (byte)0, byte.MaxValue)), 0.141f),
			new GradientColorKey(Color32.op_Implicit(new Color32(byte.MaxValue, (byte)99, (byte)0, byte.MaxValue)), 0.324f)
		}, (GradientAlphaKey[])(object)new GradientAlphaKey[4]
		{
			new GradientAlphaKey(0f, 0f),
			new GradientAlphaKey(1f, 0.147f),
			new GradientAlphaKey(0.98f, 0.406f),
			new GradientAlphaKey(0f, 1f)
		});
		RequirementConfig[] requirementConfigs5 = (RequirementConfig[])(object)new RequirementConfig[3]
		{
			new RequirementConfig
			{
				Item = "Wood",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "Copper",
				Amount = 2,
				Recover = true
			},
			new RequirementConfig
			{
				Item = "Ooze",
				Amount = 2
			}
		};
		AddWallTorch("Orange", val5, pointLightColor5, flareColor5, requirementConfigs5);
		PrefabManager.OnVanillaPrefabsAvailable -= AddWallTorches;
	}
}