Decompiled source of Seasonality v3.2.4

Seasonality.dll

Decompiled 3 weeks 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.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using JetBrains.Annotations;
using Microsoft.CodeAnalysis;
using Seasonality.Configurations;
using Seasonality.DataTypes;
using Seasonality.Managers;
using Seasonality.SeasonStatusEffect;
using Seasonality.SeasonUtility;
using Seasonality.SeasonalityPaths;
using Seasonality.Seasons;
using Seasonality.Textures;
using Seasonality.Weather;
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: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Seasonality")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("Seasonality")]
[assembly: AssemblyCopyright("Copyright ©  2022")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("E0E2F92E-557C-4A05-9D89-AA92A0BD75C4")]
[assembly: AssemblyFileVersion("3.2.4")]
[assembly: AssemblyCompany("RustyMods")]
[assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("3.2.4.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[<1eacfe34-60bb-4aa0-8fa7-fb7511c9bf63>Embedded]
	internal sealed class <1eacfe34-60bb-4aa0-8fa7-fb7511c9bf63>EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	[<1eacfe34-60bb-4aa0-8fa7-fb7511c9bf63>Embedded]
	[CompilerGenerated]
	internal sealed class <3eb1d6d7-4b8b-4268-92fb-9805e090bb08>NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public <3eb1d6d7-4b8b-4268-92fb-9805e090bb08>NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public <3eb1d6d7-4b8b-4268-92fb-9805e090bb08>NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	[<1eacfe34-60bb-4aa0-8fa7-fb7511c9bf63>Embedded]
	[CompilerGenerated]
	internal sealed class <8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public <8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace Seasonality
{
	[<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(1)]
	[<3eb1d6d7-4b8b-4268-92fb-9805e090bb08>Nullable(0)]
	[BepInPlugin("RustyMods.Seasonality", "Seasonality", "3.2.4")]
	public class SeasonalityPlugin : BaseUnityPlugin
	{
		[<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(0)]
		public enum Toggle
		{
			On = 1,
			Off = 0
		}

		[<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(0)]
		public enum WorkingAs
		{
			Client,
			Server,
			Both
		}

		[<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(0)]
		public enum Season
		{
			Spring,
			Summer,
			Fall,
			Winter
		}

		[<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(0)]
		public enum Element
		{
			Fire,
			Frost,
			Lightning,
			Poison,
			Spirit,
			None
		}

		[<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(0)]
		public enum DamageModifier
		{
			Normal,
			Resistant,
			Weak,
			Immune,
			Ignore,
			VeryResistant,
			VeryWeak,
			None
		}

		[<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(0)]
		private class ConfigurationManagerAttributes
		{
			[UsedImplicitly]
			public int? Order = null;

			[UsedImplicitly]
			public bool? Browsable = null;

			[<3eb1d6d7-4b8b-4268-92fb-9805e090bb08>Nullable(2)]
			[UsedImplicitly]
			public string Category = null;

			[<3eb1d6d7-4b8b-4268-92fb-9805e090bb08>Nullable(new byte[] { 2, 1 })]
			[UsedImplicitly]
			public Action<ConfigEntryBase> CustomDrawer = null;
		}

		internal const string ModName = "Seasonality";

		internal const string ModVersion = "3.2.4";

		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<Toggle> _SleepSeasons;

		public static ConfigEntry<string> _SleepTimeText;

		public static ConfigEntry<Toggle> _WinterFreezesWater;

		public static ConfigEntry<Toggle> _YamlConfigurations;

		public static ConfigEntry<Toggle> _CheckCustomBiomes;

		public static ConfigEntry<Biome> _AffectedBiomes;

		public static ConfigEntry<int> _SeasonDurationDays;

		public static ConfigEntry<int> _SeasonDurationHours;

		public static ConfigEntry<int> _SeasonDurationMinutes;

		public static ConfigEntry<int> _FallDurationTweak;

		public static ConfigEntry<int> _WinterDurationTweak;

		public static ConfigEntry<int> _SpringDurationTweak;

		public static ConfigEntry<int> _SummerDurationTweak;

		public static ConfigEntry<int> _WeatherDuration;

		public static ConfigEntry<Toggle> _WeatherIconEnabled;

		public static ConfigEntry<Toggle> _WeatherTimerEnabled;

		public static ConfigEntry<Toggle> _WeatherStartMessage;

		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.Weather.Utils.Environments> _Fall_Meadows_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Meadows_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Meadows_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Meadows_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_BlackForest_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_BlackForest_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_BlackForest_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_BlackForest_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Swamp_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Swamp_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Swamp_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Swamp_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Mountains_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Mountains_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Mountains_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Mountains_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Plains_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Plains_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Plains_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Plains_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_MistLands_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_MistLands_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_MistLands_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_MistLands_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Ocean_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Ocean_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Ocean_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_Ocean_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_AshLands_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_AshLands_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_AshLands_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_AshLands_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_DeepNorth_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_DeepNorth_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_DeepNorth_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Fall_DeepNorth_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Meadows_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Meadows_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Meadows_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Meadows_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_BlackForest_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_BlackForest_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_BlackForest_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_BlackForest_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Swamp_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Swamp_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Swamp_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Swamp_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Mountains_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Mountains_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Mountains_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Mountains_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Plains_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Plains_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Plains_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Plains_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_MistLands_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_MistLands_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_MistLands_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_MistLands_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Ocean_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Ocean_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Ocean_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_Ocean_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_AshLands_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_AshLands_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_AshLands_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_AshLands_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_DeepNorth_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_DeepNorth_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_DeepNorth_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Winter_DeepNorth_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Meadows_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Meadows_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Meadows_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Meadows_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_BlackForest_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_BlackForest_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_BlackForest_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_BlackForest_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Swamp_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Swamp_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Swamp_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Swamp_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Mountains_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Mountains_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Mountains_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Mountains_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Plains_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Plains_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Plains_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Plains_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_MistLands_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_MistLands_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_MistLands_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_MistLands_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Ocean_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Ocean_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Ocean_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_Ocean_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_AshLands_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_AshLands_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_AshLands_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_AshLands_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_DeepNorth_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_DeepNorth_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_DeepNorth_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Spring_DeepNorth_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Meadows_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Meadows_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Meadows_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Meadows_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_BlackForest_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_BlackForest_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_BlackForest_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_BlackForest_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Swamp_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Swamp_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Swamp_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Swamp_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Mountains_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Mountains_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Mountains_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Mountains_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Plains_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Plains_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Plains_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Plains_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_MistLands_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_MistLands_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_MistLands_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_MistLands_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Ocean_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Ocean_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Ocean_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_Ocean_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_AshLands_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_AshLands_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_AshLands_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_AshLands_Weather4;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_DeepNorth_Weather1;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_DeepNorth_Weather2;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_DeepNorth_Weather3;

		public static ConfigEntry<Seasonality.Weather.Utils.Environments> _Summer_DeepNorth_Weather4;

		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> _ReplaceArmorTextures;

		public static ConfigEntry<Toggle> _ReplaceCreatureTextures;

		public static ConfigEntry<double> _LastInGameSavedSeasonChange;

		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);
			TextureManager.ReadCustomTextures();
			YamlConfigurations.InitYamlConfigurations();
			WaterMaterial.InitSnowBundle();
			InitConfigs();
			Localizer.Load();
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			_harmony.PatchAll(executingAssembly);
			SetupWatcher();
		}

		private void FixedUpdate()
		{
			SeasonalEffects.CheckBiomeSeason();
			SeasonalEffects.CheckInGameTimer();
			if (_WinterAlwaysCold.Value == Toggle.On && Object.op_Implicit((Object)(object)Player.m_localPlayer))
			{
				SeasonalEffects.UpdateAlwaysColdEffect(Player.m_localPlayer);
			}
		}

		private void OnSeasonValueChange(object sender, EventArgs e)
		{
			SeasonalEffects.UpdateSeasonEffects();
			EnvMan instance = EnvMan.instance;
			instance.m_environmentPeriod--;
		}

		private void InitConfigs()
		{
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Expected O, but got Unknown
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Expected O, but got Unknown
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Expected O, but got Unknown
			//IL_0355: Unknown result type (might be due to invalid IL or missing references)
			//IL_0360: Expected O, but got Unknown
			//IL_0496: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a1: Expected O, but got Unknown
			//IL_09ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b6: Expected O, but got Unknown
			//IL_0ec0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ecb: Expected O, but got Unknown
			//IL_13e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_13eb: Expected O, but got Unknown
			_LastInGameSavedSeasonChange = config("8 - Data", "Last Season Change In-Game", 0.0, "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");
			_Season.SettingChanged += OnSeasonValueChange;
			_CheckCustomBiomes = config("1 - General", "9 - Check Custom Biomes", Toggle.Off, "If on, plugin checks if player is in a custom biome, if so, then all settings will be set to default");
			_AffectedBiomes = config<Biome>("2 - Utilities", "4 - Affected Biomes", (Biome)(Enum.GetValues(typeof(Biome)).Cast<int>().Sum() & -1), "Set affected biomes");
			_YamlConfigurations = config("1 - General", "5 - Use YML Configurations", Toggle.Off, "If on, plugin uses YML configuration files");
			_ReplaceArmorTextures = config("1 - General", "6 - Replace Armor Textures", Toggle.On, "If on, plugin modifies armor textures");
			_WinterFreezesWater = config("1 - General", "7 - Winter Freezes Water", Toggle.Off, "If on, plugin freezes water during winter");
			_ReplaceCreatureTextures = config("1 - General", "8 - Replace Creature Textures", Toggle.On, "If on, creature skins change with the seasons");
			_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");
			_CounterVisible = config("1 - Seasons", "5 - Timer Visible", Toggle.On, "If on, timer under season is visible");
			_SleepSeasons = config("1 - Seasons", "6 - Sleep Override", Toggle.Off, "If on, seasons only change once game goes to sleep");
			_SleepTimeText = config("1 - Seasons", "7 - Sleep Time Text", "Bed Time", "Set the text to display when season are ready to change");
			_SummerDurationTweak = config("1 - Seasons", "8 - Summer Tweak", 0, "Add or subtract time from the total duration, in minutes");
			_SpringDurationTweak = config("1 - Seasons", "8 - Spring Tweak", 0, "Add or subtract time from the total duration, in minutes");
			_FallDurationTweak = config("1 - Seasons", "8 - Fall Tweak", 0, "Add or subtract time from the total duration, in minutes");
			_WinterDurationTweak = config("1 - Seasons", "8 - Winter Tweak", 0, "Add or subtract time from the total duration, in minutes");
			_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>(1, 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");
			_WeatherStartMessage = config("1 - Weather", "5 - Start Message", Toggle.Off, "If on, weather notifications appear");
			_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.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Meadows_Weather2 = config("3 - Spring Weather", "1 - Meadows 2", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Meadows_Weather3 = config("3 - Spring Weather", "1 - Meadows 3", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Meadows_Weather4 = config("3 - Spring Weather", "1 - Meadows 4", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_BlackForest_Weather1 = config("3 - Spring Weather", "2 - BlackForest 1", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_BlackForest_Weather2 = config("3 - Spring Weather", "2 - BlackForest 2", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_BlackForest_Weather3 = config("3 - Spring Weather", "2 - BlackForest 3", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_BlackForest_Weather4 = config("3 - Spring Weather", "2 - BlackForest 4", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Swamp_Weather1 = config("3 - Spring Weather", "3 - Swamp 1", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Swamp_Weather2 = config("3 - Spring Weather", "3 - Swamp 2", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Swamp_Weather3 = config("3 - Spring Weather", "3 - Swamp 3", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Swamp_Weather4 = config("3 - Spring Weather", "3 - Swamp 4", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Mountains_Weather1 = config("3 - Spring Weather", "4 - Mountains 1", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Mountains_Weather2 = config("3 - Spring Weather", "4 - Mountains 2", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Mountains_Weather3 = config("3 - Spring Weather", "4 - Mountains 3", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Mountains_Weather4 = config("3 - Spring Weather", "4 - Mountains 4", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Plains_Weather1 = config("3 - Spring Weather", "5 - Plains 1", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Plains_Weather2 = config("3 - Spring Weather", "5 - Plains 2", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Plains_Weather3 = config("3 - Spring Weather", "5 - Plains 3", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Plains_Weather4 = config("3 - Spring Weather", "5 - Plains 4", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_MistLands_Weather1 = config("3 - Spring Weather", "6 - MistLands 1", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_MistLands_Weather2 = config("3 - Spring Weather", "6 - MistLands 2", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_MistLands_Weather3 = config("3 - Spring Weather", "6 - MistLands 3", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_MistLands_Weather4 = config("3 - Spring Weather", "6 - MistLands 4", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Ocean_Weather1 = config("3 - Spring Weather", "6 - Ocean 1", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Ocean_Weather2 = config("3 - Spring Weather", "6 - Ocean 2", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Ocean_Weather3 = config("3 - Spring Weather", "6 - Ocean 3", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_Ocean_Weather4 = config("3 - Spring Weather", "6 - Ocean 4", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_AshLands_Weather1 = config("3 - Spring Weather", "7 - AshLands 1", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_AshLands_Weather2 = config("3 - Spring Weather", "7 - AshLands 2", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_AshLands_Weather3 = config("3 - Spring Weather", "7 - AshLands 3", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_AshLands_Weather4 = config("3 - Spring Weather", "7 - AshLands 4", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_DeepNorth_Weather1 = config("3 - Spring Weather", "8 - DeepNorth 1", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_DeepNorth_Weather2 = config("3 - Spring Weather", "8 - DeepNorth 2", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_DeepNorth_Weather3 = config("3 - Spring Weather", "8 - DeepNorth 3", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_Spring_DeepNorth_Weather4 = config("3 - Spring Weather", "8 - DeepNorth 4", Seasonality.Weather.Utils.Environments.None, "Environments set by spring season");
			_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.Weather.Utils.Environments.None, "Environments set by fall season");
			_Fall_Meadows_Weather2 = config("4 - Fall Weather", "1 - Meadows 2", Seasonality.Weather.Utils.Environments.None, "Environments set by fall season");
			_Fall_Meadows_Weather3 = config("4 - Fall Weather", "1 - Meadows 3", Seasonality.Weather.Utils.Environments.None, "Environments set by fall season");
			_Fall_Meadows_Weather4 = config("4 - Fall Weather", "1 - Meadows 4", Seasonality.Weather.Utils.Environments.None, "Environments set by fall season");
			_Fall_BlackForest_Weather1 = config("4 - Fall Weather", "2 - BlackForest 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_BlackForest_Weather2 = config("4 - Fall Weather", "2 - BlackForest 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_BlackForest_Weather3 = config("4 - Fall Weather", "2 - BlackForest 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_BlackForest_Weather4 = config("4 - Fall Weather", "2 - BlackForest 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Swamp_Weather1 = config("4 - Fall Weather", "3 - Swamp 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Swamp_Weather2 = config("4 - Fall Weather", "3 - Swamp 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Swamp_Weather3 = config("4 - Fall Weather", "3 - Swamp 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Swamp_Weather4 = config("4 - Fall Weather", "3 - Swamp 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Mountains_Weather1 = config("4 - Fall Weather", "4 - Mountains 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Mountains_Weather2 = config("4 - Fall Weather", "4 - Mountains 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Mountains_Weather3 = config("4 - Fall Weather", "4 - Mountains 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Mountains_Weather4 = config("4 - Fall Weather", "4 - Mountains 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Plains_Weather1 = config("4 - Fall Weather", "5 - Plains 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Plains_Weather2 = config("4 - Fall Weather", "5 - Plains 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Plains_Weather3 = config("4 - Fall Weather", "5 - Plains 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Plains_Weather4 = config("4 - Fall Weather", "5 - Plains 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_MistLands_Weather1 = config("4 - Fall Weather", "6 - MistLands 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_MistLands_Weather2 = config("4 - Fall Weather", "6 - MistLands 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_MistLands_Weather3 = config("4 - Fall Weather", "6 - MistLands 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_MistLands_Weather4 = config("4 - Fall Weather", "6 - MistLands 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Ocean_Weather1 = config("4 - Fall Weather", "6 - Ocean 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Ocean_Weather2 = config("4 - Fall Weather", "6 - Ocean 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Ocean_Weather3 = config("4 - Fall Weather", "6 - Ocean 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_Ocean_Weather4 = config("4 - Fall Weather", "6 - Ocean 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_AshLands_Weather1 = config("4 - Fall Weather", "7 - AshLands 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_AshLands_Weather2 = config("4 - Fall Weather", "7 - AshLands 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_AshLands_Weather3 = config("4 - Fall Weather", "7 - AshLands 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_AshLands_Weather4 = config("4 - Fall Weather", "7 - AshLands 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_DeepNorth_Weather1 = config("4 - Fall Weather", "8 - DeepNorth 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_DeepNorth_Weather2 = config("4 - Fall Weather", "8 - DeepNorth 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_DeepNorth_Weather3 = config("4 - Fall Weather", "8 - DeepNorth 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_Fall_DeepNorth_Weather4 = config("4 - Fall Weather", "8 - DeepNorth 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Fall season");
			_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.None, "Stats modifier");
			_WinterResistanceElement = config("5 - Winter", "Resistance Type", Element.None, "Element");
			_WinterResistantMod = config("5 - Winter", "Resistance Modifier", DamageModifier.Normal, "Modifier");
			_WinterValue = config("5 - Winter", "Modifying value", 0f, 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.Weather.Utils.Environments.WarmSnow, "Environment set by winter season.");
			_Winter_Meadows_Weather2 = config("5 - Winter Weather", "1 - Meadows 2", Seasonality.Weather.Utils.Environments.None, "Environment set by winter season.");
			_Winter_Meadows_Weather3 = config("5 - Winter Weather", "1 - Meadows 3", Seasonality.Weather.Utils.Environments.None, "Environment set by winter season.");
			_Winter_Meadows_Weather4 = config("5 - Winter Weather", "1 - Meadows 4", Seasonality.Weather.Utils.Environments.None, "Environment set by winter season.");
			_Winter_BlackForest_Weather1 = config("5 - Winter Weather", "2 - BlackForest 1", Seasonality.Weather.Utils.Environments.WarmSnow, "Environments set by Winter season");
			_Winter_BlackForest_Weather2 = config("5 - Winter Weather", "2 - BlackForest 2", Seasonality.Weather.Utils.Environments.ClearWarmSnow, "Environments set by Winter season");
			_Winter_BlackForest_Weather3 = config("5 - Winter Weather", "2 - BlackForest 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_BlackForest_Weather4 = config("5 - Winter Weather", "2 - BlackForest 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_Swamp_Weather1 = config("5 - Winter Weather", "3 - Swamp 1", Seasonality.Weather.Utils.Environments.WarmSnow, "Environments set by Winter season");
			_Winter_Swamp_Weather2 = config("5 - Winter Weather", "3 - Swamp 2", Seasonality.Weather.Utils.Environments.ClearWarmSnow, "Environments set by Winter season");
			_Winter_Swamp_Weather3 = config("5 - Winter Weather", "3 - Swamp 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_Swamp_Weather4 = config("5 - Winter Weather", "3 - Swamp 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_Mountains_Weather1 = config("5 - Winter Weather", "4 - Mountains 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_Mountains_Weather2 = config("5 - Winter Weather", "4 - Mountains 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_Mountains_Weather3 = config("5 - Winter Weather", "4 - Mountains 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_Mountains_Weather4 = config("5 - Winter Weather", "4 - Mountains 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_Plains_Weather1 = config("5 - Winter Weather", "5 - Plains 1", Seasonality.Weather.Utils.Environments.WarmSnow, "Environments set by Winter season");
			_Winter_Plains_Weather2 = config("5 - Winter Weather", "5 - Plains 2", Seasonality.Weather.Utils.Environments.ClearWarmSnow, "Environments set by Winter season");
			_Winter_Plains_Weather3 = config("5 - Winter Weather", "5 - Plains 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_Plains_Weather4 = config("5 - Winter Weather", "5 - Plains 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_MistLands_Weather1 = config("5 - Winter Weather", "6 - MistLands 1", Seasonality.Weather.Utils.Environments.WarmSnow, "Environments set by Winter season");
			_Winter_MistLands_Weather2 = config("5 - Winter Weather", "6 - MistLands 2", Seasonality.Weather.Utils.Environments.ClearWarmSnow, "Environments set by Winter season");
			_Winter_MistLands_Weather3 = config("5 - Winter Weather", "6 - MistLands 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_MistLands_Weather4 = config("5 - Winter Weather", "6 - MistLands 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_Ocean_Weather1 = config("5 - Winter Weather", "6 - Ocean 1", Seasonality.Weather.Utils.Environments.WarmSnow, "Environments set by Winter season");
			_Winter_Ocean_Weather2 = config("5 - Winter Weather", "6 - Ocean 2", Seasonality.Weather.Utils.Environments.ClearWarmSnow, "Environments set by Winter season");
			_Winter_Ocean_Weather3 = config("5 - Winter Weather", "6 - Ocean 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_Ocean_Weather4 = config("5 - Winter Weather", "6 - Ocean 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_AshLands_Weather1 = config("5 - Winter Weather", "7 - AshLands 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_AshLands_Weather2 = config("5 - Winter Weather", "7 - AshLands 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_AshLands_Weather3 = config("5 - Winter Weather", "7 - AshLands 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_AshLands_Weather4 = config("5 - Winter Weather", "7 - AshLands 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_DeepNorth_Weather1 = config("5 - Winter Weather", "8 - DeepNorth 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_DeepNorth_Weather2 = config("5 - Winter Weather", "8 - DeepNorth 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_DeepNorth_Weather3 = config("5 - Winter Weather", "8 - DeepNorth 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_Winter_DeepNorth_Weather4 = config("5 - Winter Weather", "8 - DeepNorth 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Winter season");
			_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.None, "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", 0f, 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.Weather.Utils.Environments.None, "Environment set by summer season.");
			_Summer_Meadows_Weather2 = config("6 - Summer Weather", "1 - Meadows 2", Seasonality.Weather.Utils.Environments.None, "Environment set by summer season.");
			_Summer_Meadows_Weather3 = config("6 - Summer Weather", "1 - Meadows 3", Seasonality.Weather.Utils.Environments.None, "Environment set by summer season.");
			_Summer_Meadows_Weather4 = config("6 - Summer Weather", "1 - Meadows 4", Seasonality.Weather.Utils.Environments.None, "Environment set by summer season.");
			_Summer_BlackForest_Weather1 = config("6 - Summer Weather", "2 - BlackForest 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_BlackForest_Weather2 = config("6 - Summer Weather", "2 - BlackForest 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_BlackForest_Weather3 = config("6 - Summer Weather", "2 - BlackForest 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_BlackForest_Weather4 = config("6 - Summer Weather", "2 - BlackForest 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Swamp_Weather1 = config("6 - Summer Weather", "3 - Swamp 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Swamp_Weather2 = config("6 - Summer Weather", "3 - Swamp 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Swamp_Weather3 = config("6 - Summer Weather", "3 - Swamp 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Swamp_Weather4 = config("6 - Summer Weather", "3 - Swamp 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Mountains_Weather1 = config("6 - Summer Weather", "6 - Mountains 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Mountains_Weather2 = config("6 - Summer Weather", "6 - Mountains 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Mountains_Weather3 = config("6 - Summer Weather", "6 - Mountains 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Mountains_Weather4 = config("6 - Summer Weather", "6 - Mountains 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Plains_Weather1 = config("6 - Summer Weather", "5 - Plains 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Plains_Weather2 = config("6 - Summer Weather", "5 - Plains 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Plains_Weather3 = config("6 - Summer Weather", "5 - Plains 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Plains_Weather4 = config("6 - Summer Weather", "5 - Plains 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_MistLands_Weather1 = config("6 - Summer Weather", "6 - MistLands 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_MistLands_Weather2 = config("6 - Summer Weather", "6 - MistLands 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_MistLands_Weather3 = config("6 - Summer Weather", "6 - MistLands 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_MistLands_Weather4 = config("6 - Summer Weather", "6 - MistLands 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Ocean_Weather1 = config("6 - Summer Weather", "6 - Ocean 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Ocean_Weather2 = config("6 - Summer Weather", "6 - Ocean 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Ocean_Weather3 = config("6 - Summer Weather", "6 - Ocean 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_Ocean_Weather4 = config("6 - Summer Weather", "6 - Ocean 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_AshLands_Weather1 = config("6 - Summer Weather", "7 - AshLands 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_AshLands_Weather2 = config("6 - Summer Weather", "7 - AshLands 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_AshLands_Weather3 = config("6 - Summer Weather", "7 - AshLands 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_AshLands_Weather4 = config("6 - Summer Weather", "7 - AshLands 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_DeepNorth_Weather1 = config("6 - Summer Weather", "8 - DeepNorth 1", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_DeepNorth_Weather2 = config("6 - Summer Weather", "8 - DeepNorth 2", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_DeepNorth_Weather3 = config("6 - Summer Weather", "8 - DeepNorth 3", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_Summer_DeepNorth_Weather4 = config("6 - Summer Weather", "8 - DeepNorth 4", Seasonality.Weather.Utils.Environments.None, "Environments set by Summer season");
			_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<[<3eb1d6d7-4b8b-4268-92fb-9805e090bb08>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<[<3eb1d6d7-4b8b-4268-92fb-9805e090bb08>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.2.4",
				MinimumRequiredVersion = "3.2.4"
			};
			_Season = null;
			_SleepSeasons = null;
			_SleepTimeText = null;
			_WinterFreezesWater = null;
			_YamlConfigurations = null;
			_CheckCustomBiomes = null;
			_AffectedBiomes = null;
			_SeasonDurationDays = null;
			_SeasonDurationHours = null;
			_SeasonDurationMinutes = null;
			_FallDurationTweak = null;
			_WinterDurationTweak = null;
			_SpringDurationTweak = null;
			_SummerDurationTweak = null;
			_WeatherDuration = null;
			_WeatherIconEnabled = null;
			_WeatherTimerEnabled = null;
			_WeatherStartMessage = 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;
			_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;
			_ReplaceArmorTextures = null;
			_ReplaceCreatureTextures = null;
			_LastInGameSavedSeasonChange = null;
			_serverConfigLocked = null;
		}
	}
	public static class BiomeFlags
	{
		public static bool HasFlagFast(this Biome value, Biome flag)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Invalid comparison between Unknown and I4
			return (value & flag) > 0;
		}
	}
	[HarmonyPatch(typeof(ZNet), "OnNewConnection")]
	public static class RegisterAndCheckVersion
	{
		[<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>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.2.4");
			val.Write(RpcHandlers.ComputeHashForMod().Replace("-", ""));
			peer.m_rpc.Invoke("Seasonality_VersionCheck", new object[1] { val });
		}
	}
	[<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(1)]
	[<3eb1d6d7-4b8b-4268-92fb-9805e090bb08>Nullable(0)]
	[HarmonyPatch(typeof(ZNet), "RPC_PeerInfo")]
	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
	{
		[<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>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
	{
		[<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>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);
			}
		}
	}
	[<3eb1d6d7-4b8b-4268-92fb-9805e090bb08>Nullable(0)]
	[<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>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.2.4,  remote: " + text));
			if (text2 != text3 || text != "3.2.4")
			{
				SeasonalityPlugin.ConnectionError = "Seasonality Installed: 3.2.4 " + 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.Weather
{
	[<3eb1d6d7-4b8b-4268-92fb-9805e090bb08>Nullable(0)]
	[<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(1)]
	public static class Environment
	{
		[Serializable]
		[<3eb1d6d7-4b8b-4268-92fb-9805e090bb08>Nullable(0)]
		public class WeatherSetup
		{
			public string m_name = "";

			public bool m_default;

			public bool m_isWet;

			public bool m_isFreezing;

			public bool m_isFreezingAtNight;

			public bool m_isCold;

			public bool m_isColdAtNight = true;

			public bool m_alwaysDark;

			public string m_ambColorNight;

			public string m_ambColorDay;

			public string m_fogColorNight;

			public string m_fogColorMorning;

			public string m_fogColorDay;

			public string m_fogColorEvening;

			public string m_fogColorSunNight;

			public string m_fogColorSunMorning;

			public string m_fogColorSunDay;

			public string m_fogColorSunEvening;

			public float m_fogDensityNight;

			public float m_fogDensityMorning;

			public float m_fogDensityDay;

			public float m_fogDensityEvening;

			public string m_sunColorNight;

			public string m_sunColorMorning;

			public string m_sunColorDay;

			public string m_sunColorEvening;

			public float m_lightIntensityDay;

			public float m_lightIntensityNight;

			public float m_sunAngle;

			public float m_windMin;

			public float m_windMax;

			public bool m_psystemsOutsideOnly;

			public float m_rainCloudAlpha;

			public string m_ambientLoop;

			public float m_ambientVol;

			public string m_ambientList;

			public string m_musicMorning;

			public string m_musicEvening;

			public string m_musicDay;

			public string m_musicNight;

			public WeatherSetup()
			{
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Unknown result type (might be due to invalid IL or missing references)
				//IL_0045: Unknown result type (might be due to invalid IL or missing references)
				//IL_004a: Unknown result type (might be due to invalid IL or missing references)
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0063: Unknown result type (might be due to invalid IL or missing references)
				//IL_0077: Unknown result type (might be due to invalid IL or missing references)
				//IL_007c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0090: Unknown result type (might be due to invalid IL or missing references)
				//IL_0095: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00db: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
				//IL_0139: Unknown result type (might be due to invalid IL or missing references)
				//IL_013e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0152: Unknown result type (might be due to invalid IL or missing references)
				//IL_0157: Unknown result type (might be due to invalid IL or missing references)
				//IL_016b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0170: Unknown result type (might be due to invalid IL or missing references)
				//IL_0184: Unknown result type (might be due to invalid IL or missing references)
				//IL_0189: Unknown result type (might be due to invalid IL or missing references)
				Color white = Color.white;
				m_ambColorNight = ((object)(Color)(ref white)).ToString();
				white = Color.white;
				m_ambColorDay = ((object)(Color)(ref white)).ToString();
				white = Color.white;
				m_fogColorNight = ((object)(Color)(ref white)).ToString();
				white = Color.white;
				m_fogColorMorning = ((object)(Color)(ref white)).ToString();
				white = Color.white;
				m_fogColorDay = ((object)(Color)(ref white)).ToString();
				white = Color.white;
				m_fogColorEvening = ((object)(Color)(ref white)).ToString();
				white = Color.white;
				m_fogColorSunNight = ((object)(Color)(ref white)).ToString();
				white = Color.white;
				m_fogColorSunMorning = ((object)(Color)(ref white)).ToString();
				white = Color.white;
				m_fogColorSunDay = ((object)(Color)(ref white)).ToString();
				white = Color.white;
				m_fogColorSunEvening = ((object)(Color)(ref white)).ToString();
				m_fogDensityNight = 0.01f;
				m_fogDensityMorning = 0.01f;
				m_fogDensityDay = 0.01f;
				m_fogDensityEvening = 0.01f;
				white = Color.white;
				m_sunColorNight = ((object)(Color)(ref white)).ToString();
				white = Color.white;
				m_sunColorMorning = ((object)(Color)(ref white)).ToString();
				white = Color.white;
				m_sunColorDay = ((object)(Color)(ref white)).ToString();
				white = Color.white;
				m_sunColorEvening = ((object)(Color)(ref white)).ToString();
				m_lightIntensityDay = 1.2f;
				m_sunAngle = 60f;
				m_windMax = 1f;
				m_ambientLoop = "SW008_Wendland_Autumn_Wind_In_Reeds_Medium_Distance_Leaves_Only";
				m_ambientVol = 0.3f;
				m_ambientList = "";
				m_musicMorning = "";
				m_musicEvening = "";
				m_musicDay = "";
				m_musicNight = "";
				base..ctor();
			}
		}

		[<3eb1d6d7-4b8b-4268-92fb-9805e090bb08>Nullable(0)]
		[HarmonyPatch(typeof(EnvMan), "Awake")]
		private static class EnvManAwakePatch
		{
			private static void Postfix(EnvMan __instance)
			{
				if (!Object.op_Implicit((Object)(object)__instance))
				{
					return;
				}
				EnvSetup val = CloneEnvSetup(__instance, "Snow", "WarmSnow");
				val.m_isFreezing = false;
				val.m_isFreezingAtNight = false;
				val.m_isCold = true;
				val.m_isColdAtNight = true;
				val.m_lightIntensityDay = 0.6f;
				EnvSetup val2 = CloneEnvSetup(__instance, "Snow", "ClearWarmSnow");
				val2.m_isFreezing = false;
				val2.m_isFreezingAtNight = false;
				val2.m_isCold = true;
				val2.m_isColdAtNight = true;
				val2.m_fogDensityMorning = 0f;
				val2.m_fogDensityDay = 0f;
				val2.m_fogDensityEvening = 0f;
				val2.m_fogDensityNight = 0f;
				val2.m_lightIntensityDay = 0.6f;
				EnvSetup val3 = CloneEnvSetup(__instance, "Snow", "NightFrost");
				val3.m_isFreezing = false;
				val3.m_isFreezingAtNight = true;
				val3.m_isCold = true;
				val3.m_isColdAtNight = false;
				val3.m_fogDensityMorning = 0f;
				val3.m_fogDensityDay = 0f;
				val3.m_fogDensityEvening = 0f;
				val3.m_fogDensityNight = 0f;
				val3.m_lightIntensityDay = 0.6f;
				EnvSetup val4 = CloneEnvSetup(__instance, "Clear", "WinterClear");
				val4.m_lightIntensityDay = 0.6f;
				__instance.m_environments.Add(val3);
				__instance.m_environments.Add(val2);
				__instance.m_environments.Add(val);
				__instance.m_environments.Add(val4);
				EnvSetup val5 = __instance.m_environments.Find([<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(0)] (EnvSetup x) => x.m_name == "Snow");
				foreach (EnvSetup setup in ReadWeatherSetup())
				{
					if (!__instance.m_environments.Exists([<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(0)] (EnvSetup x) => x.m_name == setup.m_name))
					{
						setup.m_psystems = val5.m_psystems;
						setup.m_envObject = val5.m_envObject;
						__instance.m_environments.Add(setup);
					}
				}
				WriteWeatherSetup(__instance);
			}

			private static void WriteWeatherSetup(EnvMan __instance)
			{
				ISerializer serializer = new SerializerBuilder().Build();
				string[] obj = new string[5]
				{
					Paths.ConfigPath,
					null,
					null,
					null,
					null
				};
				char directorySeparatorChar = Path.DirectorySeparatorChar;
				obj[1] = directorySeparatorChar.ToString();
				obj[2] = "Seasonality";
				directorySeparatorChar = Path.DirectorySeparatorChar;
				obj[3] = directorySeparatorChar.ToString();
				obj[4] = "Environments";
				string text = string.Concat(obj);
				if (!Directory.Exists(text))
				{
					Directory.CreateDirectory(text);
				}
				directorySeparatorChar = Path.DirectorySeparatorChar;
				string text2 = text + directorySeparatorChar + "Examples";
				if (!Directory.Exists(text2))
				{
					Directory.CreateDirectory(text2);
				}
				foreach (EnvSetup environment in __instance.m_environments)
				{
					try
					{
						WeatherSetup weatherSetup = new WeatherSetup
						{
							m_name = environment.m_name,
							m_default = environment.m_default,
							m_isWet = environment.m_isWet,
							m_isFreezing = environment.m_isFreezing,
							m_isFreezingAtNight = environment.m_isFreezingAtNight,
							m_isCold = environment.m_isCold,
							m_isColdAtNight = environment.m_isColdAtNight,
							m_alwaysDark = environment.m_alwaysDark,
							m_ambColorNight = ((object)(Color)(ref environment.m_ambColorNight)).ToString(),
							m_ambColorDay = ((object)(Color)(ref environment.m_ambColorDay)).ToString(),
							m_fogColorNight = ((object)(Color)(ref environment.m_fogColorNight)).ToString(),
							m_fogColorMorning = ((object)(Color)(ref environment.m_fogColorMorning)).ToString(),
							m_fogColorDay = ((object)(Color)(ref environment.m_fogColorDay)).ToString(),
							m_fogColorEvening = ((object)(Color)(ref environment.m_fogColorEvening)).ToString(),
							m_fogColorSunEvening = ((object)(Color)(ref environment.m_fogColorSunEvening)).ToString(),
							m_fogDensityNight = environment.m_fogDensityNight,
							m_fogDensityMorning = environment.m_fogDensityMorning,
							m_fogDensityDay = environment.m_fogDensityDay,
							m_fogDensityEvening = environment.m_fogDensityEvening,
							m_sunColorNight = ((object)(Color)(ref environment.m_sunColorNight)).ToString(),
							m_sunColorMorning = ((object)(Color)(ref environment.m_sunColorMorning)).ToString(),
							m_sunColorDay = ((object)(Color)(ref environment.m_sunColorDay)).ToString(),
							m_sunColorEvening = ((object)(Color)(ref environment.m_sunColorEvening)).ToString(),
							m_lightIntensityDay = environment.m_lightIntensityDay,
							m_lightIntensityNight = environment.m_lightIntensityNight,
							m_sunAngle = environment.m_sunAngle,
							m_windMin = environment.m_windMin,
							m_windMax = environment.m_windMax,
							m_psystemsOutsideOnly = environment.m_psystemsOutsideOnly,
							m_rainCloudAlpha = environment.m_rainCloudAlpha,
							m_ambientLoop = ((Object)environment.m_ambientLoop).name,
							m_ambientVol = environment.m_ambientVol,
							m_ambientList = environment.m_ambientList,
							m_musicMorning = environment.m_musicMorning,
							m_musicEvening = environment.m_musicEvening,
							m_musicDay = environment.m_musicDay,
							m_musicNight = environment.m_musicNight
						};
						string contents = serializer.Serialize(weatherSetup);
						directorySeparatorChar = Path.DirectorySeparatorChar;
						File.WriteAllText(text2 + directorySeparatorChar + weatherSetup.m_name + ".yml", contents);
					}
					catch (NullReferenceException)
					{
					}
				}
			}

			private static EnvSetup CloneEnvSetup(EnvMan __instance, string originalName, string newName)
			{
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_004a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0056: Unknown result type (might be due to invalid IL or missing references)
				//IL_0062: Unknown result type (might be due to invalid IL or missing references)
				//IL_006e: Unknown result type (might be due to invalid IL or missing references)
				//IL_007a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0086: Unknown result type (might be due to invalid IL or missing references)
				//IL_0088: Unknown result type (might be due to invalid IL or missing references)
				//IL_008d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0092: Unknown result type (might be due to invalid IL or missing references)
				//IL_0094: Unknown result type (might be due to invalid IL or missing references)
				//IL_0099: Unknown result type (might be due to invalid IL or missing references)
				//IL_009e: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00da: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
				//IL_0100: Unknown result type (might be due to invalid IL or missing references)
				//IL_0105: Unknown result type (might be due to invalid IL or missing references)
				//IL_010a: Unknown result type (might be due to invalid IL or missing references)
				//IL_010c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0111: Unknown result type (might be due to invalid IL or missing references)
				//IL_0116: Unknown result type (might be due to invalid IL or missing references)
				//IL_0118: Unknown result type (might be due to invalid IL or missing references)
				//IL_011d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0122: Unknown result type (might be due to invalid IL or missing references)
				//IL_0124: Unknown result type (might be due to invalid IL or missing references)
				//IL_0129: Unknown result type (might be due to invalid IL or missing references)
				//IL_012e: Unknown result type (might be due to invalid IL or missing references)
				//IL_013a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0146: Unknown result type (might be due to invalid IL or missing references)
				//IL_0152: Unknown result type (might be due to invalid IL or missing references)
				//IL_015e: Unknown result type (might be due to invalid IL or missing references)
				//IL_016a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0176: Unknown result type (might be due to invalid IL or missing references)
				//IL_0182: Unknown result type (might be due to invalid IL or missing references)
				//IL_018e: Unknown result type (might be due to invalid IL or missing references)
				//IL_019a: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
				//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_01be: Unknown result type (might be due to invalid IL or missing references)
				//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
				//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
				//IL_01e3: Expected O, but got Unknown
				EnvSetup val = __instance.m_environments.Find([<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(0)] (EnvSetup x) => x.m_name == originalName);
				return new EnvSetup
				{
					m_name = newName,
					m_default = val.m_default,
					m_isWet = val.m_isWet,
					m_isFreezing = val.m_isFreezing,
					m_isFreezingAtNight = val.m_isFreezingAtNight,
					m_isCold = val.m_isCold,
					m_isColdAtNight = val.m_isColdAtNight,
					m_alwaysDark = val.m_alwaysDark,
					m_ambColorNight = val.m_ambColorNight,
					m_ambColorDay = val.m_ambColorDay,
					m_fogColorNight = val.m_fogColorNight,
					m_fogColorMorning = val.m_fogColorMorning,
					m_fogColorEvening = val.m_fogColorEvening,
					m_fogColorSunNight = val.m_fogColorSunNight,
					m_fogColorSunMorning = val.m_fogColorSunMorning,
					m_fogDensityNight = val.m_fogDensityNight,
					m_fogDensityMorning = val.m_fogDensityMorning,
					m_fogDensityEvening = val.m_fogDensityEvening,
					m_sunColorNight = val.m_sunColorNight,
					m_sunColorMorning = val.m_fogColorSunMorning,
					m_sunColorDay = val.m_sunColorDay,
					m_sunColorEvening = val.m_sunColorEvening,
					m_lightIntensityDay = val.m_lightIntensityDay,
					m_sunAngle = val.m_sunAngle,
					m_windMin = val.m_windMin,
					m_windMax = val.m_windMax,
					m_envObject = val.m_envObject,
					m_psystems = val.m_psystems,
					m_psystemsOutsideOnly = val.m_psystemsOutsideOnly,
					m_rainCloudAlpha = val.m_rainCloudAlpha,
					m_ambientLoop = val.m_ambientLoop,
					m_ambientVol = val.m_ambientVol,
					m_ambientList = val.m_ambientList,
					m_musicMorning = val.m_musicMorning,
					m_musicEvening = val.m_musicEvening,
					m_musicDay = val.m_musicDay,
					m_musicNight = val.m_musicNight
				};
			}
		}

		private static readonly CustomSyncedValue<List<string>> SyncedCustomEnvironments = new CustomSyncedValue<List<string>>(SeasonalityPlugin.ConfigSync, "ServerEnvironments", new List<string>());

		public static void RegisterServerEnvironments(EnvMan __instance)
		{
			EnvSetup val = __instance.m_environments.Find([<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(0)] (EnvSetup x) => x.m_name == "Snow");
			foreach (EnvSetup setup in GetServerEnvironmentSetup())
			{
				if (!__instance.m_environments.Exists([<8e43b775-877a-4470-9cd2-5b0bf92ab9b6>NullableContext(0)] (EnvSetup x) => x.m_name == setup.m_name))
				{
					setup.m_psystems = val.m_psystems;
					setup.m_envObject = val.m_envObject;
					__instance.m_environments.Add(setup);
				}
			}
		}

		private static List<EnvSetup> GetServerEnvironmentSetup()
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_0251: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			//IL_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0278: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: Unknown result type (might be due to invalid IL or missing references)
			//IL_0294: Expected O, but got Unknown
			IDeserializer deserializer = new DeserializerBuilder().Build();
			List<EnvSetup> list = new List<EnvSetup>();
			foreach (string item2 in SyncedCustomEnvironments.Value)
			{
				WeatherSetup weatherSetup = deserializer.Deserialize<WeatherSetup>(item2);
				EnvSetup item = new EnvSetup
				{
					m_name = weatherSetup.m_name,
					m_default = weatherSetup.m_default,
					m_isWet = weatherSetup.m_isWet,
					m_isFreezing = weatherSetup.m_isFreezing,
					m_isFreezingAtNight = weatherSetup.m_isFreezingAtNight,
					m_isCold = weatherSetup.m_isCold,
					m_isColdAtNight = weatherSetup.m_isColdAtNight,
					m_alwaysDark = weatherSetup.m_alwaysDark,
					m_ambColorNight = Utils.GetColorFromString(weatherSetup.m_ambColorNight),
					m_ambColorDay = Utils.GetColorFromString(weatherSetup.m_ambColorDay),
					m_fogColorNight = Utils.GetColorFromString(weatherSetup.m_fogColorNight),
					m_fogColorMorning = Utils.GetColorFromString(weatherSetup.m_fogColorMorning),
					m_fogColorDay = Utils.GetColorFromString(weatherSetup.m_fogColorDay),
					m_fogColorEvening = Utils.GetColorFromString(weatherSetup.m_fogColorEvening),
					m_fogColorSunNight = Utils.GetColorFromString(weatherSetup.m_fogColorSunNight),
					m_fogColorSunMorning = Utils.GetColorFromString(weatherSetup.m_fogColorSunMorning),
					m_fogColorSunDay = Utils.GetColorFromString(weatherSetup.m_fogColorSunDay),
					m_fogColorSunEvening = Utils.GetColorFromString(weatherSetup.m_fogColorSunEvening),
					m_fogDensityNight = weatherSetup.m_fogDensityNight,
					m_fogDensityMorning = weatherSetup.m_fogDensityMorning,
					m_fogDensityDay = weatherSetup.m_fogDensityDay,
					m_fogDensityEvening = weatherSetup.m_fogDensityEvening,
					m_sunColorNight = Utils.GetColorFromString(weatherSetup.m_sunColorNight),
					m_sunColorMorning = Utils.GetColorFromString(weatherSetup.m_sunColorMorning),
					m_sunColorDay = Utils.GetColorFromString(weatherSetup.m_sunColorDay),
					m_sunColorEvening = Utils.GetColorFromString(weatherSetup.m_sunColorEvening),
					m_lightIntensityDay = weatherSetup.m_lightIntensityDay,
					m_lightIntensityNight = weatherSetup.m_lightIntensityNight,
					m_sunAngle = weatherSetup.m_sunAngle,
					m_windMin = weatherSetup.m_windMin,
					m_windMax = weatherSetup.m_windMax,
					m_psystemsOutsideOnly = weatherSetup.m_psystemsOutsideOnly,
					m_rainCloudAlpha = weatherSetup.m_rainCloudAlpha,
					m_ambientLoop = Resources.Load<AudioClip>(weatherSetup.m_ambientLoop),
					m_ambientVol = weatherSetup.m_ambientVol,
					m_ambientList = weatherSetup.m_ambientList,
					m_musicMorning = weatherSetup.m_musicMorning,
					m_musicEvening = weatherSetup.m_musicEvening,
					m_musicDay = weatherSetup.m_musicDay,
					m_musicNight = weatherSetup.m_musicNight
				};
				list.Add(item);
			}
			return list;
		}

		private static List<EnvSetup> ReadWeatherSetup()
		{
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing refe