Decompiled source of Alice BS v1.0.0

AliceModel.dll

Decompiled 4 hours ago
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using ModelReplacement;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("AliceModel")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("AliceModel")]
[assembly: AssemblyTitle("AliceModel")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace AliceModel;

[BepInPlugin("kami_nii.AliceBS", "AliceBS", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
	internal static ManualLogSource Log;

	private void Awake()
	{
		Log = ((BaseUnityPlugin)this).Logger;
		Assets.Load();
		ModelReplacementAPI.RegisterSuitModelReplacement("AliceSister", typeof(MRAliceSister));
		ModelReplacementAPI.RegisterSuitModelReplacement("AliceMother", typeof(MRAliceMother));
		ModelReplacementAPI.RegisterSuitModelReplacement("AliceDaughter", typeof(MRAliceDaughter));
		Log.LogInfo((object)"AliceBS 1.0.0 loaded, suits AliceSister AliceMother AliceDaughter");
	}
}
public static class PluginInfo
{
	public const string GUID = "kami_nii.AliceBS";

	public const string NAME = "AliceBS";

	public const string VERSION = "1.0.0";
}
public static class Assets
{
	public const string BundleName = "alicebundle";

	public static AssetBundle MainAssetBundle;

	public static void Load()
	{
		if ((Object)(object)MainAssetBundle != (Object)null)
		{
			return;
		}
		string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "alicebundle");
		if (!File.Exists(text))
		{
			Plugin.Log.LogError((object)("Asset bundle not found at " + text));
			return;
		}
		MainAssetBundle = AssetBundle.LoadFromFile(text);
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			Plugin.Log.LogError((object)"Failed to load the Alice asset bundle");
		}
	}
}
public class MRAliceSister : BodyReplacementBase
{
	protected override GameObject LoadAssetsAndReturnModel()
	{
		return Assets.MainAssetBundle.LoadAsset<GameObject>("AliceSister");
	}
}
public class MRAliceMother : BodyReplacementBase
{
	protected override GameObject LoadAssetsAndReturnModel()
	{
		return Assets.MainAssetBundle.LoadAsset<GameObject>("AliceMother");
	}
}
public class MRAliceDaughter : BodyReplacementBase
{
	protected override GameObject LoadAssetsAndReturnModel()
	{
		return Assets.MainAssetBundle.LoadAsset<GameObject>("AliceDaughter");
	}
}