Decompiled source of Seasonality v3.0.0

Seasonality.dll

Decompiled 2 years ago
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Cryptography;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using JetBrains.Annotations;
using Microsoft.CodeAnalysis;
using Seasonality.Seasons;
using ServerSync;
using TMPro;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Rendering;
using YamlDotNet.Core;
using YamlDotNet.Core.Events;
using YamlDotNet.Core.Tokens;
using YamlDotNet.Helpers;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.BufferedDeserialization;
using YamlDotNet.Serialization.BufferedDeserialization.TypeDiscriminators;
using YamlDotNet.Serialization.Callbacks;
using YamlDotNet.Serialization.Converters;
using YamlDotNet.Serialization.EventEmitters;
using YamlDotNet.Serialization.NamingConventions;
using YamlDotNet.Serialization.NodeDeserializers;
using YamlDotNet.Serialization.NodeTypeResolvers;
using YamlDotNet.Serialization.ObjectFactories;
using YamlDotNet.Serialization.ObjectGraphTraversalStrategies;
using YamlDotNet.Serialization.ObjectGraphVisitors;
using YamlDotNet.Serialization.Schemas;
using YamlDotNet.Serialization.TypeInspectors;
using YamlDotNet.Serialization.TypeResolvers;
using YamlDotNet.Serialization.Utilities;
using YamlDotNet.Serialization.ValueDeserializers;

[assembly: AssemblyFileVersion("3.0.0")]
[assembly: Guid("E0E2F92E-557C-4A05-9D89-AA92A0BD75C4")]
[assembly: ComVisible(false)]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCopyright("Copyright ©  2022")]
[assembly: AssemblyProduct("Seasonality")]
[assembly: AssemblyCompany("RustyMods")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyTitle("Seasonality")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("3.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[<e3b9616f-f75c-495d-a38d-451a057c2eae>Embedded]
	internal sealed class <e3b9616f-f75c-495d-a38d-451a057c2eae>EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[<e3b9616f-f75c-495d-a38d-451a057c2eae>Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	[CompilerGenerated]
	internal sealed class <4edcec42-b8ad-494f-8522-113afc165eb1>NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public <4edcec42-b8ad-494f-8522-113afc165eb1>NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public <4edcec42-b8ad-494f-8522-113afc165eb1>NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	[<e3b9616f-f75c-495d-a38d-451a057c2eae>Embedded]
	[CompilerGenerated]
	internal sealed class <ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public <ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace Seasonality
{
	[BepInPlugin("RustyMods.Seasonality", "Seasonality", "3.0.0")]
	[<4edcec42-b8ad-494f-8522-113afc165eb1>Nullable(0)]
	[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(1)]
	public class SeasonalityPlugin : BaseUnityPlugin
	{
		[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(0)]
		public enum Toggle
		{
			On = 1,
			Off = 0
		}

		[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(0)]
		public enum WorkingAs
		{
			Client,
			Server,
			Both
		}

		[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(0)]
		public enum Season
		{
			Spring,
			Summer,
			Fall,
			Winter
		}

		[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(0)]
		public enum Element
		{
			Fire,
			Frost,
			Lightning,
			Poison,
			Spirit,
			None
		}

		[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(0)]
		public enum DamageModifier
		{
			Normal,
			Resistant,
			Weak,
			Immune,
			Ignore,
			VeryResistant,
			VeryWeak,
			None
		}

		[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(0)]
		private class ConfigurationManagerAttributes
		{
			[UsedImplicitly]
			public int? Order = null;

			[UsedImplicitly]
			public bool? Browsable = null;

			[<4edcec42-b8ad-494f-8522-113afc165eb1>Nullable(2)]
			[UsedImplicitly]
			public string Category = null;

			[<4edcec42-b8ad-494f-8522-113afc165eb1>Nullable(new byte[] { 2, 1 })]
			[UsedImplicitly]
			public Action<ConfigEntryBase> CustomDrawer = null;
		}

		internal const string ModName = "Seasonality";

		internal const string ModVersion = "3.0.0";

		internal const string Author = "RustyMods";

		private const string ModGUID = "RustyMods.Seasonality";

		private static string ConfigFileName = "RustyMods.Seasonality.cfg";

		private static string ConfigFileFullPath;

		internal static string ConnectionError;

		private readonly Harmony _harmony = new Harmony("RustyMods.Seasonality");

		public static readonly ManualLogSource SeasonalityLogger;

		public static readonly ConfigSync ConfigSync;

		public static WorkingAs workingAsType;

		public static ConfigEntry<Season> _Season;

		public static ConfigEntry<int> _SeasonDurationDays;

		public static ConfigEntry<int> _SeasonDurationHours;

		public static ConfigEntry<int> _SeasonDurationMinutes;

		public static ConfigEntry<int> _WeatherDuration;

		public static ConfigEntry<Toggle> _WeatherIconEnabled;

		public static ConfigEntry<Toggle> _WeatherTimerEnabled;

		public static ConfigEntry<Toggle> _SeasonalEffectsEnabled;

		public static ConfigEntry<string> _SpringName;

		public static ConfigEntry<string> _SpringStartMsg;

		public static ConfigEntry<string> _SpringTooltip;

		public static ConfigEntry<Modifier> _SpringModifier;

		public static ConfigEntry<Element> _SpringResistanceElement;

		public static ConfigEntry<DamageModifier> _SpringResistanceMod;

		public static ConfigEntry<float> _SpringValue;

		public static ConfigEntry<string> _FallName;

		public static ConfigEntry<string> _FallStartMsg;

		public static ConfigEntry<string> _FallTooltip;

		public static ConfigEntry<Modifier> _FallModifier;

		public static ConfigEntry<Element> _FallResistanceElement;

		public static ConfigEntry<DamageModifier> _FallResistanceMod;

		public static ConfigEntry<float> _FallValue;

		public static ConfigEntry<string> _WinterName;

		public static ConfigEntry<string> _WinterStartMsg;

		public static ConfigEntry<string> _WinterTooltip;

		public static ConfigEntry<Modifier> _WinterModifier;

		public static ConfigEntry<Element> _WinterResistanceElement;

		public static ConfigEntry<DamageModifier> _WinterResistantMod;

		public static ConfigEntry<float> _WinterValue;

		public static ConfigEntry<string> _SummerName;

		public static ConfigEntry<string> _SummerStartMsg;

		public static ConfigEntry<string> _SummerTooltip;

		public static ConfigEntry<Modifier> _SummerModifier;

		public static ConfigEntry<Element> _SummerResistanceElement;

		public static ConfigEntry<DamageModifier> _SummerResistanceMod;

		public static ConfigEntry<float> _SummerValue;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Meadows_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Meadows_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Meadows_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Meadows_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_BlackForest_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_BlackForest_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_BlackForest_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_BlackForest_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Swamp_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Swamp_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Swamp_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Swamp_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Mountains_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Mountains_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Mountains_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Mountains_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Plains_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Plains_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Plains_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Plains_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_MistLands_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_MistLands_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_MistLands_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_MistLands_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Ocean_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Ocean_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Ocean_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_Ocean_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_AshLands_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_AshLands_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_AshLands_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_AshLands_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_DeepNorth_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_DeepNorth_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_DeepNorth_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Fall_DeepNorth_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Meadows_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Meadows_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Meadows_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Meadows_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_BlackForest_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_BlackForest_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_BlackForest_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_BlackForest_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Swamp_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Swamp_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Swamp_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Swamp_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Mountains_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Mountains_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Mountains_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Mountains_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Plains_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Plains_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Plains_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Plains_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_MistLands_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_MistLands_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_MistLands_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_MistLands_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Ocean_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Ocean_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Ocean_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_Ocean_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_AshLands_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_AshLands_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_AshLands_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_AshLands_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_DeepNorth_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_DeepNorth_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_DeepNorth_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Winter_DeepNorth_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Meadows_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Meadows_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Meadows_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Meadows_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_BlackForest_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_BlackForest_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_BlackForest_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_BlackForest_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Swamp_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Swamp_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Swamp_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Swamp_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Mountains_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Mountains_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Mountains_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Mountains_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Plains_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Plains_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Plains_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Plains_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_MistLands_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_MistLands_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_MistLands_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_MistLands_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Ocean_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Ocean_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Ocean_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_Ocean_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_AshLands_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_AshLands_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_AshLands_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_AshLands_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_DeepNorth_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_DeepNorth_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_DeepNorth_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Spring_DeepNorth_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Meadows_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Meadows_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Meadows_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Meadows_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_BlackForest_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_BlackForest_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_BlackForest_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_BlackForest_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Swamp_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Swamp_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Swamp_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Swamp_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Mountains_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Mountains_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Mountains_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Mountains_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Plains_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Plains_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Plains_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Plains_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_MistLands_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_MistLands_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_MistLands_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_MistLands_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Ocean_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Ocean_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Ocean_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_Ocean_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_AshLands_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_AshLands_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_AshLands_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_AshLands_Weather4;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_DeepNorth_Weather1;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_DeepNorth_Weather2;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_DeepNorth_Weather3;

		public static ConfigEntry<Seasonality.Seasons.Environment.Environments> _Summer_DeepNorth_Weather4;

		public static ConfigEntry<Color> _FallColor1;

		public static ConfigEntry<Color> _FallColor2;

		public static ConfigEntry<Color> _FallColor3;

		public static ConfigEntry<Color> _FallColor4;

		public static ConfigEntry<Color> _SpringColor1;

		public static ConfigEntry<Color> _SpringColor2;

		public static ConfigEntry<Color> _SpringColor3;

		public static ConfigEntry<Color> _SpringColor4;

		public static ConfigEntry<Color> _WinterColor1;

		public static ConfigEntry<Color> _WinterColor2;

		public static ConfigEntry<Color> _WinterColor3;

		public static ConfigEntry<Color> _WinterColor4;

		public static ConfigEntry<Color> _SummerColor1;

		public static ConfigEntry<Color> _SummerColor2;

		public static ConfigEntry<Color> _SummerColor3;

		public static ConfigEntry<Color> _SummerColor4;

		public static ConfigEntry<SpecialEffects.SpecialEffect> _FallStartEffects;

		public static ConfigEntry<SpecialEffects.SpecialEffect> _FallStopEffects;

		public static ConfigEntry<SpecialEffects.SpecialEffect> _SpringStartEffects;

		public static ConfigEntry<SpecialEffects.SpecialEffect> _SpringStopEffects;

		public static ConfigEntry<SpecialEffects.SpecialEffect> _SummerStartEffects;

		public static ConfigEntry<SpecialEffects.SpecialEffect> _SummerStopEffects;

		public static ConfigEntry<SpecialEffects.SpecialEffect> _WinterStartEffects;

		public static ConfigEntry<SpecialEffects.SpecialEffect> _WinterStopEffects;

		public static ConfigEntry<Toggle> _SeasonControl;

		public static ConfigEntry<Toggle> _ModEnabled;

		public static ConfigEntry<Toggle> _CounterVisible;

		public static ConfigEntry<Toggle> _WeatherControl;

		public static ConfigEntry<Toggle> _StatusEffectVisible;

		public static ConfigEntry<Toggle> _SummerNeverCold;

		public static ConfigEntry<Toggle> _WinterAlwaysCold;

		public static ConfigEntry<Toggle> _ReplaceCreatureTextures;

		public static ConfigEntry<string> _LastSavedSeasonChange;

		private static ConfigEntry<Toggle> _serverConfigLocked;

		public void Awake()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Invalid comparison between Unknown and I4
			_serverConfigLocked = config("1 - General", "1 - Lock Configuration", Toggle.On, "If on, the configuration is locked and can be changed by server admins only.");
			ConfigSync.AddLockingConfigEntry<Toggle>(_serverConfigLocked);
			workingAsType = (((int)SystemInfo.graphicsDeviceType == 4) ? WorkingAs.Server : WorkingAs.Client);
			CustomTextures.ReadCustomTextures();
			InitConfigs();
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			_harmony.PatchAll(executingAssembly);
			SetupWatcher();
		}

		private void InitConfigs()
		{
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Expected O, but got Unknown
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Expected O, but got Unknown
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Expected O, but got Unknown
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Expected O, but got Unknown
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0325: Expected O, but got Unknown
			//IL_072b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0751: Unknown result type (might be due to invalid IL or missing references)
			//IL_0777: 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_08c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d2: Expected O, but got Unknown
			//IL_0cd8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cfe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d24: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d4a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e74: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e7f: Expected O, but got Unknown
			//IL_128b: Unknown result type (might be due to invalid IL or missing references)
			//IL_12b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_12d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_12fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_1427: Unknown result type (might be due to invalid IL or missing references)
			//IL_1432: Expected O, but got Unknown
			//IL_1838: Unknown result type (might be due to invalid IL or missing references)
			//IL_185e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1884: Unknown result type (might be due to invalid IL or missing references)
			//IL_18aa: Unknown result type (might be due to invalid IL or missing references)
			_LastSavedSeasonChange = config("8 - Data", "Last Season Change DateTime", DateTime.UtcNow.ToString(CultureInfo.InvariantCulture), "Do not touch, unless you want to manipulate last season change");
			_ModEnabled = config("1 - General", "2 - Plugin Enabled", Toggle.On, "If on, mod is enabled");
			_SeasonControl = config("1 - General", "3 - Control", Toggle.Off, "If on, season duration is disabled, and user can change season at will");
			_Season = config("1 - General", "4 - Current Season", Season.Fall, "Set duration to 0, and select your season, else season is determined by plugin");
			_SeasonDurationDays = config("1 - Seasons", "1 - Days", 0, new ConfigDescription("Real-time days between season", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 365), Array.Empty<object>()));
			_SeasonDurationHours = config("1 - Seasons", "2 - Hours", 1, new ConfigDescription("Real time hours between seasons", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 24), Array.Empty<object>()));
			_SeasonDurationMinutes = config("1 - Seasons", "3 - Minutes", 0, new ConfigDescription("Real-time minutes between seasons", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 60), Array.Empty<object>()));
			_StatusEffectVisible = config("1 - Seasons", "4 - Season Icon Visible", Toggle.On, "If on, season icon is visible", synchronizedSetting: false);
			_CounterVisible = config("1 - Seasons", "5 - Timer Visible", Toggle.On, "If on, timer under season is visible", synchronizedSetting: false);
			_SeasonalEffectsEnabled = config("2 - Utilities", "1 - Player Modifiers Enabled", Toggle.Off, "If on, season effects are enabled");
			_SummerNeverCold = config("2 - Utilities", "2 - Summer Never Cold", Toggle.Off, "If on, players are never cold during summer");
			_WinterAlwaysCold = config("2 - Utilities", "3 - Winter Always Cold", Toggle.Off, "If on, winter sets cold status effect on players regardless of environment");
			_WeatherControl = config("1 - Weather", "1 - Weather Enabled", Toggle.On, "If on, seasons can control the weather");
			_WeatherDuration = config("1 - Weather", "2 - Weather Duration (Minutes)", 20, new ConfigDescription("In-game minutes between weather change, if season applies weather", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 200), Array.Empty<object>()));
			_WeatherIconEnabled = config("1 - Weather", "3 - Icon Visible", Toggle.On, "If on, HUD displays weather information");
			_WeatherTimerEnabled = config("1 - Weather", "4 - Timer Visible", Toggle.On, "If on, weather icon displays timer");
			_ReplaceCreatureTextures = config("2 - Utilities", "Creatures Textures", Toggle.On, "If on, plugin replaces creature textures");
			_SpringName = config("3 - Spring", "Name", "Spring", "Display name");
			_SpringStartMsg = config("3 - Spring", "Start Message", "Spring has finally arrived", "Start of the season message");
			_SpringTooltip = config("3 - Spring", "Tooltip", "The land is bursting with energy", "Status effect tooltip");
			_SpringModifier = config("3 - Spring", "Modifier", Modifier.None, "Stats modifier");
			_SpringResistanceElement = config("3 - Spring", "Resistance Type", Element.None, "Element");
			_SpringResistanceMod = config("3 - Spring", "Resistance Modifier", DamageModifier.None, "Modifier");
			_SpringValue = config("3 - Spring", "Modifying value", 0f, new ConfigDescription("Value applied to modifier", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-100f, 100f), Array.Empty<object>()));
			_Spring_Meadows_Weather1 = config("3 - Spring Weather", "1 - Meadows 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Meadows_Weather2 = config("3 - Spring Weather", "1 - Meadows 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Meadows_Weather3 = config("3 - Spring Weather", "1 - Meadows 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Meadows_Weather4 = config("3 - Spring Weather", "1 - Meadows 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_BlackForest_Weather1 = config("3 - Spring Weather", "2 - BlackForest 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_BlackForest_Weather2 = config("3 - Spring Weather", "2 - BlackForest 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_BlackForest_Weather3 = config("3 - Spring Weather", "2 - BlackForest 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_BlackForest_Weather4 = config("3 - Spring Weather", "2 - BlackForest 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Swamp_Weather1 = config("3 - Spring Weather", "3 - Swamp 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Swamp_Weather2 = config("3 - Spring Weather", "3 - Swamp 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Swamp_Weather3 = config("3 - Spring Weather", "3 - Swamp 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Swamp_Weather4 = config("3 - Spring Weather", "3 - Swamp 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Mountains_Weather1 = config("3 - Spring Weather", "4 - Mountains 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Mountains_Weather2 = config("3 - Spring Weather", "4 - Mountains 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Mountains_Weather3 = config("3 - Spring Weather", "4 - Mountains 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Mountains_Weather4 = config("3 - Spring Weather", "4 - Mountains 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Plains_Weather1 = config("3 - Spring Weather", "5 - Plains 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Plains_Weather2 = config("3 - Spring Weather", "5 - Plains 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Plains_Weather3 = config("3 - Spring Weather", "5 - Plains 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Plains_Weather4 = config("3 - Spring Weather", "5 - Plains 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_MistLands_Weather1 = config("3 - Spring Weather", "6 - MistLands 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_MistLands_Weather2 = config("3 - Spring Weather", "6 - MistLands 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_MistLands_Weather3 = config("3 - Spring Weather", "6 - MistLands 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_MistLands_Weather4 = config("3 - Spring Weather", "6 - MistLands 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Ocean_Weather1 = config("3 - Spring Weather", "6 - Ocean 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Ocean_Weather2 = config("3 - Spring Weather", "6 - Ocean 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Ocean_Weather3 = config("3 - Spring Weather", "6 - Ocean 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_Ocean_Weather4 = config("3 - Spring Weather", "6 - Ocean 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_AshLands_Weather1 = config("3 - Spring Weather", "7 - AshLands 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_AshLands_Weather2 = config("3 - Spring Weather", "7 - AshLands 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_AshLands_Weather3 = config("3 - Spring Weather", "7 - AshLands 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_AshLands_Weather4 = config("3 - Spring Weather", "7 - AshLands 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_DeepNorth_Weather1 = config("3 - Spring Weather", "8 - DeepNorth 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_DeepNorth_Weather2 = config("3 - Spring Weather", "8 - DeepNorth 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_DeepNorth_Weather3 = config("3 - Spring Weather", "8 - DeepNorth 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_Spring_DeepNorth_Weather4 = config("3 - Spring Weather", "8 - DeepNorth 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by spring season");
			_SpringColor1 = config<Color>("3 - Spring", "Color 1", SeasonColors.SpringColors[0], "Color tint applied to prefabs");
			_SpringColor2 = config<Color>("3 - Spring", "Color 2", SeasonColors.SpringColors[1], "Color tint applied to prefabs");
			_SpringColor3 = config<Color>("3 - Spring", "Color 3", SeasonColors.SpringColors[2], "Color tint applied to prefabs");
			_SpringColor4 = config<Color>("3 - Spring", "Color 4", SeasonColors.SpringColors[3], "Color tint applied to prefabs");
			_SpringStartEffects = config("3 - Spring", "Start Effect", SpecialEffects.SpecialEffect.None, "Visual effect applied when season starts");
			_SpringStopEffects = config("3 - Spring", "Stop Effect", SpecialEffects.SpecialEffect.None, "Visual effect applied when season ends");
			_FallName = config("4 - Fall", "Name", "Fall", "Display name");
			_FallStartMsg = config("4 - Fall", "Start Message", "Fall is upon us", "Start of the season message");
			_FallTooltip = config("4 - Fall", "Tooltip", "The ground is wet", "Status effect tooltip");
			_FallModifier = config("4 - Fall", "Modifier", Modifier.None, "Stats modifier");
			_FallResistanceElement = config("4 - Fall", "Resistance Type", Element.None, "Element");
			_FallResistanceMod = config("4 - Fall", "Resistance Modifier", DamageModifier.None, "Modifier");
			_FallValue = config("4 - Fall", "Modifying value", 0f, new ConfigDescription("Value applied to modifier", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-100f, 100f), Array.Empty<object>()));
			_Fall_Meadows_Weather1 = config("4 - Fall Weather", "1 - Meadows 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by fall season");
			_Fall_Meadows_Weather2 = config("4 - Fall Weather", "1 - Meadows 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by fall season");
			_Fall_Meadows_Weather3 = config("4 - Fall Weather", "1 - Meadows 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by fall season");
			_Fall_Meadows_Weather4 = config("4 - Fall Weather", "1 - Meadows 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by fall season");
			_Fall_BlackForest_Weather1 = config("4 - Fall Weather", "2 - BlackForest 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_BlackForest_Weather2 = config("4 - Fall Weather", "2 - BlackForest 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_BlackForest_Weather3 = config("4 - Fall Weather", "2 - BlackForest 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_BlackForest_Weather4 = config("4 - Fall Weather", "2 - BlackForest 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Swamp_Weather1 = config("4 - Fall Weather", "3 - Swamp 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Swamp_Weather2 = config("4 - Fall Weather", "3 - Swamp 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Swamp_Weather3 = config("4 - Fall Weather", "3 - Swamp 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Swamp_Weather4 = config("4 - Fall Weather", "3 - Swamp 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Mountains_Weather1 = config("4 - Fall Weather", "4 - Mountains 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Mountains_Weather2 = config("4 - Fall Weather", "4 - Mountains 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Mountains_Weather3 = config("4 - Fall Weather", "4 - Mountains 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Mountains_Weather4 = config("4 - Fall Weather", "4 - Mountains 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Plains_Weather1 = config("4 - Fall Weather", "5 - Plains 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Plains_Weather2 = config("4 - Fall Weather", "5 - Plains 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Plains_Weather3 = config("4 - Fall Weather", "5 - Plains 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Plains_Weather4 = config("4 - Fall Weather", "5 - Plains 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_MistLands_Weather1 = config("4 - Fall Weather", "6 - MistLands 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_MistLands_Weather2 = config("4 - Fall Weather", "6 - MistLands 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_MistLands_Weather3 = config("4 - Fall Weather", "6 - MistLands 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_MistLands_Weather4 = config("4 - Fall Weather", "6 - MistLands 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Ocean_Weather1 = config("4 - Fall Weather", "6 - Ocean 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Ocean_Weather2 = config("4 - Fall Weather", "6 - Ocean 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Ocean_Weather3 = config("4 - Fall Weather", "6 - Ocean 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_Ocean_Weather4 = config("4 - Fall Weather", "6 - Ocean 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_AshLands_Weather1 = config("4 - Fall Weather", "7 - AshLands 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_AshLands_Weather2 = config("4 - Fall Weather", "7 - AshLands 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_AshLands_Weather3 = config("4 - Fall Weather", "7 - AshLands 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_AshLands_Weather4 = config("4 - Fall Weather", "7 - AshLands 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_DeepNorth_Weather1 = config("4 - Fall Weather", "8 - DeepNorth 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_DeepNorth_Weather2 = config("4 - Fall Weather", "8 - DeepNorth 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_DeepNorth_Weather3 = config("4 - Fall Weather", "8 - DeepNorth 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_Fall_DeepNorth_Weather4 = config("4 - Fall Weather", "8 - DeepNorth 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Fall season");
			_FallColor1 = config<Color>("4 - Fall", "Color 1", SeasonColors.FallColors[0], "Color tint applied to prefabs");
			_FallColor2 = config<Color>("4 - Fall", "Color 2", SeasonColors.FallColors[1], "Color tint applied to prefabs");
			_FallColor3 = config<Color>("4 - Fall", "Color 3", SeasonColors.FallColors[2], "Color tint applied to prefabs");
			_FallColor4 = config<Color>("4 - Fall", "Color 4", SeasonColors.FallColors[3], "Color tint applied to prefabs");
			_FallStartEffects = config("4 - Fall", "Start Effect", SpecialEffects.SpecialEffect.None, "Visual effect applied when season starts");
			_FallStopEffects = config("4 - Fall", "Stop Effect", SpecialEffects.SpecialEffect.None, "Visual effect applied when season ends");
			_WinterName = config("5 - Winter", "Name", "Winter", "Display name");
			_WinterStartMsg = config("5 - Winter", "Start Message", "Winter is coming!", "Start of the season message");
			_WinterTooltip = config("5 - Winter", "Tooltip", "The air is cold", "Status effect tooltip");
			_WinterModifier = config("5 - Winter", "Modifier", Modifier.StaminaRegen, "Stats modifier");
			_WinterResistanceElement = config("5 - Winter", "Resistance Type", Element.Frost, "Element");
			_WinterResistantMod = config("5 - Winter", "Resistance Modifier", DamageModifier.Resistant, "Modifier");
			_WinterValue = config("5 - Winter", "Modifying value", 0.9f, new ConfigDescription("Value applied to modifier", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-100f, 100f), Array.Empty<object>()));
			_Winter_Meadows_Weather1 = config("5 - Winter Weather", "1 - Meadows 1", Seasonality.Seasons.Environment.Environments.WarmSnow, "Environment set by winter season.");
			_Winter_Meadows_Weather2 = config("5 - Winter Weather", "1 - Meadows 2", Seasonality.Seasons.Environment.Environments.None, "Environment set by winter season.");
			_Winter_Meadows_Weather3 = config("5 - Winter Weather", "1 - Meadows 3", Seasonality.Seasons.Environment.Environments.None, "Environment set by winter season.");
			_Winter_Meadows_Weather4 = config("5 - Winter Weather", "1 - Meadows 4", Seasonality.Seasons.Environment.Environments.None, "Environment set by winter season.");
			_Winter_BlackForest_Weather1 = config("5 - Winter Weather", "2 - BlackForest 1", Seasonality.Seasons.Environment.Environments.WarmSnow, "Environments set by Winter season");
			_Winter_BlackForest_Weather2 = config("5 - Winter Weather", "2 - BlackForest 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_BlackForest_Weather3 = config("5 - Winter Weather", "2 - BlackForest 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_BlackForest_Weather4 = config("5 - Winter Weather", "2 - BlackForest 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_Swamp_Weather1 = config("5 - Winter Weather", "3 - Swamp 1", Seasonality.Seasons.Environment.Environments.WarmSnow, "Environments set by Winter season");
			_Winter_Swamp_Weather2 = config("5 - Winter Weather", "3 - Swamp 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_Swamp_Weather3 = config("5 - Winter Weather", "3 - Swamp 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_Swamp_Weather4 = config("5 - Winter Weather", "3 - Swamp 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_Mountains_Weather1 = config("5 - Winter Weather", "4 - Mountains 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_Mountains_Weather2 = config("5 - Winter Weather", "4 - Mountains 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_Mountains_Weather3 = config("5 - Winter Weather", "4 - Mountains 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_Mountains_Weather4 = config("5 - Winter Weather", "4 - Mountains 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_Plains_Weather1 = config("5 - Winter Weather", "5 - Plains 1", Seasonality.Seasons.Environment.Environments.WarmSnow, "Environments set by Winter season");
			_Winter_Plains_Weather2 = config("5 - Winter Weather", "5 - Plains 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_Plains_Weather3 = config("5 - Winter Weather", "5 - Plains 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_Plains_Weather4 = config("5 - Winter Weather", "5 - Plains 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_MistLands_Weather1 = config("5 - Winter Weather", "6 - MistLands 1", Seasonality.Seasons.Environment.Environments.WarmSnow, "Environments set by Winter season");
			_Winter_MistLands_Weather2 = config("5 - Winter Weather", "6 - MistLands 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_MistLands_Weather3 = config("5 - Winter Weather", "6 - MistLands 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_MistLands_Weather4 = config("5 - Winter Weather", "6 - MistLands 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_Ocean_Weather1 = config("5 - Winter Weather", "6 - Ocean 1", Seasonality.Seasons.Environment.Environments.WarmSnow, "Environments set by Winter season");
			_Winter_Ocean_Weather2 = config("5 - Winter Weather", "6 - Ocean 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_Ocean_Weather3 = config("5 - Winter Weather", "6 - Ocean 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_Ocean_Weather4 = config("5 - Winter Weather", "6 - Ocean 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_AshLands_Weather1 = config("5 - Winter Weather", "7 - AshLands 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_AshLands_Weather2 = config("5 - Winter Weather", "7 - AshLands 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_AshLands_Weather3 = config("5 - Winter Weather", "7 - AshLands 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_AshLands_Weather4 = config("5 - Winter Weather", "7 - AshLands 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_DeepNorth_Weather1 = config("5 - Winter Weather", "8 - DeepNorth 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_DeepNorth_Weather2 = config("5 - Winter Weather", "8 - DeepNorth 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_DeepNorth_Weather3 = config("5 - Winter Weather", "8 - DeepNorth 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_Winter_DeepNorth_Weather4 = config("5 - Winter Weather", "8 - DeepNorth 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Winter season");
			_WinterColor1 = config<Color>("5 - Winter", "Color 1", SeasonColors.WinterColors[0], "Color tint applied to prefabs");
			_WinterColor2 = config<Color>("5 - Winter", "Color 2", SeasonColors.WinterColors[0], "Color tint applied to prefabs");
			_WinterColor3 = config<Color>("5 - Winter", "Color 3", SeasonColors.WinterColors[0], "Color tint applied to prefabs");
			_WinterColor4 = config<Color>("5 - Winter", "Color 4", SeasonColors.WinterColors[0], "Color tint applied to prefabs");
			_WinterStartEffects = config("5 - Winter", "Start Effect", SpecialEffects.SpecialEffect.None, "Visual effect applied when season starts");
			_WinterStopEffects = config("5 - Winter", "Stop Effect", SpecialEffects.SpecialEffect.None, "Visual effect applied when season ends");
			_SummerName = config("6 - Summer", "Name", "Summer", "Display name");
			_SummerStartMsg = config("6 - Summer", "Start Message", "Summer has landed", "Start of the season message");
			_SummerTooltip = config("6 - Summer", "Tooltip", "The air is warm", "Status effect tooltip");
			_SummerModifier = config("6 - Summer", "Modifier", Modifier.MaxCarryWeight, "Stats modifier");
			_SummerResistanceElement = config("6 - Summer", "Resistance Type", Element.None, "Element");
			_SummerResistanceMod = config("6 - Summer", "Resistance Modifier", DamageModifier.None, "Modifier");
			_SummerValue = config("6 - Summer", "Modifying value", -50f, new ConfigDescription("Value applied to modifier", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-100f, 100f), Array.Empty<object>()));
			_Summer_Meadows_Weather1 = config("6 - Summer Weather", "1 - Meadows 1", Seasonality.Seasons.Environment.Environments.None, "Environment set by summer season.");
			_Summer_Meadows_Weather2 = config("6 - Summer Weather", "1 - Meadows 2", Seasonality.Seasons.Environment.Environments.None, "Environment set by summer season.");
			_Summer_Meadows_Weather3 = config("6 - Summer Weather", "1 - Meadows 3", Seasonality.Seasons.Environment.Environments.None, "Environment set by summer season.");
			_Summer_Meadows_Weather4 = config("6 - Summer Weather", "1 - Meadows 4", Seasonality.Seasons.Environment.Environments.None, "Environment set by summer season.");
			_Summer_BlackForest_Weather1 = config("6 - Summer Weather", "2 - BlackForest 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_BlackForest_Weather2 = config("6 - Summer Weather", "2 - BlackForest 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_BlackForest_Weather3 = config("6 - Summer Weather", "2 - BlackForest 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_BlackForest_Weather4 = config("6 - Summer Weather", "2 - BlackForest 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Swamp_Weather1 = config("6 - Summer Weather", "3 - Swamp 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Swamp_Weather2 = config("6 - Summer Weather", "3 - Swamp 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Swamp_Weather3 = config("6 - Summer Weather", "3 - Swamp 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Swamp_Weather4 = config("6 - Summer Weather", "3 - Swamp 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Mountains_Weather1 = config("6 - Summer Weather", "6 - Mountains 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Mountains_Weather2 = config("6 - Summer Weather", "6 - Mountains 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Mountains_Weather3 = config("6 - Summer Weather", "6 - Mountains 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Mountains_Weather4 = config("6 - Summer Weather", "6 - Mountains 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Plains_Weather1 = config("6 - Summer Weather", "5 - Plains 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Plains_Weather2 = config("6 - Summer Weather", "5 - Plains 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Plains_Weather3 = config("6 - Summer Weather", "5 - Plains 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Plains_Weather4 = config("6 - Summer Weather", "5 - Plains 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_MistLands_Weather1 = config("6 - Summer Weather", "6 - MistLands 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_MistLands_Weather2 = config("6 - Summer Weather", "6 - MistLands 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_MistLands_Weather3 = config("6 - Summer Weather", "6 - MistLands 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_MistLands_Weather4 = config("6 - Summer Weather", "6 - MistLands 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Ocean_Weather1 = config("6 - Summer Weather", "6 - Ocean 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Ocean_Weather2 = config("6 - Summer Weather", "6 - Ocean 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Ocean_Weather3 = config("6 - Summer Weather", "6 - Ocean 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_Ocean_Weather4 = config("6 - Summer Weather", "6 - Ocean 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_AshLands_Weather1 = config("6 - Summer Weather", "7 - AshLands 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_AshLands_Weather2 = config("6 - Summer Weather", "7 - AshLands 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_AshLands_Weather3 = config("6 - Summer Weather", "7 - AshLands 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_AshLands_Weather4 = config("6 - Summer Weather", "7 - AshLands 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_DeepNorth_Weather1 = config("6 - Summer Weather", "8 - DeepNorth 1", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_DeepNorth_Weather2 = config("6 - Summer Weather", "8 - DeepNorth 2", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_DeepNorth_Weather3 = config("6 - Summer Weather", "8 - DeepNorth 3", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_Summer_DeepNorth_Weather4 = config("6 - Summer Weather", "8 - DeepNorth 4", Seasonality.Seasons.Environment.Environments.None, "Environments set by Summer season");
			_SummerColor1 = config<Color>("6 - Summer", "Color 1", SeasonColors.SummerColors[0], "Color tint applied to prefabs");
			_SummerColor2 = config<Color>("6 - Summer", "Color 2", SeasonColors.SummerColors[1], "Color tint applied to prefabs");
			_SummerColor3 = config<Color>("6 - Summer", "Color 3", SeasonColors.SummerColors[2], "Color tint applied to prefabs");
			_SummerColor4 = config<Color>("6 - Summer", "Color 4", SeasonColors.SummerColors[3], "Color tint applied to prefabs");
			_SummerStartEffects = config("6 - Summer", "Start Effect", SpecialEffects.SpecialEffect.None, "Visual effect applied when season starts");
			_SummerStopEffects = config("6 - Summer", "Stop Effect", SpecialEffects.SpecialEffect.None, "Visual effect applied when season ends");
		}

		private void OnDestroy()
		{
			((BaseUnityPlugin)this).Config.Save();
		}

		private void SetupWatcher()
		{
			FileSystemWatcher fileSystemWatcher = new FileSystemWatcher(Paths.ConfigPath, ConfigFileName);
			fileSystemWatcher.Changed += ReadConfigValues;
			fileSystemWatcher.Created += ReadConfigValues;
			fileSystemWatcher.Renamed += ReadConfigValues;
			fileSystemWatcher.IncludeSubdirectories = true;
			fileSystemWatcher.SynchronizingObject = ThreadingHelper.SynchronizingObject;
			fileSystemWatcher.EnableRaisingEvents = true;
		}

		private void ReadConfigValues(object sender, FileSystemEventArgs e)
		{
			if (!File.Exists(ConfigFileFullPath))
			{
				return;
			}
			try
			{
				SeasonalityLogger.LogDebug((object)"ReadConfigValues called");
				((BaseUnityPlugin)this).Config.Reload();
			}
			catch
			{
				SeasonalityLogger.LogError((object)("There was an issue loading your " + ConfigFileName));
				SeasonalityLogger.LogError((object)"Please check your config entries for spelling and format!");
			}
		}

		private ConfigEntry<T> config<[<4edcec42-b8ad-494f-8522-113afc165eb1>Nullable(2)] T>(string group, string name, T value, ConfigDescription description, bool synchronizedSetting = true)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			ConfigDescription val = new ConfigDescription(description.Description + (synchronizedSetting ? " [Synced with Server]" : " [Not Synced with Server]"), description.AcceptableValues, description.Tags);
			ConfigEntry<T> val2 = ((BaseUnityPlugin)this).Config.Bind<T>(group, name, value, val);
			SyncedConfigEntry<T> syncedConfigEntry = ConfigSync.AddConfigEntry<T>(val2);
			syncedConfigEntry.SynchronizedConfig = synchronizedSetting;
			return val2;
		}

		private ConfigEntry<T> config<[<4edcec42-b8ad-494f-8522-113afc165eb1>Nullable(2)] T>(string group, string name, T value, string description, bool synchronizedSetting = true)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Expected O, but got Unknown
			return config(group, name, value, new ConfigDescription(description, (AcceptableValueBase)null, Array.Empty<object>()), synchronizedSetting);
		}

		static SeasonalityPlugin()
		{
			string configPath = Paths.ConfigPath;
			char directorySeparatorChar = Path.DirectorySeparatorChar;
			ConfigFileFullPath = configPath + directorySeparatorChar + ConfigFileName;
			ConnectionError = "";
			SeasonalityLogger = Logger.CreateLogSource("Seasonality");
			ConfigSync = new ConfigSync("RustyMods.Seasonality")
			{
				DisplayName = "Seasonality",
				CurrentVersion = "3.0.0",
				MinimumRequiredVersion = "3.0.0"
			};
			_Season = null;
			_SeasonDurationDays = null;
			_SeasonDurationHours = null;
			_SeasonDurationMinutes = null;
			_WeatherDuration = null;
			_WeatherIconEnabled = null;
			_WeatherTimerEnabled = null;
			_SeasonalEffectsEnabled = null;
			_SpringName = null;
			_SpringStartMsg = null;
			_SpringTooltip = null;
			_SpringModifier = null;
			_SpringResistanceElement = null;
			_SpringResistanceMod = null;
			_SpringValue = null;
			_FallName = null;
			_FallStartMsg = null;
			_FallTooltip = null;
			_FallModifier = null;
			_FallResistanceElement = null;
			_FallResistanceMod = null;
			_FallValue = null;
			_WinterName = null;
			_WinterStartMsg = null;
			_WinterTooltip = null;
			_WinterModifier = null;
			_WinterResistanceElement = null;
			_WinterResistantMod = null;
			_WinterValue = null;
			_SummerName = null;
			_SummerStartMsg = null;
			_SummerTooltip = null;
			_SummerModifier = null;
			_SummerResistanceElement = null;
			_SummerResistanceMod = null;
			_SummerValue = null;
			_Fall_Meadows_Weather1 = null;
			_Fall_Meadows_Weather2 = null;
			_Fall_Meadows_Weather3 = null;
			_Fall_Meadows_Weather4 = null;
			_Fall_BlackForest_Weather1 = null;
			_Fall_BlackForest_Weather2 = null;
			_Fall_BlackForest_Weather3 = null;
			_Fall_BlackForest_Weather4 = null;
			_Fall_Swamp_Weather1 = null;
			_Fall_Swamp_Weather2 = null;
			_Fall_Swamp_Weather3 = null;
			_Fall_Swamp_Weather4 = null;
			_Fall_Mountains_Weather1 = null;
			_Fall_Mountains_Weather2 = null;
			_Fall_Mountains_Weather3 = null;
			_Fall_Mountains_Weather4 = null;
			_Fall_Plains_Weather1 = null;
			_Fall_Plains_Weather2 = null;
			_Fall_Plains_Weather3 = null;
			_Fall_Plains_Weather4 = null;
			_Fall_MistLands_Weather1 = null;
			_Fall_MistLands_Weather2 = null;
			_Fall_MistLands_Weather3 = null;
			_Fall_MistLands_Weather4 = null;
			_Fall_Ocean_Weather1 = null;
			_Fall_Ocean_Weather2 = null;
			_Fall_Ocean_Weather3 = null;
			_Fall_Ocean_Weather4 = null;
			_Fall_AshLands_Weather1 = null;
			_Fall_AshLands_Weather2 = null;
			_Fall_AshLands_Weather3 = null;
			_Fall_AshLands_Weather4 = null;
			_Fall_DeepNorth_Weather1 = null;
			_Fall_DeepNorth_Weather2 = null;
			_Fall_DeepNorth_Weather3 = null;
			_Fall_DeepNorth_Weather4 = null;
			_Winter_Meadows_Weather1 = null;
			_Winter_Meadows_Weather2 = null;
			_Winter_Meadows_Weather3 = null;
			_Winter_Meadows_Weather4 = null;
			_Winter_BlackForest_Weather1 = null;
			_Winter_BlackForest_Weather2 = null;
			_Winter_BlackForest_Weather3 = null;
			_Winter_BlackForest_Weather4 = null;
			_Winter_Swamp_Weather1 = null;
			_Winter_Swamp_Weather2 = null;
			_Winter_Swamp_Weather3 = null;
			_Winter_Swamp_Weather4 = null;
			_Winter_Mountains_Weather1 = null;
			_Winter_Mountains_Weather2 = null;
			_Winter_Mountains_Weather3 = null;
			_Winter_Mountains_Weather4 = null;
			_Winter_Plains_Weather1 = null;
			_Winter_Plains_Weather2 = null;
			_Winter_Plains_Weather3 = null;
			_Winter_Plains_Weather4 = null;
			_Winter_MistLands_Weather1 = null;
			_Winter_MistLands_Weather2 = null;
			_Winter_MistLands_Weather3 = null;
			_Winter_MistLands_Weather4 = null;
			_Winter_Ocean_Weather1 = null;
			_Winter_Ocean_Weather2 = null;
			_Winter_Ocean_Weather3 = null;
			_Winter_Ocean_Weather4 = null;
			_Winter_AshLands_Weather1 = null;
			_Winter_AshLands_Weather2 = null;
			_Winter_AshLands_Weather3 = null;
			_Winter_AshLands_Weather4 = null;
			_Winter_DeepNorth_Weather1 = null;
			_Winter_DeepNorth_Weather2 = null;
			_Winter_DeepNorth_Weather3 = null;
			_Winter_DeepNorth_Weather4 = null;
			_Spring_Meadows_Weather1 = null;
			_Spring_Meadows_Weather2 = null;
			_Spring_Meadows_Weather3 = null;
			_Spring_Meadows_Weather4 = null;
			_Spring_BlackForest_Weather1 = null;
			_Spring_BlackForest_Weather2 = null;
			_Spring_BlackForest_Weather3 = null;
			_Spring_BlackForest_Weather4 = null;
			_Spring_Swamp_Weather1 = null;
			_Spring_Swamp_Weather2 = null;
			_Spring_Swamp_Weather3 = null;
			_Spring_Swamp_Weather4 = null;
			_Spring_Mountains_Weather1 = null;
			_Spring_Mountains_Weather2 = null;
			_Spring_Mountains_Weather3 = null;
			_Spring_Mountains_Weather4 = null;
			_Spring_Plains_Weather1 = null;
			_Spring_Plains_Weather2 = null;
			_Spring_Plains_Weather3 = null;
			_Spring_Plains_Weather4 = null;
			_Spring_MistLands_Weather1 = null;
			_Spring_MistLands_Weather2 = null;
			_Spring_MistLands_Weather3 = null;
			_Spring_MistLands_Weather4 = null;
			_Spring_Ocean_Weather1 = null;
			_Spring_Ocean_Weather2 = null;
			_Spring_Ocean_Weather3 = null;
			_Spring_Ocean_Weather4 = null;
			_Spring_AshLands_Weather1 = null;
			_Spring_AshLands_Weather2 = null;
			_Spring_AshLands_Weather3 = null;
			_Spring_AshLands_Weather4 = null;
			_Spring_DeepNorth_Weather1 = null;
			_Spring_DeepNorth_Weather2 = null;
			_Spring_DeepNorth_Weather3 = null;
			_Spring_DeepNorth_Weather4 = null;
			_Summer_Meadows_Weather1 = null;
			_Summer_Meadows_Weather2 = null;
			_Summer_Meadows_Weather3 = null;
			_Summer_Meadows_Weather4 = null;
			_Summer_BlackForest_Weather1 = null;
			_Summer_BlackForest_Weather2 = null;
			_Summer_BlackForest_Weather3 = null;
			_Summer_BlackForest_Weather4 = null;
			_Summer_Swamp_Weather1 = null;
			_Summer_Swamp_Weather2 = null;
			_Summer_Swamp_Weather3 = null;
			_Summer_Swamp_Weather4 = null;
			_Summer_Mountains_Weather1 = null;
			_Summer_Mountains_Weather2 = null;
			_Summer_Mountains_Weather3 = null;
			_Summer_Mountains_Weather4 = null;
			_Summer_Plains_Weather1 = null;
			_Summer_Plains_Weather2 = null;
			_Summer_Plains_Weather3 = null;
			_Summer_Plains_Weather4 = null;
			_Summer_MistLands_Weather1 = null;
			_Summer_MistLands_Weather2 = null;
			_Summer_MistLands_Weather3 = null;
			_Summer_MistLands_Weather4 = null;
			_Summer_Ocean_Weather1 = null;
			_Summer_Ocean_Weather2 = null;
			_Summer_Ocean_Weather3 = null;
			_Summer_Ocean_Weather4 = null;
			_Summer_AshLands_Weather1 = null;
			_Summer_AshLands_Weather2 = null;
			_Summer_AshLands_Weather3 = null;
			_Summer_AshLands_Weather4 = null;
			_Summer_DeepNorth_Weather1 = null;
			_Summer_DeepNorth_Weather2 = null;
			_Summer_DeepNorth_Weather3 = null;
			_Summer_DeepNorth_Weather4 = null;
			_FallColor1 = null;
			_FallColor2 = null;
			_FallColor3 = null;
			_FallColor4 = null;
			_SpringColor1 = null;
			_SpringColor2 = null;
			_SpringColor3 = null;
			_SpringColor4 = null;
			_WinterColor1 = null;
			_WinterColor2 = null;
			_WinterColor3 = null;
			_WinterColor4 = null;
			_SummerColor1 = null;
			_SummerColor2 = null;
			_SummerColor3 = null;
			_SummerColor4 = null;
			_FallStartEffects = null;
			_FallStopEffects = null;
			_SpringStartEffects = null;
			_SpringStopEffects = null;
			_SummerStartEffects = null;
			_SummerStopEffects = null;
			_WinterStartEffects = null;
			_WinterStopEffects = null;
			_SeasonControl = null;
			_ModEnabled = null;
			_CounterVisible = null;
			_WeatherControl = null;
			_StatusEffectVisible = null;
			_SummerNeverCold = null;
			_WinterAlwaysCold = null;
			_ReplaceCreatureTextures = null;
			_LastSavedSeasonChange = null;
			_serverConfigLocked = null;
		}
	}
	[HarmonyPatch(typeof(ZNet), "OnNewConnection")]
	public static class RegisterAndCheckVersion
	{
		[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(1)]
		private static void Prefix(ZNetPeer peer, ref ZNet __instance)
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			SeasonalityPlugin.SeasonalityLogger.LogDebug((object)"Registering version RPC handler");
			peer.m_rpc.Register<ZPackage>("Seasonality_VersionCheck", (Action<ZRpc, ZPackage>)RpcHandlers.RPC_Seasonality_Version);
			SeasonalityPlugin.SeasonalityLogger.LogInfo((object)"Invoking version check");
			ZPackage val = new ZPackage();
			val.Write("3.0.0");
			val.Write(RpcHandlers.ComputeHashForMod().Replace("-", ""));
			peer.m_rpc.Invoke("Seasonality_VersionCheck", new object[1] { val });
		}
	}
	[<4edcec42-b8ad-494f-8522-113afc165eb1>Nullable(0)]
	[HarmonyPatch(typeof(ZNet), "RPC_PeerInfo")]
	[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(1)]
	public static class VerifyClient
	{
		private static bool Prefix(ZRpc rpc, ZPackage pkg, ref ZNet __instance)
		{
			if (!__instance.IsServer() || RpcHandlers.ValidatedPeers.Contains(rpc))
			{
				return true;
			}
			SeasonalityPlugin.SeasonalityLogger.LogWarning((object)("Peer (" + rpc.m_socket.GetHostName() + ") never sent version or couldn't due to previous disconnect, disconnecting"));
			rpc.Invoke("Error", new object[1] { 3 });
			return false;
		}

		private static void Postfix(ZNet __instance)
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Expected O, but got Unknown
			ZRoutedRpc.instance.InvokeRoutedRPC(ZRoutedRpc.instance.GetServerPeerID(), "SeasonalityRequestAdminSync", new object[1] { (object)new ZPackage() });
		}
	}
	[HarmonyPatch(typeof(FejdStartup), "ShowConnectError")]
	public class ShowConnectionError
	{
		[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(1)]
		private static void Postfix(FejdStartup __instance)
		{
			if (__instance.m_connectionFailedPanel.activeSelf)
			{
				__instance.m_connectionFailedError.fontSizeMax = 25f;
				__instance.m_connectionFailedError.fontSizeMin = 15f;
				TMP_Text connectionFailedError = __instance.m_connectionFailedError;
				connectionFailedError.text = connectionFailedError.text + "\n" + SeasonalityPlugin.ConnectionError;
			}
		}
	}
	[HarmonyPatch(typeof(ZNet), "Disconnect")]
	public static class RemoveDisconnectedPeerFromVerified
	{
		[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(1)]
		private static void Prefix(ZNetPeer peer, ref ZNet __instance)
		{
			if (__instance.IsServer())
			{
				SeasonalityPlugin.SeasonalityLogger.LogInfo((object)("Peer (" + peer.m_rpc.m_socket.GetHostName() + ") disconnected, removing from validated list"));
				RpcHandlers.ValidatedPeers.Remove(peer.m_rpc);
			}
		}
	}
	[<4edcec42-b8ad-494f-8522-113afc165eb1>Nullable(0)]
	[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(1)]
	public static class RpcHandlers
	{
		public static readonly List<ZRpc> ValidatedPeers = new List<ZRpc>();

		public static void RPC_Seasonality_Version(ZRpc rpc, ZPackage pkg)
		{
			string text = pkg.ReadString();
			string text2 = pkg.ReadString();
			string text3 = ComputeHashForMod().Replace("-", "");
			SeasonalityPlugin.SeasonalityLogger.LogInfo((object)("Version check, local: 3.0.0,  remote: " + text));
			if (text2 != text3 || text != "3.0.0")
			{
				SeasonalityPlugin.ConnectionError = "Seasonality Installed: 3.0.0 " + text3 + "\n Needed: " + text + " " + text2;
				if (ZNet.instance.IsServer())
				{
					SeasonalityPlugin.SeasonalityLogger.LogWarning((object)("Peer (" + rpc.m_socket.GetHostName() + ") has incompatible version, disconnecting..."));
					rpc.Invoke("Error", new object[1] { 3 });
				}
			}
			else if (!ZNet.instance.IsServer())
			{
				SeasonalityPlugin.SeasonalityLogger.LogInfo((object)"Received same version from server!");
			}
			else
			{
				SeasonalityPlugin.SeasonalityLogger.LogInfo((object)("Adding peer (" + rpc.m_socket.GetHostName() + ") to validated list"));
				ValidatedPeers.Add(rpc);
			}
		}

		public static string ComputeHashForMod()
		{
			using SHA256 sHA = SHA256.Create();
			byte[] array = sHA.ComputeHash(File.ReadAllBytes(Assembly.GetExecutingAssembly().Location));
			StringBuilder stringBuilder = new StringBuilder();
			byte[] array2 = array;
			foreach (byte b in array2)
			{
				stringBuilder.Append(b.ToString("X2"));
			}
			return stringBuilder.ToString();
		}
	}
}
namespace Seasonality.Seasons
{
	[<4edcec42-b8ad-494f-8522-113afc165eb1>Nullable(0)]
	[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(1)]
	public static class MaterialReplacer
	{
		[HarmonyPatch(typeof(ZoneSystem), "Start")]
		[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(0)]
		private static class ZoneSystemPatch
		{
			[<ef3edde2-b19f-4202-ba50-917911eeeb5f>NullableContext(1)]
			private static void Postfix(ZoneSystem __instance)
			{
				if (Object.op_Implicit((Object)(object)__instance))
				{
					GetAllMaterials();
					GetAllTextures();
				}
			}
		}

		public static readonly Dictionary<string, Texture> CachedTextures = new Dictionary<string, Texture>();

		public static readonly Dictionary<string, Material> CachedMaterials = new Dictionary<string, Material>();

		public static readonly Dictionary<string, Material> CustomMaterials = new Dictionary<string, Material>();

		private static void GetAllMaterials()
		{
			Material[] array = Resources.FindObjectsOfTypeAll<Material>();
			Material[] array2 = array;
			foreach (Material val in array2)
			{
				if (Object.op_Implicit((Object)(object)val))
				{
					CachedMaterials[((Object)val).name.Replace("(Instance)", "").Replace(" ", "")] = val;
				}
			}
		}

		private static void GetAllTextures()
		{
			foreach (Material value in CachedMaterials.Values)
			{
				if (!Object.op_Implicit((Object)(object)value))
				{
					continue;
				}
				string[] texturePropertyNames = value.GetTexturePropertyNames();
				if (Utils.FindTexturePropName(texturePropertyNames, "moss", out var result))
				{
					Texture texture = value.GetTexture(result);
					if (Object.op_Implicit((Object)(object)texture))
					{
						CachedTextures[((Object)value).name.Replace("(Instance)", "").Replace(" ", "") + "_moss"] = texture;
					}
				}
				if (Utils.FindTexturePropName(texturePropertyNames, "main", out var result2))
				{
					CachedTextures[((Object)value).name.Replace("(Instance)", "").Replace(" ", "")] = value.GetTexture(result2);
				}
			}
		}

		private static void SetMossTexture(string materialName, Texture originalTex)
		{
			if (!CachedTextures.TryGetValue("Pillar_snow_mat_moss", out var value) || !CachedTextures.TryGetValue("rock_heath_moss", out var value2) || !CachedMaterials.TryGetValue(materialName, out var value3))
			{
				return;
			}
			string[] texturePropertyNames = value3.GetTexturePropertyNames();
			if (Utils.FindTexturePropName(texturePropertyNames, "moss", out var result))
			{
				switch (SeasonalityPlugin._Season.Value)
				{
				case SeasonalityPlugin.Season.Winter:
					value3.SetTexture(result, value);
					break;
				case SeasonalityPlugin.Season.Fall:
					value3.SetTexture(result, value2);
					break;
				default:
					value3.SetTexture(result, originalTex);
					break;
				}
			}
		}

		private static void SetCustomMossTexture(string materialName, Texture originalTex)
		{
			if (!CachedTextures.TryGetValue("Pillar_snow_mat_moss", out var value) || !CachedTextures.TryGetValue("rock_heath_moss", out var value2) || !CustomMaterials.TryGetValue(materialName, out var value3))
			{
				return;
			}
			string[] texturePropertyNames = value3.GetTexturePropertyNames();
			if (Utils.FindTexturePropName(texturePropertyNames, "moss", out var result))
			{
				switch (SeasonalityPlugin._Season.Value)
				{
				case SeasonalityPlugin.Season.Winter:
					value3.SetTexture(result, value);
					break;
				case SeasonalityPlugin.Season.Fall:
					value3.SetTexture(result, value2);
					break;
				default:
					value3.SetTexture(result, originalTex);
					break;
				}
			}
		}

		private static void SetMainTexture(string materialName, [<4edcec42-b8ad-494f-8522-113afc165eb1>Nullable(2)] Texture tex)
		{
			if (CachedMaterials.TryGetValue(materialName, out var value))
			{
				string[] texturePropertyNames = value.GetTexturePropertyNames();
				if (Utils.FindTexturePropName(texturePropertyNames, "main", out var result))
				{
					value.SetTexture(result, tex);
				}
			}
		}

		private static void SetCustomMainTexture(string materialName, [<4edcec42-b8ad-494f-8522-113afc165eb1>Nullable(2)] Texture tex, int index = 0)
		{
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			if (!CustomMaterials.TryGetValue(materialName, out var value))
			{
				SeasonalityPlugin.SeasonalityLogger.LogWarning((object)("failed to get custom material for = " + materialName));
				return;
			}
			string[] texturePropertyNames = value.GetTexturePropertyNames();
			if (Utils.FindTexturePropName(texturePropertyNames, "main", out var result))
			{
				value.SetTexture(result, tex);
				SeasonalityPlugin.Season value2 = SeasonalityPlugin._Season.Value;
				SeasonalityPlugin.Season season = value2;
				if (season == SeasonalityPlugin.Season.Fall)
				{
					value.color = SeasonColors.FallColors[index];
				}
				else
				{
					value.color = Color.white;
				}
			}
		}

		public static void ModifyCachedMaterials()
		{
			ModifyMossMaterials();
			ModifyCreatures();
			ModifyVegetation();
			ModifyCustomMaterials();
			ModifyPieceMaterials();
		}

		private static void ModifyPieceMaterials()
		{
			Dictionary<string, CustomTextures.PieceDirectories> dictionary = new Dictionary<string, CustomTextures.PieceDirectories>
			{
				{
					"straw_roof",
					CustomTextures.PieceDirectories.Straw
				},
				{
					"straw_roof_alpha",
					CustomTextures.PieceDirectories.Straw
				},
				{
					"RoofShingles",
					CustomTextures.PieceDirectories.DarkWood
				},
				{
					"GoblinVillage_Cloth",
					CustomTextures.PieceDirectories.GoblinVillage
				},
				{
					"GoblinVillage",
					CustomTextures.PieceDirectories.GoblinVillage
				}
			};
			Dictionary<string, CustomTextures.PieceDirectories> dictionary2 = new Dictionary<string, CustomTextures.PieceDirectories>
			{
				{
					"straw_roof_worn",
					CustomTextures.PieceDirectories.Straw
				},
				{
					"straw_roof_worn_alpha",
					CustomTextures.PieceDirectories.Straw
				},
				{
					"RoofShingles_worn",
					CustomTextures.PieceDirectories.DarkWood
				},
				{
					"GoblinVillage",
					CustomTextures.PieceDirectories.GoblinVillage
				}
			};
			Dictionary<string, CustomTextures.PieceDirectories> dictionary3 = new Dictionary<string, CustomTextures.PieceDirectories> { 
			{
				"straw_roof_corner_alpha",
				CustomTextures.PieceDirectories.Straw
			} };
			Dictionary<string, CustomTextures.PieceDirectories> dictionary4 = new Dictionary<string, CustomTextures.PieceDirectories> { 
			{
				"straw_roof_corner_worn_alpha",
				CustomTextures.PieceDirectories.Straw
			} };
			foreach (KeyValuePair<string, CustomTextures.PieceDirectories> item in dictionary)
			{
				Texture customTexture = GetCustomTexture(item.Value, item.Key);
				if (Object.op_Implicit((Object)(object)customTexture))
				{
					SetMainTexture(item.Key, customTexture);
				}
			}
			foreach (KeyValuePair<string, CustomTextures.PieceDirectories> item2 in dictionary2)
			{
				Texture customTexture2 = GetCustomTexture(item2.Value, item2.Key, isWorn: true);
				if (Object.op_Implicit((Object)(object)customTexture2))
				{
					SetMainTexture(item2.Key, customTexture2);
				}
			}
			foreach (KeyValuePair<string, CustomTextures.PieceDirectories> item3 in dictionary3)
			{
				Texture customTexture3 = GetCustomTexture(item3.Value, item3.Key, isWorn: false, isCorner: true);
				if (Object.op_Implicit((Object)(object)customTexture3))
				{
					SetMainTexture(item3.Key, customTexture3);
				}
			}
			foreach (KeyValuePair<string, CustomTextures.PieceDirectories> item4 in dictionary4)
			{
				Texture customTexture4 = GetCustomTexture(item4.Value, item4.Key, isWorn: true, isCorner: true);
				if (Object.op_Implicit((Object)(object)customTexture4))
				{
					SetMainTexture(item4.Key, customTexture4);
				}
			}
		}

		private static void ModifyMossMaterials()
		{
			if (!CachedTextures.TryGetValue("rock_heath_moss", out var value) || !CachedTextures.TryGetValue("swamptree_log_moss", out var value2) || !CachedTextures.TryGetValue("runetablet_moss", out var value3) || !CachedTextures.TryGetValue("finewood_log_worn_moss", out var value4) || !CachedTextures.TryGetValue("dvergr_oak_worn_creep_mat_moss", out var value5) || !CachedTextures.TryGetValue("rock1_copper_moss", out var value6) || !CachedTextures.TryGetValue("yggdrasil_branch_moss", out var value7))
			{
				return;
			}
			Dictionary<string, Texture> dictionary = new Dictionary<string, Texture>
			{
				{ "Altar_mat", value },
				{ "barnacle", value2 },
				{ "beech_bark", value3 },
				{ "beech_bark_small", value3 },
				{ "bossstone_eikthyr", value3 },
				{ "bossstone_theelder", value3 },
				{ "bossstone_bonemass", value3 },
				{ "bossstone_dragonqueen_mat", value3 },
				{ "bossstone_yagluth_mat", value3 },
				{ "bossstone_seekerqueen_mat", value3 },
				{ "corgihare", value3 },
				{ "Dirtwall", value3 },
				{ "dvergr_oak_worn_creep_mat", value5 },
				{ "dvergrrunestone_mat", value5 },
				{ "DvergrTownPiecesWornCreep_Mat", value5 },
				{ "FingerRock", value },
				{ "finewood_log_worn", value4 },
				{ "finewood_log_destruction", value4 },
				{ "finewood_log_broken", value4 },
				{ "Firetree_oldlog", value3 },
				{ "heathrock", value },
				{ "hugeskull", value2 },
				{ "leviathan", value2 },
				{ "leviathan_rock_4", value2 },
				{ "NestRock", value4 },
				{ "oak_bark", value4 },
				{ "oak_bark_quarter", value4 },
				{ "ObsidianRock_mat", value3 },
				{ "rock1", value6 },
				{ "rock1_copper", value6 },
				{ "rock1_mountain", value3 },
				{ "rock3_silver", value6 },
				{ "rock4_coast", value3 },
				{ "rock_heath", value },
				{ "Rocks_3_roughness", value6 },
				{ "Rocks_4_roughness", value3 },
				{ "Rocks_4_roughness_interior", value3 },
				{ "Rocks_4_roughness_plains", value },
				{ "roundlog", value4 },
				{ "runestone", value3 },
				{ "runetablet", value3 },
				{ "runetablet_plains", value },
				{ "runetablet_vegvisir", value3 },
				{ "Shoot_Stump_mat", value4 },
				{ "Shoot_Trunk_mat", value4 },
				{ "Stalagtite_mat", value3 },
				{ "startplatform", value3 },
				{ "statue1", value2 },
				{ "stone_huge", value3 },
				{ "stone_large", value4 },
				{ "stone_large_interior", value4 },
				{ "stoneblock", value3 },
				{ "stonechest", value4 },
				{ "stonechest_plains", value },
				{ "stonechest_sunkencrypt", value },
				{ "stonekit_floor_interior", value3 },
				{ "stonekit_stone_mat", value4 },
				{ "stonepillar", value3 },
				{ "stoneslab", value4 },
				{ "stonewall", value3 },
				{ "stonewall_1", value3 },
				{ "stump", value3 },
				{ "sunkenkit_stone_mat_interior1", value3 },
				{ "sunkenkit_stone_mat_interior3", value3 },
				{ "sunkenkit_stone_mat_interior4", value3 },
				{ "sunkenkit_stone_mat_interior5", value3 },
				{ "sunkenkit_stone_mat_interior_triplanar", value3 },
				{ "swamptree1_bark", value2 },
				{ "swamptree2_bark", value2 },
				{ "swamptree2_barkInfested", value2 },
				{ "swamptree2_log", value2 },
				{ "swamptree_log", value2 },
				{ "swamptree_stump", value2 },
				{ "Tradaerrune_Mat", value3 },
				{ "wood_pile_Broken", value4 },
				{ "wood_pile_Worn", value4 },
				{ "yggdrasil_branch", value7 }
			};
			foreach (KeyValuePair<string, Texture> item in dictionary)
			{
				SetMossTexture(item.Key, item.Value);
			}
		}

		private static void ModifyCustomMossMaterials()
		{
			if (!CachedTextures.TryGetValue("runetablet_moss", out var value) || !CachedTextures.TryGetValue("yggdrasil_branch_moss", out var value2))
			{
				return;
			}
			Dictionary<string, Texture> dictionary = new Dictionary<string, Texture>
			{
				{ "custom_beech_bark_small_0", value },
				{ "custom_beech_bark_small_1", value },
				{ "custom_beech_bark_small_2", value },
				{ "custom_beech_bark_small_3", value },
				{ "custom_beech_bark_0", value },
				{ "custom_beech_bark_1", value },
				{ "custom_beech_bark_2", value },
				{ "custom_beech_bark_3", value },
				{ "custom_birch_bark_0", value },
				{ "custom_birch_bark_1", value },
				{ "custom_birch_bark_2", value },
				{ "custom_birch_bark_3", value },
				{ "custom_oak_bark_0", value },
				{ "custom_oak_bark_1", value },
				{ "custom_oak_bark_2", value },
				{ "custom_oak_bark_3", value },
				{ "custom_Shoot_Trunk_mat_0", value2 },
				{ "custom_Shoot_Trunk_mat_1", value2 },
				{ "custom_Shoot_Trunk_mat_2", value2 },
				{ "custom_Shoot_Trunk_mat_3", value2 }
			};
			foreach (KeyValuePair<string, Texture> item in dictionary)
			{
				SetCustomMossTexture(item.Key, item.Value);
			}
		}

		private static void ModifyCreatures()
		{
			Dictionary<string, CustomTextures.CreatureDirectories> dictionary = new Dictionary<string, CustomTextures.CreatureDirectories>
			{
				{
					"lox",
					CustomTextures.CreatureDirectories.Lox
				},
				{
					"troll",
					CustomTextures.CreatureDirectories.Troll
				},
				{
					"Hare_mat",
					CustomTextures.CreatureDirectories.Hare
				},
				{
					"Feasting_mat",
					CustomTextures.CreatureDirectories.Tick
				},
				{
					"SeaSerpent_mat",
					CustomTextures.CreatureDirectories.Serpent
				},
				{
					"swampfish",
					CustomTextures.CreatureDirectories.Leech
				},
				{
					"Deathsquito_mat",
					CustomTextures.CreatureDirectories.Deathsquito
				},
				{
					"seagal",
					CustomTextures.CreatureDirectories.Gull
				},
				{
					"neck",
					CustomTextures.CreatureDirectories.Neck
				},
				{
					"wraith",
					CustomTextures.CreatureDirectories.Wraith
				},
				{
					"blob",
					CustomTextures.CreatureDirectories.Blob
				},
				{
					"blob_elite",
					CustomTextures.CreatureDirectories.Oozer
				},
				{
					"gjall_mat",
					CustomTextures.CreatureDirectories.Gjall
				}
			};
			foreach (KeyValuePair<string, CustomTextures.CreatureDirectories> item in dictionary)
			{
				Texture customTexture = GetCustomTexture(item.Value, item.Key);
				if (Object.op_Implicit((Object)(object)customTexture))
				{
					SetMainTexture(item.Key, customTexture);
				}
			}
		}

		private static void ModifyVegetation()
		{
			Dictionary<string, CustomTextures.VegDirectories> dictionary = new Dictionary<string, CustomTextures.VegDirectories>
			{
				{
					"beech_leaf",
					CustomTextures.VegDirectories.Beech
				},
				{
					"beech_leaf_sapling",
					CustomTextures.VegDirectories.BeechSmall
				},
				{
					"beech_leaf_small",
					CustomTextures.VegDirectories.BeechSmall
				},
				{
					"beech_particle",
					CustomTextures.VegDirectories.Beech
				},
				{
					"birch_leaf",
					CustomTextures.VegDirectories.Birch
				},
				{
					"birch_leaf_aut",
					CustomTextures.VegDirectories.Birch
				},
				{
					"birch_particle",
					CustomTextures.VegDirectories.Birch
				},
				{
					"birch_seeds_leaf",
					CustomTextures.VegDirectories.Birch
				},
				{
					"oak_leaf",
					CustomTextures.VegDirectories.Oak
				},
				{
					"oak_particle",
					CustomTextures.VegDirectories.Oak
				},
				{
					"Pine_tree_small",
					CustomTextures.VegDirectories.FirSmall
				},
				{
					"Pine_tree",
					CustomTextures.VegDirectories.Fir
				},
				{
					"Pine_tree_small_dead",
					CustomTextures.VegDirectories.FirDead
				},
				{
					"branch_dead_particle",
					CustomTextures.VegDirectories.FirDeadParticles
				},
				{
					"Pine_tree_xmas",
					CustomTextures.VegDirectories.FirSmall
				},
				{
					"branch_particle",
					CustomTextures.VegDirectories.FirParticles
				},
				{
					"PineTree_01",
					CustomTextures.VegDirectories.Pine
				},
				{
					"PineCone",
					CustomTextures.VegDirectories.PineParticles
				},
				{
					"yggdrasil_branch_leafs",
					CustomTextures.VegDirectories.YggaShoot
				},
				{
					"Shoot_Leaf_mat",
					CustomTextures.VegDirectories.YggaShoot
				},
				{
					"shoot_leaf_particle",
					CustomTextures.VegDirectories.YggaShoot
				},
				{
					"swamptree1_branch",
					CustomTextures.VegDirectories.SwampTrees
				},
				{
					"swamptree2_branch",
					CustomTextures.VegDirectories.SwampGrass
				},
				{
					"Bush01",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"Bush01_blueberry",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"Bush01_heath",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"Bush01_raspberry",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"Bush02_en",
					CustomTextures.VegDirectories.PlainsBush
				},
				{
					"Cloudberrybush",
					CustomTextures.VegDirectories.CloudberryBush
				},
				{
					"Vines_Mat",
					CustomTextures.VegDirectories.Vines
				},
				{
					"VinesBranch_mat",
					CustomTextures.VegDirectories.Vines
				},
				{
					"shrub",
					CustomTextures.VegDirectories.Shrub
				},
				{
					"shrub_heath",
					CustomTextures.VegDirectories.Shrub
				},
				{
					"shrub2_leafparticle",
					CustomTextures.VegDirectories.ShrubParticles
				},
				{
					"shrub2_leafparticle_heath",
					CustomTextures.VegDirectories.ShrubParticles
				}
			};
			foreach (KeyValuePair<string, CustomTextures.VegDirectories> item in dictionary)
			{
				Texture customTexture = GetCustomTexture(item.Value, item.Key);
				if (Object.op_Implicit((Object)(object)customTexture))
				{
					SetMainTexture(item.Key, customTexture);
				}
			}
		}

		private static void ModifyCustomMaterials()
		{
			Dictionary<string, CustomTextures.VegDirectories> dictionary = new Dictionary<string, CustomTextures.VegDirectories>
			{
				{
					"custom_beech_leaf_small_0",
					CustomTextures.VegDirectories.BeechSmall
				},
				{
					"custom_beech_leaf_small_1",
					CustomTextures.VegDirectories.BeechSmall
				},
				{
					"custom_beech_leaf_small_2",
					CustomTextures.VegDirectories.BeechSmall
				},
				{
					"custom_beech_leaf_small_3",
					CustomTextures.VegDirectories.BeechSmall
				},
				{
					"custom_beech_leaf_0",
					CustomTextures.VegDirectories.Beech
				},
				{
					"custom_beech_leaf_1",
					CustomTextures.VegDirectories.Beech
				},
				{
					"custom_beech_leaf_2",
					CustomTextures.VegDirectories.Beech
				},
				{
					"custom_beech_leaf_3",
					CustomTextures.VegDirectories.Beech
				},
				{
					"custom_birch_leaf_0",
					CustomTextures.VegDirectories.Birch
				},
				{
					"custom_birch_leaf_1",
					CustomTextures.VegDirectories.Birch
				},
				{
					"custom_birch_leaf_2",
					CustomTextures.VegDirectories.Birch
				},
				{
					"custom_birch_leaf_3",
					CustomTextures.VegDirectories.Birch
				},
				{
					"custom_birch_leaf_aut_0",
					CustomTextures.VegDirectories.Birch
				},
				{
					"custom_birch_leaf_aut_1",
					CustomTextures.VegDirectories.Birch
				},
				{
					"custom_birch_leaf_aut_2",
					CustomTextures.VegDirectories.Birch
				},
				{
					"custom_birch_leaf_aut_3",
					CustomTextures.VegDirectories.Birch
				},
				{
					"custom_Bush01_blueberry_0",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_blueberry_1",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_blueberry_2",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_blueberry_3",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_0",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_1",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_2",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_3",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_heath_0",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_heath_1",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_heath_2",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_heath_3",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush02_en_0",
					CustomTextures.VegDirectories.PlainsBush
				},
				{
					"custom_Bush02_en_1",
					CustomTextures.VegDirectories.PlainsBush
				},
				{
					"custom_Bush02_en_2",
					CustomTextures.VegDirectories.PlainsBush
				},
				{
					"custom_Bush02_en_3",
					CustomTextures.VegDirectories.PlainsBush
				},
				{
					"custom_oak_leaf_0",
					CustomTextures.VegDirectories.Oak
				},
				{
					"custom_oak_leaf_1",
					CustomTextures.VegDirectories.Oak
				},
				{
					"custom_oak_leaf_2",
					CustomTextures.VegDirectories.Oak
				},
				{
					"custom_oak_leaf_3",
					CustomTextures.VegDirectories.Oak
				},
				{
					"custom_Bush01_raspberry_0",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_raspberry_1",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_raspberry_2",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_Bush01_raspberry_3",
					CustomTextures.VegDirectories.Bushes
				},
				{
					"custom_shrub_0",
					CustomTextures.VegDirectories.Shrub
				},
				{
					"custom_shrub_1",
					CustomTextures.VegDirectories.Shrub
				},
				{
					"custom_shrub_2",
					CustomTextures.VegDirectories.Shrub
				},
				{
					"custom_shrub_3",
					CustomTextures.VegDirectories.Shrub
				},
				{
					"custom_shrub_heath_0",
					CustomTextures.VegDirectories.Shrub
				},
				{
					"custom_shrub_heath_1",
					CustomTextures.VegDirectories.Shrub
				},
				{
					"custom_shrub_heath_2",
					CustomTextures.VegDirectories.Shrub
				},
				{
					"custom_shrub_heath_3",
					CustomTextures.VegDirectories.Shrub
				},
				{
					"custom_Vines_Mat_0",
					CustomTextures.VegDirectories.Vines
				},
				{
					"custom_Vines_Mat_1",
					CustomTextures.VegDirectories.Vines
				},
				{
					"custom_Vines_Mat_2",
					CustomTextures.VegDirectories.Vines
				},
				{
					"custom_Vines_Mat_3",
					CustomTextures.VegDirectories.Vines
				},
				{
					"custom_Shoot_Leaf_mat_0",
					CustomTextures.VegDirectories.YggaShoot
				},
				{
					"custom_Shoot_Leaf_mat_1",
					CustomTextures.VegDirectories.YggaShoot
				},
				{
					"custom_Shoot_Leaf_mat_2",
					CustomTextures.VegDirectories.YggaShoot
				},
				{
					"custom_Shoot_Leaf_mat_3",
					CustomTextures.VegDirectories.YggaShoot
				}
			};
			foreach (KeyValuePair<string, CustomTextures.VegDirectories> item in dictionary)
			{
				string originalMaterialName = item.Key.Replace("custom_", "").Replace("_0", "").Replace("_1", "")
					.Replace("_2", "")
					.Replace("_3", "");
				int index = int.Parse(item.Key.Substring(item.Key.Length - 1));
				Texture customTexture = GetCustomTexture(item.Value, originalMaterialName);
				SetCustomMainTexture(item.Key, customTexture, index);
			}
			ModifyCustomMossMaterials();
		}

		[return: <4edcec42-b8ad-494f-8522-113afc165eb1>Nullable(2)]
		private static Texture GetCustomTexture(CustomTextures.CreatureDirectories directory, string originalMaterialName)
		{
			Texture customTexture = Utils.GetCustomTexture(directory, SeasonalityPlugin._Season.Value);
			CachedTextures.TryGetValue(originalMaterialName, out var value);
			return Object.op_Implicit((Object)(object)customTexture) ? customTexture : (Object.op_Implicit((Object)(object)value) ? value : null);
		}

		[return: <4edcec42-b8ad-494f-8522-113afc165eb1>Nullable(2)]
		private static Texture GetCustomTexture(CustomTextures.PieceDirectories directory, string originalMaterialName, bool isWorn = false, bool isCorner = false)
		{
			string text = SeasonalityPlugin._Season.Value.ToString();
			string text2 = SeasonalityPlugin._Season.Value.ToString() + "_worn";
			string text3 = SeasonalityPlugin._Season.Value.ToString() + "_corner";
			string text4 = SeasonalityPlugin._Season.Value.ToString() + "_corner_worn";
			string key = (isWorn ? text2 : text);
			if (isCorner)
			{
				key = (isWorn ? text4 : text3);
			}
			Texture customTexture = Utils.GetCustomTexture(directory, key);
			CachedTextures.TryGetValue(originalMaterialName, out var value);
			return Object.op_Implicit((Object)(object)customTexture) ? customTexture : (Object.op_Implicit((Object)(object)value) ? value : null);
		}

		[return: <4edcec42-b8ad-494f-8522-113afc165eb1>Nullable(2)]
		private static Texture GetCustomTexture(CustomTextures.VegDirectories directory, string originalMaterialName, bool isBark = false)
		{
			Texture customTexture = Utils.GetCustomTexture(directory, isBark ? (SeasonalityPlugin._Season.Value.ToString() + "_bark") : SeasonalityPlugin._Season.Value.ToString());
			CachedTextures.TryGetValue(originalMaterialName, out var value);
			return Object.op_Implicit((Object)(object)customTexture) ? customTexture : (Object.op_Implicit((Object)(object)value) ? value : null);
		}
	}
	public static class ConsoleCommands
	{
		[HarmonyPatch(typeof(Terminal), "InitTerminal")]
		private static class TerminalInitPatch
		{
			[Serializable]
			[CompilerGenerated]
			private sealed class <>c
			{
				public static readonly <>c <>9 = new <>c();

				public static ConsoleEventFailable <>9__0_0;

				public static ConsoleOptionsFetcher <>9__0_1;

				public static ConsoleEventFailable <>9__1_0;

				public static ConsoleOptionsFetcher <>9__1_1;

				public static ConsoleEventFailable <>9__1_2;

				public static ConsoleOptionsFetcher <>9__1_3;

				public static ConsoleEventFailable <>9__1_9;

				public static ConsoleEvent <>9__1_4;

				public static ConsoleEventFailable <>9__1_5;

				public static ConsoleEventFailable <>9__1_6;

				public static ConsoleEventFailable <>9__1_7;

				public static ConsoleEventFailable <>9__1_8;

				internal object <Postfix>b__0_0(ConsoleEventArgs args)
				{
					if (args.Length < 2)
					{
						return false;
					}
					List<string> list = new List<string>();
					foreach (KeyValuePair<string, ConsoleCommand> seasonCommand in SeasonCommands)
					{
						list.Add(seasonCommand.Value.Command + " - " + seasonCommand.Value.Description);
					}
					list.Sort();
					foreach (string item in list)
					{
						SeasonalityPlugin.SeasonalityLogger.LogInfo((object)item);
					}
					return true;
				}

				internal List<string> <Postfix>b__0_1()
				{
					return new List<string> { "help" };
				}

				internal object <ConfigCommands>b__1_0(ConsoleEventArgs args)
				{
					if (args.Length < 2)
					{
						return false;
					}
					SeasonalityPlugin._SeasonControl.Value = SeasonalityPlugin.Toggle.On;
					switch (args[1])
					{
					case "summer":
						SeasonalityPlugin._Season.Value = SeasonalityPlugin.Season.Summer;
						break;
					case "fall":
						SeasonalityPlugin._Season.Value = SeasonalityPlugin.Season.Fall;
						break;
					case "winter":
						SeasonalityPlugin._Season.Value = SeasonalityPlugin.Season.Winter;
						break;
					case "spring":
						SeasonalityPlugin._Season.Value = SeasonalityPlugin.Season.Spring;
						break;
					}
					return true;
				}

				internal List<string> <ConfigCommands>b__1_1()
				{
					return new List<string> { "summer", "fall", "winter", "spring" };
				}

				internal object <ConfigCommands>b__1_2(ConsoleEventArgs args)
				{
					if (args.Length < 2)
					{
						return false;
					}
					string t