Decompiled source of Striker Mode v1.0.0

StrikerMode.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using GTFO.API;
using HarmonyLib;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
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(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("StrikerMode")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("StrikerMode")]
[assembly: AssemblyTitle("StrikerMode")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace StrikerMode
{
	internal class FacePatch
	{
		public static DefaultCharacterLayouts? m_instance;

		public static DefaultCharacterLayouts GetNewDefaultCosmetics()
		{
			if ((Object)(object)m_instance == (Object)null)
			{
				m_instance = AssetAPI.GetLoadedAsset<DefaultCharacterLayouts>("Assets/CustomGear/CustomCharacterLayouts.asset");
			}
			return m_instance;
		}

		[HarmonyPatch(typeof(DefaultCharacterLayouts), "GetDefaultVanityItems")]
		[HarmonyPrefix]
		public static bool NewDefaultCosmetics(int characterIndex, ref Layout __result)
		{
			__result = ((Il2CppArrayBase<Layout>)(object)GetNewDefaultCosmetics().m_layout)[characterIndex];
			return false;
		}
	}
	[BepInPlugin("com.Brandont.StrikerMode", "StrikerMode", "1.0.0")]
	public class Loader : BasePlugin
	{
		public const string MODNAME = "StrikerMode";

		public const string AUTHOR = "Brandont";

		public const string GUID = "com.Brandont.StrikerMode";

		public const string VERSION = "1.0.0";

		public static ManualLogSource Logger;

		public override void Load()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			Logger = ((BasePlugin)this).Log;
			((BasePlugin)this).Log.LogMessage((object)"Loading StrikerMode");
			Harmony val = new Harmony("StrikerMode");
			val.PatchAll(typeof(FacePatch));
			((BasePlugin)this).Log.LogMessage((object)"Loaded StrikerMode");
		}
	}
}