Decompiled source of ShowHiddenCategory v1.2.1

plugins/ShowHiddenCategory.dll

Decompiled 2 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.NET.Common;
using BepInExResoniteShim;
using FrooxEngine;
using HarmonyLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v10.0", FrameworkDisplayName = ".NET 10.0")]
[assembly: AssemblyCompany("eia485")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0.0+c9f3f6e2898237d4d20c37d1545ef8d204ce0dbb")]
[assembly: AssemblyProduct("ShowHiddenCategory")]
[assembly: AssemblyTitle("ShowHiddenCategory")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/EIA485/NeosShowHiddenCategory")]
[assembly: AssemblyVersion("1.2.0.0")]
[module: RefSafetyRules(11)]
namespace ShowHiddenCategory;

[ResonitePlugin("net.eia485.ShowHiddenCategory", "ShowHiddenCategory", "1.2.0.0", "eia485", "https://github.com/EIA485/NeosShowHiddenCategory")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class ShowHiddenCategory : BasePlugin
{
	[HarmonyPatch(typeof(WorkerInitializer), "Initialize", new global::System.Type[]
	{
		typeof(List<global::System.Type>),
		typeof(bool)
	})]
	private class ShowHiddenCategoryPatch
	{
		private static global::System.Collections.Generic.IEnumerable<CodeInstruction> Transpiler(global::System.Collections.Generic.IEnumerable<CodeInstruction> instructions)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			List<CodeInstruction> val = new List<CodeInstruction>(instructions);
			for (int i = 0; i < val.Count; i++)
			{
				if (val[i].opcode == OpCodes.Ldstr && (string)val[i].operand == "Hidden")
				{
					for (int j = i - 1; j < i + 3; j++)
					{
						val[j].opcode = OpCodes.Nop;
					}
					break;
				}
			}
			return (global::System.Collections.Generic.IEnumerable<CodeInstruction>)val;
		}
	}

	public override void Load()
	{
		((BasePlugin)this).HarmonyInstance.PatchAll();
	}
}
public static class PluginMetadata
{
	public const string GUID = "net.eia485.ShowHiddenCategory";

	public const string NAME = "ShowHiddenCategory";

	public const string VERSION = "1.2.0.0";

	public const string AUTHORS = "eia485";

	public const string REPOSITORY_URL = "https://github.com/EIA485/NeosShowHiddenCategory";
}