Decompiled source of AISomniumFiles Characters v2.0.0

AISomniumFiles_Characters.dll

Decompiled 5 months ago
using System;
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 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(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("AISomniumFiles_Characters")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("AISomniumFiles_Characters")]
[assembly: AssemblyTitle("AISomniumFiles_Characters")]
[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 ModelReplacement
{
	public class MRMIZUKI : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Mizuki";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRBIBIUNMASKED : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "BibiUnmasked";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRDATEAI1 : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "DateAI1";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRIRISAI2 : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "IrisAI2";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRIRISAI2SCHOOL : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "IrisAI2_School";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRMOMA : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Moma";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRTOKIKO : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Tokiko";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRHORADORI : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Horadori";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRPEWTER : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Pewter";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRKOMEJI : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Komeji";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRMIZUKIAI2 : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "MizukiAI2";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRIRIS : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Iris";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRBIBIMASKED : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "BibiMasked";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRCULPRITAI1 : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "CulpritAI1";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRTAMAHOTDOG : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "TamaHotDog";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRLIEN : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Lien";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRTAMA : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Tama";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRKAGAMI : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Kagami";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRAIBA : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Aiba";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRAIBASHOVELFORGE : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "AibaShovelForge";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRDATEAI2 : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "DateAI2";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MROTAAI2 : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "OtaAI2";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MROTA : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Ota";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRIRISAI2_2 : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "IrisAI2_2";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRRYUKI : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Ryuki";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRBOSS : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Boss";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRTEARER : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Tearer";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRAMAME : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Amame";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRAMAMEMERMAID : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "AmameMermaid";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRAMAMESCHOOL : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "AmameSchool";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRGEN : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Gen";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRFALCO : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Falco";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRKIZUNA : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Kizuna";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRRITSUKO : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Ritsuko";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRAIBAHOTDOG : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "AibaHotDog";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	public class MRBOSSPROTO : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "BossProto";
			return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
		}
	}
	[BepInPlugin("Segtendo.AISomniumFiles_Characters", "AI The Somnium Files Characters", "2.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		private void Awake()
		{
			//IL_0300: Unknown result type (might be due to invalid IL or missing references)
			//IL_0306: Expected O, but got Unknown
			Assets.PopulateAssets();
			ModelReplacementAPI.RegisterSuitModelReplacement("AI1 Culprit (SPOILER)", typeof(MRCULPRITAI1));
			ModelReplacementAPI.RegisterSuitModelReplacement("Aiba", typeof(MRAIBA));
			ModelReplacementAPI.RegisterSuitModelReplacement("Aiba (Hot Dog Outfit)", typeof(MRAIBAHOTDOG));
			ModelReplacementAPI.RegisterSuitModelReplacement("Aiba (ShovelForge)", typeof(MRAIBASHOVELFORGE));
			ModelReplacementAPI.RegisterSuitModelReplacement("Amame", typeof(MRAMAME));
			ModelReplacementAPI.RegisterSuitModelReplacement("Amame (Mermaid)", typeof(MRAMAMEMERMAID));
			ModelReplacementAPI.RegisterSuitModelReplacement("Amame (School)", typeof(MRAMAMESCHOOL));
			ModelReplacementAPI.RegisterSuitModelReplacement("Bibi (Masked)", typeof(MRBIBIMASKED));
			ModelReplacementAPI.RegisterSuitModelReplacement("Bibi (Unmasked) (SPOILER)", typeof(MRBIBIUNMASKED));
			ModelReplacementAPI.RegisterSuitModelReplacement("Boss", typeof(MRBOSS));
			ModelReplacementAPI.RegisterSuitModelReplacement("Boss (Prototype)", typeof(MRBOSSPROTO));
			ModelReplacementAPI.RegisterSuitModelReplacement("Date (AI1)", typeof(MRDATEAI1));
			ModelReplacementAPI.RegisterSuitModelReplacement("Date (AI2)", typeof(MRDATEAI2));
			ModelReplacementAPI.RegisterSuitModelReplacement("Iris (AI1)", typeof(MRIRIS));
			ModelReplacementAPI.RegisterSuitModelReplacement("Iris (AI2)", typeof(MRIRISAI2));
			ModelReplacementAPI.RegisterSuitModelReplacement("Iris (AI2 Variant)", typeof(MRIRISAI2_2));
			ModelReplacementAPI.RegisterSuitModelReplacement("Iris (AI2 School)", typeof(MRIRISAI2SCHOOL));
			ModelReplacementAPI.RegisterSuitModelReplacement("Falco", typeof(MRFALCO));
			ModelReplacementAPI.RegisterSuitModelReplacement("Gen", typeof(MRGEN));
			ModelReplacementAPI.RegisterSuitModelReplacement("Horadori", typeof(MRHORADORI));
			ModelReplacementAPI.RegisterSuitModelReplacement("Kagami", typeof(MRKAGAMI));
			ModelReplacementAPI.RegisterSuitModelReplacement("Kizuna", typeof(MRKIZUNA));
			ModelReplacementAPI.RegisterSuitModelReplacement("Komeji", typeof(MRKOMEJI));
			ModelReplacementAPI.RegisterSuitModelReplacement("Lien", typeof(MRLIEN));
			ModelReplacementAPI.RegisterSuitModelReplacement("Mizuki", typeof(MRMIZUKI));
			ModelReplacementAPI.RegisterSuitModelReplacement("Mizuki (AI2)", typeof(MRMIZUKIAI2));
			ModelReplacementAPI.RegisterSuitModelReplacement("Moma", typeof(MRMOMA));
			ModelReplacementAPI.RegisterSuitModelReplacement("Ota", typeof(MROTA));
			ModelReplacementAPI.RegisterSuitModelReplacement("Ota (AI2)", typeof(MROTAAI2));
			ModelReplacementAPI.RegisterSuitModelReplacement("Pewter", typeof(MRPEWTER));
			ModelReplacementAPI.RegisterSuitModelReplacement("Ritsuko", typeof(MRRITSUKO));
			ModelReplacementAPI.RegisterSuitModelReplacement("Ryuki", typeof(MRRYUKI));
			ModelReplacementAPI.RegisterSuitModelReplacement("Tama", typeof(MRTAMA));
			ModelReplacementAPI.RegisterSuitModelReplacement("Tama (Hot Dog Outfit)", typeof(MRTAMAHOTDOG));
			ModelReplacementAPI.RegisterSuitModelReplacement("Tearer", typeof(MRTEARER));
			ModelReplacementAPI.RegisterSuitModelReplacement("Tokiko", typeof(MRTOKIKO));
			Harmony val = new Harmony("Segtendo.AISomniumFiles_Characters");
			val.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Segtendo.AISomniumFiles_Characters is loaded!");
		}
	}
	public static class Assets
	{
		public static string mainAssetBundleName = "Segtendo.AISomniumFiles_Characters";

		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);
			}
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}