Decompiled source of HigherDifficulty v0.0.3

HigherDifficulty.dll

Decompiled 8 months ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using CG.Client.Quests;
using CG.Game.SpaceObjects.Controllers;
using Gameplay.MissionDifficulty;
using Gameplay.Utilities;
using HarmonyLib;
using MavsLibCore;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using ResourceAssets;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Mav's Work")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyDescription("Increases the difficulty multipliers in game to make your runs more challenging.")]
[assembly: AssemblyFileVersion("0.0.3.0")]
[assembly: AssemblyInformationalVersion("0.0.3+472344fbadfa994d5cbc10868102abf22d9a3076")]
[assembly: AssemblyProduct("Void Crew - Higher Difficulty")]
[assembly: AssemblyTitle("Higher Difficulty")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/Maverik/VoidCrewMods/tree/main/HigherDifficulty")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.3.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace System.Runtime.Versioning
{
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class RequiresPreviewFeaturesAttribute : Attribute
	{
		public string? Message { get; }

		public string? Url { get; set; }

		public RequiresPreviewFeaturesAttribute()
		{
		}

		public RequiresPreviewFeaturesAttribute(string? message)
		{
			Message = message;
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class CallerArgumentExpressionAttribute : Attribute
	{
		public string ParameterName { get; }

		public CallerArgumentExpressionAttribute(string parameterName)
		{
			ParameterName = parameterName;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class CollectionBuilderAttribute : Attribute
	{
		public Type BuilderType { get; }

		public string MethodName { get; }

		public CollectionBuilderAttribute(Type builderType, string methodName)
		{
			BuilderType = builderType;
			MethodName = methodName;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class CompilerFeatureRequiredAttribute : Attribute
	{
		public const string RefStructs = "RefStructs";

		public const string RequiredMembers = "RequiredMembers";

		public string FeatureName { get; }

		public bool IsOptional { get; set; }

		public CompilerFeatureRequiredAttribute(string featureName)
		{
			FeatureName = featureName;
		}
	}
	[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class InterpolatedStringHandlerArgumentAttribute : Attribute
	{
		public string[] Arguments { get; }

		public InterpolatedStringHandlerArgumentAttribute(string argument)
		{
			Arguments = new string[1] { argument };
		}

		public InterpolatedStringHandlerArgumentAttribute(params string[] arguments)
		{
			Arguments = arguments;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class InterpolatedStringHandlerAttribute : Attribute
	{
	}
	[EditorBrowsable(EditorBrowsableState.Never)]
	[ExcludeFromCodeCoverage]
	internal static class IsExternalInit
	{
	}
	[AttributeUsage(AttributeTargets.Method, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ModuleInitializerAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class RequiredMemberAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	[ExcludeFromCodeCoverage]
	internal sealed class RequiresLocationAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Interface, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class SkipLocalsInitAttribute : Attribute
	{
	}
}
namespace System.Diagnostics.CodeAnalysis
{
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ExperimentalAttribute : Attribute
	{
		public string DiagnosticId { get; }

		public string? UrlFormat { get; set; }

		public ExperimentalAttribute(string diagnosticId)
		{
			DiagnosticId = diagnosticId;
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
	[ExcludeFromCodeCoverage]
	internal sealed class MemberNotNullAttribute : Attribute
	{
		public string[] Members { get; }

		public MemberNotNullAttribute(string member)
		{
			Members = new string[1] { member };
		}

		public MemberNotNullAttribute(params string[] members)
		{
			Members = members;
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
	[ExcludeFromCodeCoverage]
	internal sealed class MemberNotNullWhenAttribute : Attribute
	{
		public bool ReturnValue { get; }

		public string[] Members { get; }

		public MemberNotNullWhenAttribute(bool returnValue, string member)
		{
			ReturnValue = returnValue;
			Members = new string[1] { member };
		}

		public MemberNotNullWhenAttribute(bool returnValue, params string[] members)
		{
			ReturnValue = returnValue;
			Members = members;
		}
	}
	[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class SetsRequiredMembersAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class StringSyntaxAttribute : Attribute
	{
		public const string CompositeFormat = "CompositeFormat";

		public const string DateOnlyFormat = "DateOnlyFormat";

		public const string DateTimeFormat = "DateTimeFormat";

		public const string EnumFormat = "EnumFormat";

		public const string GuidFormat = "GuidFormat";

		public const string Json = "Json";

		public const string NumericFormat = "NumericFormat";

		public const string Regex = "Regex";

		public const string TimeOnlyFormat = "TimeOnlyFormat";

		public const string TimeSpanFormat = "TimeSpanFormat";

		public const string Uri = "Uri";

		public const string Xml = "Xml";

		public string Syntax { get; }

		public object?[] Arguments { get; }

		public StringSyntaxAttribute(string syntax)
		{
			Syntax = syntax;
			Arguments = new object[0];
		}

		public StringSyntaxAttribute(string syntax, params object?[] arguments)
		{
			Syntax = syntax;
			Arguments = arguments;
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class UnscopedRefAttribute : Attribute
	{
	}
}
namespace HigherDifficulty
{
	[BepInPlugin("Maverik-HigherDifficulty", "Higher Difficulty", "0.0.3")]
	[DisallowMultipleComponent]
	internal sealed class HigherDifficulty : MavsBepInExPlugin<HigherDifficulty, PluginConfiguration>
	{
		public override string DisplayName => "Higher Difficulty";

		public override Version Version => PluginInfo.Version;

		public override string Id => "Maverik-HigherDifficulty";

		[HarmonyPrefix]
		[HarmonyPatch(typeof(SwarmController), "Start")]
		private static void SwarmControllerStartPrefix(SwarmController __instance)
		{
			SwarmController __instance2 = __instance;
			if (PhotonNetwork.IsMasterClient)
			{
				MavsBepInExPlugin<HigherDifficulty>.LoggedExceptions((Action)delegate
				{
					//IL_0005: Unknown result type (might be due to invalid IL or missing references)
					//IL_000a: Unknown result type (might be due to invalid IL or missing references)
					//IL_000b: Unknown result type (might be due to invalid IL or missing references)
					//IL_0021: Expected I4, but got Unknown
					Difficulty difficulty = GameSessionManager.ActiveSession.Difficulty;
					int num = Convert.ToInt32(Math.Clamp((int)difficulty switch
					{
						0 => 1f + MavsBepInExPlugin<HigherDifficulty, PluginConfiguration>.Configuration.Normal.SpawnGroupAmountMultiplier, 
						1 => 1f + MavsBepInExPlugin<HigherDifficulty, PluginConfiguration>.Configuration.Veteran.SpawnGroupAmountMultiplier, 
						2 => 1f + MavsBepInExPlugin<HigherDifficulty, PluginConfiguration>.Configuration.Expert.SpawnGroupAmountMultiplier, 
						3 => 1f + MavsBepInExPlugin<HigherDifficulty, PluginConfiguration>.Configuration.Insane.SpawnGroupAmountMultiplier, 
						_ => 1f, 
					} * (float)__instance2.InitialDroneCount * 0.625f, __instance2.InitialDroneCount, (float)__instance2.InitialDroneCount * 2.25f));
					SetExtensions.Set<int>(ref __instance2.InitialDroneCount, num, (ManualLogSource)(object)MavsBepInExPlugin<HigherDifficulty>.Logger, "__instance.InitialDroneCount");
				});
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(HubQuestManager), "Awake")]
		private static void HubQuestManagerAwakePrefix()
		{
			if (PhotonNetwork.IsMasterClient)
			{
				MavsBepInExPlugin<HigherDifficulty>.LoggedExceptions((Action)delegate
				{
					SetConfig((Difficulty)0, MavsBepInExPlugin<HigherDifficulty, PluginConfiguration>.Configuration.Normal);
					SetConfig((Difficulty)1, MavsBepInExPlugin<HigherDifficulty, PluginConfiguration>.Configuration.Veteran);
					SetConfig((Difficulty)2, MavsBepInExPlugin<HigherDifficulty, PluginConfiguration>.Configuration.Expert);
					SetConfig((Difficulty)3, MavsBepInExPlugin<HigherDifficulty, PluginConfiguration>.Configuration.Insane);
					((ManualLogSource)MavsBepInExPlugin<HigherDifficulty>.Logger).LogMessage((object)"Difficulties supercharged!");
				});
			}
		}

		private static void SetConfig(Difficulty difficulty, PluginConfiguration.DifficultyConfig config)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: 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)
			QuestDifficultyDef config2 = ResourceAssetContainer<QuestDifficultyContainer, QuestDifficulty, QuestDifficultyDef>.Instance.GetConfig(difficulty);
			DifficultyConfig config3 = ((ResourceAssetDef<QuestDifficulty>)(object)config2).Asset.Config;
			((ManualLogSource)MavsBepInExPlugin<HigherDifficulty>.Logger).LogDebug((object)$"DifficultyConfig for {((CosmeticsResourceAssetDef<QuestDifficulty>)(object)config2).ContextInfo.HeaderText} was: {config3}");
			SetExtensions.Set<FloatModifier, float>(config3.EnemyHpMultiplier, config.EnemyHpMultiplier, (ManualLogSource)(object)MavsBepInExPlugin<HigherDifficulty>.Logger, $"{difficulty} EnemyHpMultiplier");
			SetExtensions.Set<FloatModifier, float>(config3.PlayerShipDamageMultiplier, config.PlayerShipDamageMultiplier, (ManualLogSource)(object)MavsBepInExPlugin<HigherDifficulty>.Logger, $"{difficulty} PlayerShipDamageMultiplier");
			SetExtensions.Set<FloatModifier, float>(config3.SpawnGroupAmountMultiplier, config.SpawnGroupAmountMultiplier, (ManualLogSource)(object)MavsBepInExPlugin<HigherDifficulty>.Logger, $"{difficulty} SpawnGroupAmountMultiplier");
			((ManualLogSource)MavsBepInExPlugin<HigherDifficulty>.Logger).LogDebug((object)$"Config effective requested increase: {config}");
			config2 = ResourceAssetContainer<QuestDifficultyContainer, QuestDifficulty, QuestDifficultyDef>.Instance.GetConfig(difficulty);
			((ManualLogSource)MavsBepInExPlugin<HigherDifficulty>.Logger).LogInfo((object)$"DifficultyConfig for {((CosmeticsResourceAssetDef<QuestDifficulty>)(object)config2).ContextInfo.HeaderText} is: {((ResourceAssetDef<QuestDifficulty>)(object)config2).Asset.Config}");
		}
	}
	internal sealed class PluginConfiguration : ISupportsConfigFile
	{
		internal sealed class DifficultyConfig
		{
			public float EnemyHpMultiplier { get; set; }

			public float PlayerShipDamageMultiplier { get; set; }

			public float SpawnGroupAmountMultiplier { get; set; }

			public override string ToString()
			{
				return $"Effective Difficulty: {(1f + EnemyHpMultiplier) * (1f + PlayerShipDamageMultiplier) * (1f + SpawnGroupAmountMultiplier) * 100f}%";
			}
		}

		private static class ConfigurationDefaults
		{
			internal static class Normal
			{
				internal static readonly KeyValuePair<ConfigDefinition, ConfigDescription> EnemyHpMultiplier = new KeyValuePair<ConfigDefinition, ConfigDescription>(new ConfigDefinition("Normal", "EnemyHpMultiplier"), new ConfigDescription("Difficulty multiplier for Normal difficulty level EnemyHpMultiplier. Game default is -0.5f", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-0.5f, 0f), new object[1] { (object)new ConfigurationManagerAttributes
				{
					IsAdvanced = true,
					Order = 2,
					DefaultValue = 0f
				} }));

				internal static readonly KeyValuePair<ConfigDefinition, ConfigDescription> PlayerShipDamageMultiplier = new KeyValuePair<ConfigDefinition, ConfigDescription>(new ConfigDefinition("Normal", "PlayerShipDamageMultiplier"), new ConfigDescription("Difficulty multiplier for Normal difficulty level PlayerShipDamageMultiplier. Game default is -0.5f", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-0.5f, 0f), new object[1] { (object)new ConfigurationManagerAttributes
				{
					IsAdvanced = true,
					Order = 1,
					DefaultValue = 0f
				} }));

				internal static readonly KeyValuePair<ConfigDefinition, ConfigDescription> SpawnGroupAmountMultiplier = new KeyValuePair<ConfigDefinition, ConfigDescription>(new ConfigDefinition("Normal", "SpawnGroupAmountMultiplier"), new ConfigDescription("Difficulty multiplier for Normal difficulty level SpawnGroupAmountMultiplier. Game default is 0f", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 0.5f), new object[1] { (object)new ConfigurationManagerAttributes
				{
					IsAdvanced = true,
					DefaultValue = 0f
				} }));
			}

			internal static class Veteran
			{
				internal static readonly KeyValuePair<ConfigDefinition, ConfigDescription> EnemyHpMultiplier = new KeyValuePair<ConfigDefinition, ConfigDescription>(new ConfigDefinition("Veteran", "EnemyHpMultiplier"), new ConfigDescription("Difficulty multiplier for Veteran difficulty level EnemyHpMultiplier. Game default is -0.25f", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-0.25f, 0.15f), new object[1] { (object)new ConfigurationManagerAttributes
				{
					IsAdvanced = true,
					Order = 8,
					DefaultValue = 0.15f
				} }));

				internal static readonly KeyValuePair<ConfigDefinition, ConfigDescription> PlayerShipDamageMultiplier = new KeyValuePair<ConfigDefinition, ConfigDescription>(new ConfigDefinition("Veteran", "PlayerShipDamageMultiplier"), new ConfigDescription("Difficulty multiplier for Veteran difficulty level PlayerShipDamageMultiplier. Game default is -0.25f", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-0.25f, 0.15f), new object[1] { (object)new ConfigurationManagerAttributes
				{
					IsAdvanced = true,
					Order = 4,
					DefaultValue = 0.12f
				} }));

				internal static readonly KeyValuePair<ConfigDefinition, ConfigDescription> SpawnGroupAmountMultiplier = new KeyValuePair<ConfigDefinition, ConfigDescription>(new ConfigDefinition("Veteran", "SpawnGroupAmountMultiplier"), new ConfigDescription("Difficulty multiplier for Veteran difficulty level SpawnGroupAmountMultiplier. Game default is 0f", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 0.75f), new object[1] { (object)new ConfigurationManagerAttributes
				{
					IsAdvanced = true,
					Order = 2,
					DefaultValue = 0.75f
				} }));
			}

			internal static class Expert
			{
				internal static readonly KeyValuePair<ConfigDefinition, ConfigDescription> EnemyHpMultiplier = new KeyValuePair<ConfigDefinition, ConfigDescription>(new ConfigDefinition("Expert", "EnemyHpMultiplier"), new ConfigDescription("Difficulty multiplier for Expert difficulty level EnemyHpMultiplier. Game default is 0f", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 0.2f), new object[1] { (object)new ConfigurationManagerAttributes
				{
					IsAdvanced = true,
					Order = 2,
					DefaultValue = 0.2f
				} }));

				internal static readonly KeyValuePair<ConfigDefinition, ConfigDescription> PlayerShipDamageMultiplier = new KeyValuePair<ConfigDefinition, ConfigDescription>(new ConfigDefinition("Expert", "PlayerShipDamageMultiplier"), new ConfigDescription("Difficulty multiplier for Expert difficulty level PlayerShipDamageMultiplier. Game default is 0f", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 0.34f), new object[1] { (object)new ConfigurationManagerAttributes
				{
					IsAdvanced = true,
					Order = 1,
					DefaultValue = 0.34f
				} }));

				internal static readonly KeyValuePair<ConfigDefinition, ConfigDescription> SpawnGroupAmountMultiplier = new KeyValuePair<ConfigDefinition, ConfigDescription>(new ConfigDefinition("Expert", "SpawnGroupAmountMultiplier"), new ConfigDescription("Difficulty multiplier for Expert difficulty level SpawnGroupAmountMultiplier. Game default is 0f", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1.5f), new object[1] { (object)new ConfigurationManagerAttributes
				{
					IsAdvanced = true,
					DefaultValue = 1.5f
				} }));
			}

			internal static class Insane
			{
				internal static readonly KeyValuePair<ConfigDefinition, ConfigDescription> EnemyHpMultiplier = new KeyValuePair<ConfigDefinition, ConfigDescription>(new ConfigDefinition("Insane", "EnemyHpMultiplier"), new ConfigDescription("Difficulty multiplier for Insane difficulty level EnemyHpMultiplier. Game default is 0.25f", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.25f, 0.3f), new object[1] { (object)new ConfigurationManagerAttributes
				{
					IsAdvanced = true,
					Order = 2,
					DefaultValue = 0.3f
				} }));

				internal static readonly KeyValuePair<ConfigDefinition, ConfigDescription> PlayerShipDamageMultiplier = new KeyValuePair<ConfigDefinition, ConfigDescription>(new ConfigDefinition("Insane", "PlayerShipDamageMultiplier"), new ConfigDescription("Difficulty multiplier for Insane difficulty level PlayerShipDamageMultiplier. Game default is 0.25f", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.25f, 0.5f), new object[1] { (object)new ConfigurationManagerAttributes
				{
					IsAdvanced = true,
					Order = 1,
					DefaultValue = 0.5f
				} }));

				internal static readonly KeyValuePair<ConfigDefinition, ConfigDescription> SpawnGroupAmountMultiplier = new KeyValuePair<ConfigDefinition, ConfigDescription>(new ConfigDefinition("Insane", "SpawnGroupAmountMultiplier"), new ConfigDescription("Difficulty multiplier for Insane difficulty level SpawnGroupAmountMultiplier. Game default is 0f", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 2.25f), new object[1] { (object)new ConfigurationManagerAttributes
				{
					IsAdvanced = true,
					DefaultValue = 2.25f
				} }));
			}
		}

		public ulong SettingsVersion { get; set; } = 1705406119uL;


		public DifficultyConfig Normal { get; } = new DifficultyConfig
		{
			EnemyHpMultiplier = -0.5f,
			PlayerShipDamageMultiplier = -0.5f
		};


		public DifficultyConfig Veteran { get; } = new DifficultyConfig
		{
			EnemyHpMultiplier = -0.25f,
			PlayerShipDamageMultiplier = -0.25f
		};


		public DifficultyConfig Expert { get; } = new DifficultyConfig();


		public DifficultyConfig Insane { get; } = new DifficultyConfig
		{
			EnemyHpMultiplier = 0.25f,
			PlayerShipDamageMultiplier = 0.25f
		};


		public void LoadFrom(ConfigFile config)
		{
			Normal.EnemyHpMultiplier = Extensions.BindValue<float>(config, ConfigurationDefaults.Normal.EnemyHpMultiplier.Key, ConfigurationDefaults.Normal.EnemyHpMultiplier.Value);
			Normal.PlayerShipDamageMultiplier = Extensions.BindValue<float>(config, ConfigurationDefaults.Normal.PlayerShipDamageMultiplier.Key, ConfigurationDefaults.Normal.PlayerShipDamageMultiplier.Value);
			Normal.SpawnGroupAmountMultiplier = Extensions.BindValue<float>(config, ConfigurationDefaults.Normal.SpawnGroupAmountMultiplier.Key, ConfigurationDefaults.Normal.SpawnGroupAmountMultiplier.Value);
			Veteran.EnemyHpMultiplier = Extensions.BindValue<float>(config, ConfigurationDefaults.Veteran.EnemyHpMultiplier.Key, ConfigurationDefaults.Veteran.EnemyHpMultiplier.Value);
			Veteran.PlayerShipDamageMultiplier = Extensions.BindValue<float>(config, ConfigurationDefaults.Veteran.PlayerShipDamageMultiplier.Key, ConfigurationDefaults.Veteran.PlayerShipDamageMultiplier.Value);
			Veteran.SpawnGroupAmountMultiplier = Extensions.BindValue<float>(config, ConfigurationDefaults.Veteran.SpawnGroupAmountMultiplier.Key, ConfigurationDefaults.Veteran.SpawnGroupAmountMultiplier.Value);
			Expert.EnemyHpMultiplier = Extensions.BindValue<float>(config, ConfigurationDefaults.Expert.EnemyHpMultiplier.Key, ConfigurationDefaults.Expert.EnemyHpMultiplier.Value);
			Expert.PlayerShipDamageMultiplier = Extensions.BindValue<float>(config, ConfigurationDefaults.Expert.PlayerShipDamageMultiplier.Key, ConfigurationDefaults.Expert.PlayerShipDamageMultiplier.Value);
			Expert.SpawnGroupAmountMultiplier = Extensions.BindValue<float>(config, ConfigurationDefaults.Expert.SpawnGroupAmountMultiplier.Key, ConfigurationDefaults.Expert.SpawnGroupAmountMultiplier.Value);
			Insane.EnemyHpMultiplier = Extensions.BindValue<float>(config, ConfigurationDefaults.Insane.EnemyHpMultiplier.Key, ConfigurationDefaults.Insane.EnemyHpMultiplier.Value);
			Insane.PlayerShipDamageMultiplier = Extensions.BindValue<float>(config, ConfigurationDefaults.Insane.PlayerShipDamageMultiplier.Key, ConfigurationDefaults.Insane.PlayerShipDamageMultiplier.Value);
			Insane.SpawnGroupAmountMultiplier = Extensions.BindValue<float>(config, ConfigurationDefaults.Insane.SpawnGroupAmountMultiplier.Key, ConfigurationDefaults.Insane.SpawnGroupAmountMultiplier.Value);
		}
	}
	[CompilerGenerated]
	public static class PluginInfo
	{
		public const string PackageId = "Maverik-HigherDifficulty";

		public const string Title = "Higher Difficulty";

		public const string VersionString = "0.0.3";

		public static Version Version = Version.Parse("0.0.3");
	}
}