Decompiled source of NoPoop v1.0.0

plugins/NoPoop.dll

Decompiled 2 weeks ago
using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using BepInEx;
using BepInEx.Unity.Mono;
using HarmonyLib;
using NPC;
using Scriptable_Objects;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
public static class PoopPatch
{
	public static void Dropping(NpcDroppingData dropping)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)dropping.SResource != (Object)null && dropping.SResource.Resources != null)
		{
			dropping.SResource.Resources = (from x in dropping.SResource.Resources.ToList()
				where (int)x.ItemID != 9000
				select x).ToArray();
		}
	}
}
[BepInPlugin("nopoop.sessional.dev", "NoPoop", "1.0.0")]
public class NoPoopPlugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Expected O, but got Unknown
		Harmony val = new Harmony("nopoop.sessional.dev");
		MethodInfo methodInfo = AccessTools.Method(typeof(NpcDropping), "Dropping", (Type[])null, (Type[])null);
		MethodInfo methodInfo2 = AccessTools.Method(typeof(PoopPatch), "Dropping", (Type[])null, (Type[])null);
		val.Patch((MethodBase)methodInfo, new HarmonyMethod(methodInfo2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
	}
}