Decompiled source of No Vanilla Encounters v1.0.0

no_vanilla_encounters.dll

Decompiled a year ago
using System.Collections.Generic;
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.Logging;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Regions;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("no_vanilla_encounters")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Removes the vanilla encounters from the game.")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("no_vanilla_encounters")]
[assembly: AssemblyTitle("no_vanilla_encounters")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace no_vanilla_encounters;

[HarmonyPatch]
[BepInPlugin("lily.inscryption.no_vanilla_encounters", "No Vanilla Encounters", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	internal static ManualLogSource Log;

	private const string PluginVersion = "1.0.0";

	public const string PluginGuid = "lily.inscryption.no_vanilla_encounters";

	public const string PluginName = "No Vanilla Encounters";

	public static string Directory;

	public static List<string> VanillaEncounterNames = new List<string>
	{
		"BirdFlock", "CoyotePack", "WolfPack", "PronghornJuggernaut", "DireWolfJuggernaut", "Skinks", "AntSwarm", "Submerge", "Bees", "Reptiles",
		"AntsAndTurtles", "ElkHerd", "MooseJuggernaut", "VultureJuggernaut", "RavenNest", "WildBulls"
	};

	public void Awake()
	{
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Expected O, but got Unknown
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded No Vanilla Encounters! - Made by Lily");
		Log = ((BaseUnityPlugin)this).Logger;
		Directory = ((BaseUnityPlugin)this).Info.Location;
		Harmony val = new Harmony("lily.inscryption.no_vanilla_encounters");
		val.PatchAll();
	}

	public void Start()
	{
		RegionManager.ModifyRegionsList += RemoveVanillaEncountersFromRegions;
		RegionManager.SyncRegionList();
	}

	public static List<RegionData> RemoveVanillaEncountersFromRegions(List<RegionData> regions)
	{
		foreach (RegionData region in regions)
		{
			region.encounters.RemoveAll((EncounterBlueprintData x) => VanillaEncounterNames.Contains(((Object)x).name));
		}
		return regions;
	}
}
public static class PluginInfo
{
	public const string PLUGIN_GUID = "no_vanilla_encounters";

	public const string PLUGIN_NAME = "no_vanilla_encounters";

	public const string PLUGIN_VERSION = "1.0.0";
}