Decompiled source of NiSaModpack v1.5.0

Cosmetics/LRC-LRCCosmetics_LRCCosmetics.dll

Decompiled 10 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using LRCCosmetics.Cosmetics;
using Microsoft.CodeAnalysis;
using MoreCompany.Cosmetics;
using MoreCompany.Utils;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LRCCosmetics")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("A cool collection of cosmetics")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+ccf3acd7d1d43cfb4a5019d73ca7883cdebc10cc")]
[assembly: AssemblyProduct("LRCCosmetics")]
[assembly: AssemblyTitle("LRCCosmetics")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace LRCCosmetics
{
	[BepInPlugin("LRCCosmetics", "LRCCosmetics", "1.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		private static Harmony _harmony;

		private bool _initialized;

		private void Awake()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			if (_harmony == null)
			{
				_harmony = new Harmony("LRCCosmetics");
			}
			_harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin LRCCosmetics is loaded!");
		}

		public void Start()
		{
			if (_initialized)
			{
				_initialized = true;
				Init();
			}
		}

		public void OnDestroy()
		{
			if (!_initialized)
			{
				_initialized = true;
				Init();
			}
		}

		private void Init()
		{
			List<StreamCosmeticGeneric> cosmetics = new List<StreamCosmeticGeneric>
			{
				new BraixenHead(),
				new DittoHead(),
				new EeveeHead(),
				new FlareonHead(),
				new GardevoirHead(),
				new JolteonHead(),
				new LegoSharkHeadBlue(),
				new MeowscaradaHead(),
				new MortyHead(),
				new RickHead(),
				new VaporeonHead(),
				new ZoruaHead()
			};
			LoadAssets(cosmetics);
		}

		private void LoadAssets(IEnumerable<StreamCosmeticGeneric> cosmetics)
		{
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loading assets for LRCCosmetics");
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			if ((object)executingAssembly == null)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)"Failed to get assemlby.");
			}
			foreach (StreamCosmeticGeneric cosmetic in cosmetics)
			{
				AssetBundle val = BundleUtilities.LoadBundleFromInternalAssembly(cosmetic.StreamingPath, executingAssembly);
				GameObject val2 = AssetBundleExtension.LoadPersistentAsset<GameObject>(val, ((CosmeticGeneric)cosmetic).gameObjectPath);
				if (val2 == null)
				{
					((BaseUnityPlugin)this).Logger.LogError((object)("Failed to find GameObject for cosmetic '" + ((CosmeticGeneric)cosmetic).cosmeticId + "' at path '" + ((CosmeticGeneric)cosmetic).gameObjectPath + "'"));
					continue;
				}
				Texture2D val3 = AssetBundleExtension.LoadPersistentAsset<Texture2D>(val, ((CosmeticGeneric)cosmetic).textureIconPath);
				if (val3 == null)
				{
					((BaseUnityPlugin)this).Logger.LogError((object)("Failed to find icon Texture2D for cosmetic '" + ((CosmeticGeneric)cosmetic).cosmeticId + " at path '" + ((CosmeticGeneric)cosmetic).textureIconPath + "'"));
				}
				else
				{
					CosmeticInstance val4 = val2.AddComponent<CosmeticInstance>();
					val4.cosmeticId = ((CosmeticGeneric)cosmetic).cosmeticId;
					val4.icon = val3;
					val4.cosmeticType = ((CosmeticGeneric)cosmetic).cosmeticType;
					CosmeticRegistry.cosmeticInstances.Add(((CosmeticGeneric)cosmetic).cosmeticId, val4);
					((BaseUnityPlugin)this).Logger.LogInfo((object)("Successfully loaded cosmetic: " + ((CosmeticGeneric)cosmetic).cosmeticId));
				}
			}
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "LRCCosmetics";

		public const string PLUGIN_NAME = "LRCCosmetics";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}
namespace LRCCosmetics.Cosmetics
{
	public class BraixenHead : StreamCosmeticGeneric
	{
		public override string cosmeticId => "lrccosmetics.braixenhead";

		public override string gameObjectPath => "assets/LRCCosmetics/BraixenHead.prefab";

		public override string textureIconPath => "assets/LRCCosmetics/Icons/BraixenHeadIconTexture.png";

		public override string StreamingPath => "LRCCosmetics.Assets.braixenhead";

		public override CosmeticType cosmeticType => (CosmeticType)0;
	}
	public class DittoHead : StreamCosmeticGeneric
	{
		public override string cosmeticId => "lrccosmetics.dittohead";

		public override string gameObjectPath => "assets/LRCCosmetics/DittoHead.prefab";

		public override string textureIconPath => "assets/LRCCosmetics/Icons/DittoHeadIconTexture.png";

		public override string StreamingPath => "LRCCosmetics.Assets.dittohead";

		public override CosmeticType cosmeticType => (CosmeticType)0;
	}
	public class EeveeHead : StreamCosmeticGeneric
	{
		public override string cosmeticId => "lrccosmetics.eeveehead";

		public override string gameObjectPath => "assets/LRCCosmetics/EeveeHead.prefab";

		public override string textureIconPath => "assets/LRCCosmetics/Icons/EeveeHeadIconTexture.png";

		public override string StreamingPath => "LRCCosmetics.Assets.eeveehead";

		public override CosmeticType cosmeticType => (CosmeticType)0;
	}
	public class FlareonHead : StreamCosmeticGeneric
	{
		public override string cosmeticId => "lrccosmetics.flareonhead";

		public override string gameObjectPath => "assets/LRCCosmetics/FlareonHead.prefab";

		public override string textureIconPath => "assets/LRCCosmetics/Icons/FlareonHeadIconTexture.png";

		public override string StreamingPath => "LRCCosmetics.Assets.flareonhead";

		public override CosmeticType cosmeticType => (CosmeticType)0;
	}
	public class GardevoirHead : StreamCosmeticGeneric
	{
		public override string cosmeticId => "lrccosmetics.gardevoirhead";

		public override string gameObjectPath => "assets/LRCCosmetics/GardevoirHead.prefab";

		public override string textureIconPath => "assets/LRCCosmetics/Icons/GardevoirHeadIconTexture.png";

		public override string StreamingPath => "LRCCosmetics.Assets.gardevoirhead";

		public override CosmeticType cosmeticType => (CosmeticType)0;
	}
	public class JolteonHead : StreamCosmeticGeneric
	{
		public override string cosmeticId => "lrccosmetics.jolteonhead";

		public override string gameObjectPath => "assets/LRCCosmetics/JolteonHead.prefab";

		public override string textureIconPath => "assets/LRCCosmetics/Icons/JolteonHeadIconTexture.png";

		public override string StreamingPath => "LRCCosmetics.Assets.jolteonhead";

		public override CosmeticType cosmeticType => (CosmeticType)0;
	}
	public class LegoSharkHeadBlue : StreamCosmeticGeneric
	{
		public override string cosmeticId => "lrccosmetics.legosharkbluehead";

		public override string gameObjectPath => "assets/LRCCosmetics/LegoSharkBlueHead.prefab";

		public override string textureIconPath => "assets/LRCCosmetics/Icons/LegoSharkBlueHeadIconTexture.png";

		public override string StreamingPath => "LRCCosmetics.Assets.legosharkbluehead";

		public override CosmeticType cosmeticType => (CosmeticType)0;
	}
	public class MeowscaradaHead : StreamCosmeticGeneric
	{
		public override string cosmeticId => "lrccosmetics.meowscaradahead";

		public override string gameObjectPath => "assets/LRCCosmetics/MeowscaradaHead.prefab";

		public override string textureIconPath => "assets/LRCCosmetics/Icons/MeowscaradaHeadIconTexture.png";

		public override string StreamingPath => "LRCCosmetics.Assets.meowscaradahead";

		public override CosmeticType cosmeticType => (CosmeticType)0;
	}
	public class MortyHead : StreamCosmeticGeneric
	{
		public override string cosmeticId => "lrccosmetics.mortyhead";

		public override string gameObjectPath => "assets/LRCCosmetics/MortyHead.prefab";

		public override string textureIconPath => "assets/LRCCosmetics/Icons/MortyHeadIconTexture.png";

		public override string StreamingPath => "LRCCosmetics.Assets.mortyhead";

		public override CosmeticType cosmeticType => (CosmeticType)0;
	}
	public class RickHead : StreamCosmeticGeneric
	{
		public override string cosmeticId => "lrccosmetics.rickhead";

		public override string gameObjectPath => "assets/LRCCosmetics/RickHead.prefab";

		public override string textureIconPath => "assets/LRCCosmetics/Icons/RickHeadIconTexture.png";

		public override string StreamingPath => "LRCCosmetics.Assets.rickhead";

		public override CosmeticType cosmeticType => (CosmeticType)0;
	}
	public abstract class StreamCosmeticGeneric : CosmeticGeneric
	{
		public virtual string StreamingPath => string.Empty;
	}
	public class VaporeonHead : StreamCosmeticGeneric
	{
		public override string cosmeticId => "lrccosmetics.vaporeonhead";

		public override string gameObjectPath => "assets/LRCCosmetics/VaporeonHead.prefab";

		public override string textureIconPath => "assets/LRCCosmetics/Icons/VaporeonHeadIconTexture.png";

		public override string StreamingPath => "LRCCosmetics.Assets.vaporeonhead";

		public override CosmeticType cosmeticType => (CosmeticType)0;
	}
	public class ZoruaHead : StreamCosmeticGeneric
	{
		public override string cosmeticId => "lrccosmetics.zoruahead";

		public override string gameObjectPath => "assets/LRCCosmetics/ZoruaHead.prefab";

		public override string textureIconPath => "assets/LRCCosmetics/Icons/ZoruaHeadIconTexture.png";

		public override string StreamingPath => "LRCCosmetics.Assets.zoruahead";

		public override CosmeticType cosmeticType => (CosmeticType)0;
	}
}

Cosmetics/Mhz-MoreHead_MoreHead.dll

Decompiled 10 months ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using MoreCompany.Cosmetics;
using MoreCompany.Utils;
using MoreHead.Cosmetics;
using MoreHead.MoreScript;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("MoreHead")]
[assembly: AssemblyDescription("A head mod")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MoreHead")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("011E6CD3-31C5-43C5-8681-EC192737BD7F")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8.1", FrameworkDisplayName = "")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace MoreHead
{
	[BepInPlugin("Mhz.MoreHead", "MoreHead", "1.2.2")]
	public class PluginOne : BaseUnityPlugin
	{
		private const string PluginGuid = "Mhz.MoreHead";

		private const string PluginName = "MoreHead";

		private const string PluginVersion = "1.2.2";

		private static Harmony _harmony;

		private void Awake()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Expected O, but got Unknown
			if (_harmony == null)
			{
				_harmony = new Harmony("Mhz.MoreHead");
				_harmony.PatchAll();
				((BaseUnityPlugin)this).Logger.LogInfo((object)"MoreHead OK");
				Init();
			}
		}

		private void Init()
		{
			List<StreamCosmeticGeneric> cosmetics = new List<StreamCosmeticGeneric>
			{
				new YanCao(),
				new FanYanCao(),
				new MaoTou(),
				new Zhutou(),
				new Caomaoer(),
				new Dalalala(),
				new Heshuimao(),
				new Xiguamao(),
				new PaydayMask(),
				new Shoulianer(),
				new Shoubiaoer(),
				new Heijiaobu(),
				new Shouhuaner(),
				new Mianzhaoer(),
				new Koushuibudou(),
				new Gegedetou(),
				new Yashuaer(),
				new Yuguagua(),
				new Doulimaoer_1(),
				new Doulimaoer_2(),
				new Baonuanmao(),
				new Wushidaoer(),
				new Qingwashubaoer()
			};
			LoadAssets(cosmetics);
		}

		private void LoadAssets(IEnumerable<StreamCosmeticGeneric> cosmetics)
		{
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			((BaseUnityPlugin)this).Logger.LogInfo((object)"MoreHead Asset OK");
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			foreach (StreamCosmeticGeneric cosmetic in cosmetics)
			{
				AssetBundle val = BundleUtilities.LoadBundleFromInternalAssembly(cosmetic.StreamingPath, executingAssembly);
				GameObject val2 = AssetBundleExtension.LoadPersistentAsset<GameObject>(val, ((CosmeticGeneric)cosmetic).gameObjectPath);
				if ((Object)(object)val2 == (Object)null)
				{
					((BaseUnityPlugin)this).Logger.LogError((object)("Failed to find GameObject for cosmetic '" + ((CosmeticGeneric)cosmetic).cosmeticId + "' at path '" + ((CosmeticGeneric)cosmetic).gameObjectPath + "'"));
					continue;
				}
				if (((CosmeticGeneric)cosmetic).cosmeticId == "morehead.fanxiangyan")
				{
					GameObject gameObject = ((Component)val2.transform.Find("cigarette/yan/yanlizi")).gameObject;
					if ((Object)(object)gameObject == (Object)null)
					{
						((BaseUnityPlugin)this).Logger.LogError((object)"No fanxiangyanlizi!");
					}
					else
					{
						gameObject.AddComponent<Huanse>();
						((BaseUnityPlugin)this).Logger.LogWarning((object)"fanxiangyanlizi ok.");
					}
				}
				Texture2D val3 = AssetBundleExtension.LoadPersistentAsset<Texture2D>(val, ((CosmeticGeneric)cosmetic).textureIconPath);
				if ((Object)(object)val3 == (Object)null)
				{
					((BaseUnityPlugin)this).Logger.LogError((object)("Failed to find icon Texture2D for cosmetic '" + ((CosmeticGeneric)cosmetic).cosmeticId + " at path '" + ((CosmeticGeneric)cosmetic).textureIconPath + "'"));
				}
				else
				{
					CosmeticInstance val4 = val2.AddComponent<CosmeticInstance>();
					val4.cosmeticId = ((CosmeticGeneric)cosmetic).cosmeticId;
					val4.icon = val3;
					val4.cosmeticType = ((CosmeticGeneric)cosmetic).cosmeticType;
					CosmeticRegistry.cosmeticInstances.Add(((CosmeticGeneric)cosmetic).cosmeticId, val4);
					((BaseUnityPlugin)this).Logger.LogInfo((object)("Successfully loaded cosmetic: " + ((CosmeticGeneric)cosmetic).cosmeticId));
				}
			}
		}
	}
}
namespace MoreHead.Cosmetics
{
	public abstract class StreamCosmeticGeneric : CosmeticGeneric
	{
		public virtual string StreamingPath => string.Empty;
	}
	public class YanCao : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.yan";

		public override string gameObjectPath => "Assets/MoreHead/Yan.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/YanTu.png";

		public override string StreamingPath => "morehead.more.yan1";
	}
	public class FanYanCao : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.fanxiangyan";

		public override string gameObjectPath => "Assets/MoreHead/Fanxiangyan.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Fanxiangyantu.png";

		public override string StreamingPath => "morehead.more.yan2";
	}
	public class MaoTou : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.cathead";

		public override string gameObjectPath => "Assets/MoreHead/CatHead.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Cattu.png";

		public override string StreamingPath => "morehead.more.cathead";
	}
	public class Zhutou : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.pighead";

		public override string gameObjectPath => "Assets/MoreHead/PigHead.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Zhutu.png";

		public override string StreamingPath => "morehead.more.pighead";
	}
	public class Caomaoer : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.caomao";

		public override string gameObjectPath => "Assets/MoreHead/CaoMao.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Caomaotu.png";

		public override string StreamingPath => "morehead.more.caomao";
	}
	public class Dalalala : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.xiangsuyanjing";

		public override string gameObjectPath => "Assets/MoreHead/YanJingEr.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Xiangsuyanjingtu.png";

		public override string StreamingPath => "morehead.more.yanjinger";
	}
	public class Heshuimao : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.shuimao";

		public override string gameObjectPath => "Assets/MoreHead/ShuiMao.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Shuimaotu.png";

		public override string StreamingPath => "morehead.more.shuimaoer";
	}
	public class Xiguamao : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.xiguatou";

		public override string gameObjectPath => "Assets/MoreHead/XiguaTou.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Xiguatu.png";

		public override string StreamingPath => "morehead.more.xiguanaodai";
	}
	public class PaydayMask : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.dallas";

		public override string gameObjectPath => "Assets/MoreHead/DallasMask.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Masktu.png";

		public override string StreamingPath => "morehead.more.paydaytou";
	}
	public class Shoulianer : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.shoulian";

		public override string gameObjectPath => "Assets/MoreHead/Shoulian.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Shouliantu.png";

		public override string StreamingPath => "morehead.more.shoulian";
	}
	public class Shoubiaoer : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.biao";

		public override string gameObjectPath => "Assets/MoreHead/Biao.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Biaotu.png";

		public override string StreamingPath => "morehead.more.shoubiao";
	}
	public class Heijiaobu : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.heiweijin";

		public override string gameObjectPath => "Assets/MoreHead/Heiweijin.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Heiweijintu.png";

		public override string StreamingPath => "morehead.more.dianjiaobu";
	}
	public class Shouhuaner : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.jinshouhuan";

		public override string gameObjectPath => "Assets/MoreHead/Jinshouhuan.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Jinshouhuantu.png";

		public override string StreamingPath => "morehead.more.jinshouhuan";
	}
	public class Mianzhaoer : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.mianzhao";

		public override string gameObjectPath => "Assets/MoreHead/Mianzhao.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Mianzhaotu.png";

		public override string StreamingPath => "morehead.more.mianzhao";
	}
	public class Koushuibudou : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.koushuibu";

		public override string gameObjectPath => "Assets/MoreHead/Koushuibu.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Koushuibutu.png";

		public override string StreamingPath => "morehead.more.koushuibudou";
	}
	public class Gegedetou : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.kunkuntou";

		public override string gameObjectPath => "Assets/MoreHead/Kuntou.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Kuntoutu.png";

		public override string StreamingPath => "morehead.more.jigetou";
	}
	public class Yashuaer : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.yashua";

		public override string gameObjectPath => "Assets/MoreHead/Yashuashuaya.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Yashuatu.png";

		public override string StreamingPath => "morehead.more.shuayaya";
	}
	public class Yuguagua : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.yuguaqi";

		public override string gameObjectPath => "Assets/MoreHead/Yugua.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Yuguatu.png";

		public override string StreamingPath => "morehead.more.yuguagua";
	}
	public class Doulimaoer_1 : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.douli1";

		public override string gameObjectPath => "Assets/MoreHead/Doulimao1.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Doulimaotu.png";

		public override string StreamingPath => "morehead.more.doulimao1";
	}
	public class Doulimaoer_2 : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.douli2";

		public override string gameObjectPath => "Assets/MoreHead/Doulimao2.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Doulimaotu.png";

		public override string StreamingPath => "morehead.more.doulimao2";
	}
	public class Baonuanmao : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.wula1";

		public override string gameObjectPath => "Assets/MoreHead/Wulamao1.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Wulamaotu.png";

		public override string StreamingPath => "morehead.more.wulamao1";
	}
	public class Wushidaoer : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.dao2077";

		public override string gameObjectPath => "Assets/MoreHead/Wushidao2077.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Dao2077tu.png";

		public override string StreamingPath => "morehead.more.dao2077";
	}
	public class Qingwashubaoer : StreamCosmeticGeneric
	{
		public override string cosmeticId => "morehead.wabao";

		public override string gameObjectPath => "Assets/MoreHead/Qingwashubao.prefab";

		public override string textureIconPath => "Assets/MoreHead/ICON/Wabeibaotu.png";

		public override string StreamingPath => "morehead.more.qingwabaobao";
	}
}
namespace MoreHead.MoreScript
{
	public class Huanse : MonoBehaviour
	{
		private ParticleSystem _particle;

		private void Start()
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			_particle = ((Component)this).GetComponent<ParticleSystem>();
			if ((Object)(object)_particle == (Object)null)
			{
				Debug.LogError((object)"NO ParticleSystem.");
				return;
			}
			MainModule main = _particle.main;
			Scene activeScene = SceneManager.GetActiveScene();
			if (((Scene)(ref activeScene)).name == "MainMenu")
			{
				Color val = default(Color);
				((Color)(ref val))..ctor(Random.Range(0f, 1f), Random.Range(0f, 1f), Random.Range(0f, 1f));
				((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(val);
				PlayerPrefs.SetString("SavedColor", ColorUtility.ToHtmlStringRGB(val));
				PlayerPrefs.Save();
			}
			else
			{
				string @string = PlayerPrefs.GetString("SavedColor", "");
				if (!string.IsNullOrEmpty(@string))
				{
					@string = "#" + @string;
					Color val2 = default(Color);
					((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(ColorUtility.TryParseHtmlString(@string, ref val2) ? val2 : Color.yellow);
				}
			}
			MinMaxGradient startColor = ((MainModule)(ref main)).startColor;
			Debug.LogWarning((object)((MinMaxGradient)(ref startColor)).color);
		}
	}
}

Cosmetics/Sai-SaiCosmetics_SaiCosmetics.dll

Decompiled 10 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using MoreCompany.Cosmetics;
using MoreCompany.Utils;
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 = "")]
[assembly: AssemblyCompany("SaiCosmetics")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SaiCosmetics")]
[assembly: AssemblyTitle("SaiCosmetics")]
[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 SaiCosmetics
{
	public class Dance : SaiCosmeticGeneric
	{
		public override string BundleName => "Dance";

		public override string BundlePath => "SaiCosmetics.dance";

		public override string cosmeticId => "sai.Dance";

		public CosmeticType cosType => (CosmeticType)0;
	}
	public class Doug : SaiCosmeticGeneric
	{
		public override string BundleName => "Doug";

		public override string BundlePath => "SaiCosmetics.doug";

		public override string cosmeticId => "sai.doug";

		public CosmeticType cosType => (CosmeticType)0;
	}
	public class Kid : SaiCosmeticGeneric
	{
		public override string BundleName => "kid";

		public override string BundlePath => "SaiCosmetics.kid";

		public override string cosmeticId => "sai.kid";

		public CosmeticType cosType => (CosmeticType)0;
	}
	[BepInPlugin("Sai.SaiCosmetics", "Sai's Bullshit Cosmetics", "1.1.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		private static Harmony _harmony;

		private bool _initialized;

		private void Awake()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			if (_harmony == null)
			{
				_harmony = new Harmony("Sai.SaiCosmetics");
			}
			_harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin SaiCosmetics is loaded!");
			LoadAssets();
		}

		private void LoadAssets()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loading assets for SaiCosmetics");
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			if (executingAssembly == null)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)"Failed to get assembly.");
			}
			Type[] types = executingAssembly.GetTypes();
			foreach (Type type in types)
			{
				if (!(type == null) && type.IsSubclassOf(typeof(SaiCosmeticGeneric)))
				{
					((BaseUnityPlugin)this).Logger.LogInfo((object)$"Loading cosmetic: {type}");
					SaiCosmeticGeneric streamCosmeticGeneric2 = (SaiCosmeticGeneric)Activator.CreateInstance(type);
					loadBundle(streamCosmeticGeneric2);
				}
			}
			void loadBundle(SaiCosmeticGeneric streamCosmeticGeneric)
			{
				//IL_0090: Unknown result type (might be due to invalid IL or missing references)
				//IL_0095: Unknown result type (might be due to invalid IL or missing references)
				AssetBundle val = BundleUtilities.LoadBundleFromInternalAssembly(streamCosmeticGeneric.BundlePath, executingAssembly);
				GameObject val2 = AssetBundleExtension.LoadPersistentAsset<GameObject>(val, streamCosmeticGeneric.BundleName + ".prefab");
				if ((Object)(object)val2 == (Object)null)
				{
					((BaseUnityPlugin)this).Logger.LogError((object)("Failed to find GameObject for cosmetic '" + ((CosmeticGeneric)streamCosmeticGeneric).cosmeticId + "' at path '" + ((CosmeticGeneric)streamCosmeticGeneric).gameObjectPath + "'"));
				}
				else
				{
					CosmeticInstance component = val2.GetComponent<CosmeticInstance>();
					component.cosmeticId = ((CosmeticGeneric)streamCosmeticGeneric).cosmeticId;
					component.cosmeticType = streamCosmeticGeneric.CosType;
					CosmeticRegistry.cosmeticInstances.Add(((CosmeticGeneric)streamCosmeticGeneric).cosmeticId, component);
					((BaseUnityPlugin)this).Logger.LogInfo((object)("Successfully loaded cosmetic: " + ((CosmeticGeneric)streamCosmeticGeneric).cosmeticId));
				}
			}
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_ID = "SaiCosmetics";

		public const string PLUGIN_NAME = "Sai's Bullshit Cosmetics";

		public const string PLUGIN_VERSION = "1.1.0";

		public const string PLUGIN_GUID = "Sai.SaiCosmetics";
	}
	public class Rao : SaiCosmeticGeneric
	{
		public override string BundleName => "rao";

		public override string BundlePath => "SaiCosmetics.rao";

		public override string cosmeticId => "sai.rao";

		public CosmeticType cosType => (CosmeticType)0;
	}
	public class Rat : SaiCosmeticGeneric
	{
		public override string BundleName => "rat";

		public override string BundlePath => "SaiCosmetics.rat";

		public override string cosmeticId => "sai.rat";

		public CosmeticType cosType => (CosmeticType)0;
	}
	public class SaiCosmeticGeneric : CosmeticGeneric
	{
		public CosmeticType CosType;

		public virtual string BundleName { get; }

		public virtual string BundlePath { get; }
	}
	public class ShyGuy : SaiCosmeticGeneric
	{
		public override string BundleName => "ShyGuy";

		public override string BundlePath => "SaiCosmetics.shyguy";

		public override string cosmeticId => "sai.Shy";

		public CosmeticType cosType => (CosmeticType)0;
	}
}