Decompiled source of Melanie Interiors MelanieMelicious v1.0.3

MelanieMeliciousInterior.dll

Decompiled 2 weeks 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 BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
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(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.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;
		}
	}
}
internal static class MelanieInteriorConfig
{
	internal enum items
	{
		Enable,
		NoPickup,
		Disable
	}

	internal static ConfigEntry<items> item0;

	internal static ConfigEntry<items> item1;

	internal static ConfigEntry<items> item2;

	internal static ConfigEntry<items> item3;

	internal static ConfigEntry<items> item4;

	internal static ConfigEntry<items> item5;

	internal static void SetupConfig(ConfigFile config)
	{
		item0 = config.Bind<items>("Item Toggle", "Paintings", items.Enable, "Toggle if paintings are enabled, can be picked up, or disabled entirely.");
		item1 = config.Bind<items>("Item Toggle", "Fossils", items.Enable, "Toggle if fossils are enabled, can be picked up, or disabled entirely.");
		item2 = config.Bind<items>("Item Toggle", "Plushies", items.Enable, "Toggle if plushies are enabled, can be picked up, or disabled entirely.");
		item3 = config.Bind<items>("Item Toggle", "Relics", items.Enable, "Toggle if puzzle relics are enabled, can be picked up, or disabled entirely.");
		item4 = config.Bind<items>("Item Toggle", "Body Bags", items.Enable, "Toggle if body bags are enabled, can be picked up, or disabled entirely.");
		item5 = config.Bind<items>("Item Toggle", "Bones", items.Enable, "Toggle if bones (not fossils) are enabled, can be picked up, or disabled entirely.");
	}
}
public class RemoveItem : MonoBehaviour
{
	public char item;

	private void Awake()
	{
		try
		{
			switch (item)
			{
			case '0':
				if (MelanieInteriorConfig.item0.Value == MelanieInteriorConfig.items.NoPickup)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject.GetComponent<GrabbableObject>());
				}
				else if (MelanieInteriorConfig.item0.Value == MelanieInteriorConfig.items.Disable)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject);
				}
				break;
			case '1':
				if (MelanieInteriorConfig.item1.Value == MelanieInteriorConfig.items.NoPickup)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject.GetComponent<GrabbableObject>());
				}
				else if (MelanieInteriorConfig.item1.Value == MelanieInteriorConfig.items.Disable)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject);
				}
				break;
			case '2':
				if (MelanieInteriorConfig.item2.Value == MelanieInteriorConfig.items.NoPickup)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject.GetComponent<GrabbableObject>());
				}
				else if (MelanieInteriorConfig.item2.Value == MelanieInteriorConfig.items.Disable)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject);
				}
				break;
			case '3':
				if (MelanieInteriorConfig.item3.Value == MelanieInteriorConfig.items.NoPickup)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject.GetComponent<GrabbableObject>());
				}
				else if (MelanieInteriorConfig.item3.Value == MelanieInteriorConfig.items.Disable)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject);
				}
				break;
			case '4':
				if (MelanieInteriorConfig.item4.Value == MelanieInteriorConfig.items.NoPickup)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject.GetComponent<GrabbableObject>());
				}
				else if (MelanieInteriorConfig.item4.Value == MelanieInteriorConfig.items.Disable)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject);
				}
				break;
			case '5':
				if (MelanieInteriorConfig.item5.Value == MelanieInteriorConfig.items.NoPickup)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject.GetComponent<GrabbableObject>());
				}
				else if (MelanieInteriorConfig.item5.Value == MelanieInteriorConfig.items.Disable)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject);
				}
				break;
			}
		}
		catch
		{
		}
	}
}
namespace MelanieMeliciousFurniturePack0
{
	[BepInPlugin("MelanieMelicious.interior0", "Melanie Melicious - Interiors", "1.0.1")]
	public class Plugin : BaseUnityPlugin
	{
		private const string GUID = "MelanieMelicious.interior0";

		private const string NAME = "Melanie Melicious - Interiors";

		private const string VERSION = "1.0.1";

		private readonly Harmony harmony = new Harmony("MelanieMelicious.interior0");

		public static ManualLogSource mls;

		public static Plugin instance;

		private void Awake()
		{
			MelanieInteriorConfig.SetupConfig(((BaseUnityPlugin)this).Config);
		}
	}
}