Decompiled source of PestCreditChange v1.0.0

PestCreditChange.dll

Decompiled 8 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using Microsoft.CodeAnalysis;
using RoR2;
using UnityEngine.AddressableAssets;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("PestCreditChange")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("PestCreditChange")]
[assembly: AssemblyTitle("PestCreditChange")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace PestCreditChange
{
	[BepInPlugin("com.Nuxlar.PestCreditChange", "PestCreditChange", "1.0.0")]
	public class PestCreditChange : BaseUnityPlugin
	{
		private SpawnCard pestCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/FlyingVermin/cscFlyingVermin.asset").WaitForCompletion();

		private SpawnCard pestSnowyCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/FlyingVermin/cscFlyingVerminSnowy.asset").WaitForCompletion();

		public static ConfigEntry<int> creditCost;

		private static ConfigFile PCCConfig { get; set; }

		public void Awake()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			PCCConfig = new ConfigFile(Paths.ConfigPath + "\\com.Nuxlar.PestCreditChange.cfg", true);
			creditCost = PCCConfig.Bind<int>("General", "Credit Cost", 20, "Blind Pest credit cost. Vanilla is 15. Wisps cost 10 for reference.");
			pestCard.directorCreditCost = creditCost.Value;
			pestSnowyCard.directorCreditCost = creditCost.Value;
		}
	}
}