Decompiled source of 45x Anime Models v1.5.1

45x Anime Models.dll

Decompiled 3 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using ModelReplacement;
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.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("45x Anime Models")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("45x Anime Models")]
[assembly: AssemblyTitle("45x Anime Models")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
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 ffxanimemodels
{
	public class BodyReplacements
	{
		public static List<string> SpeedBoosted = new List<string> { "Mayano Top Gun", "Silence Suzuka", "Mejiro McQueen", "Cheval Grand", "Ruby Rose" };

		public static void InitBodyReplacements()
		{
			ModelReplacementAPI.RegisterSuitModelReplacement("Yae Sakura [Neon Shade]", typeof(YaeNeonModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Theresa [Lunar Vow]", typeof(TheresaLunarModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Weedy", typeof(WeedyModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Roland", typeof(RolandModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Anby", typeof(AnbyModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Sparkle", typeof(SparkleModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Ruby Rose", typeof(RubyModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Ruby Rose [Timeskip]", typeof(RubyTimeskipModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Yang Xiao Long", typeof(YangModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Yang Xiao Long [Timeskip]", typeof(YangTimeskipModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Weiss Schnee", typeof(WeissModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Weiss Schnee [Timeskip]", typeof(WeissTimeskipModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Blake Belladonna", typeof(BlakeModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Blake Belladonna [Timeskip]", typeof(BlakeTimeskipModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Mostima", typeof(MostimaModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Mostima [Maid]", typeof(MostimaMaidModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Zero Two", typeof(ZeroTwoModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Zero Two [Red Suit]", typeof(ZeroTwoRedSuitModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Zero Two [White Suit]", typeof(ZeroTwoWhiteSuitModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Zero Two [School]", typeof(ZeroTwoSchoolModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Kiana", typeof(KianaModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Kiana [Finality]", typeof(KianaFinalityModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Mayano Top Gun", typeof(MayanoModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Mayano Top Gun [School]", typeof(MayanoSchoolModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Silence Suzuka", typeof(SuzukaModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Silence Suzuka [School]", typeof(SuzukaSchoolModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Mejiro McQueen", typeof(MejiroModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Mejiro McQueen [School]", typeof(MejiroSchoolModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Cheval Grand", typeof(ChevalModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Cheval Grand [School]", typeof(ChevalSchoolModel));
			ModelReplacementAPI.RegisterSuitModelReplacement("Faust", typeof(FaustModel));
		}
	}
	public class ZeroTwoModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Zero Two [Default]");
		}
	}
	public class ZeroTwoRedSuitModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Zero Two [Red Suit]");
		}
	}
	public class ZeroTwoWhiteSuitModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Zero Two [White Suit]");
		}
	}
	public class ZeroTwoSchoolModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Zero Two [School]");
		}
	}
	public class MostimaModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Mostima");
		}
	}
	public class MostimaMaidModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Mostima [Maid]");
		}
	}
	public class KianaModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Kiana");
		}
	}
	public class KianaFinalityModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Kiana [Finality]");
		}
	}
	public class YaeNeonModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Yae Sakura [Neon Shade]");
		}
	}
	public class TheresaLunarModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Theresa [Lunar Vow]");
		}
	}
	public class WeedyModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Weedy");
		}
	}
	public class RolandModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Roland");
		}
	}
	public class MayanoModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Mayano Top Gun");
		}
	}
	public class MayanoSchoolModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Mayano Top Gun [School]");
		}
	}
	public class SuzukaModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Silence Suzuka");
		}
	}
	public class SuzukaSchoolModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Silence Suzuka [School]");
		}
	}
	public class MejiroModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Mejiro McQueen");
		}
	}
	public class MejiroSchoolModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Mejiro McQueen [School]");
		}
	}
	public class ChevalModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Cheval Grand");
		}
	}
	public class ChevalSchoolModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Cheval Grand [School]");
		}
	}
	public class AnbyModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Anby");
		}
	}
	public class RubyModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Ruby Rose");
		}
	}
	public class RubyTimeskipModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Ruby Rose [Timeskip]");
		}
	}
	public class YangModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Yang Xiao Long");
		}
	}
	public class YangTimeskipModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Yang Xiao Long [Timeskip]");
		}
	}
	public class WeissModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Weiss Schnee");
		}
	}
	public class WeissTimeskipModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Weiss Schnee [Timeskip]");
		}
	}
	public class BlakeModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Blake Belladonna");
		}
	}
	public class BlakeTimeskipModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Blake Belladonna [Timeskip]");
		}
	}
	public class SparkleModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Sparkle");
		}
	}
	public class FaustModel : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.MainAssetBundle.LoadAsset<GameObject>("Faust");
		}
	}
	public static class Assets
	{
		public static string mainAssetBundleName = "modelBundle";

		public static AssetBundle MainAssetBundle = null;

		private static string GetAssemblyName()
		{
			return Assembly.GetExecutingAssembly().GetName().Name.Replace(" ", "_");
		}

		public static void PopulateAssets()
		{
			if ((Object)(object)MainAssetBundle == (Object)null)
			{
				Console.WriteLine(GetAssemblyName() + "." + mainAssetBundleName);
				using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(GetAssemblyName() + "." + mainAssetBundleName);
				MainAssetBundle = AssetBundle.LoadFromStream(stream);
			}
		}
	}
	[BepInPlugin("dev.45x.45xanimemodels", "45x Anime Models", "1.5.1")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class FFXAnimeModels : BaseUnityPlugin
	{
		public static ManualLogSource PluginLogger = Logger.CreateLogSource("dev.45x.45xanimemodels");

		private readonly Harmony harmony = new Harmony("dev.45x.45xanimemodels");

		private void Awake()
		{
			PluginLogger.LogInfo((object)"Loading Plugin: dev.45x.45xanimemodels");
			Stopwatch stopwatch = Stopwatch.StartNew();
			Assets.PopulateAssets();
			BodyReplacements.InitBodyReplacements();
			harmony.PatchAll();
			stopwatch.Stop();
			PluginLogger.LogInfo((object)string.Format("Plugin {0} is loaded! Took {1}ms", "dev.45x.45xanimemodels", stopwatch.ElapsedMilliseconds));
		}
	}
}
namespace ffxanimemodels.Patches
{
	internal class Patch_PlayerControllerB
	{
		private static void Update(PlayerControllerB __instance)
		{
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}