Decompiled source of GameCentersOfficialModelsMod v0.9.0

FrienModels.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("FrienModels")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("FrienModels")]
[assembly: AssemblyTitle("FrienModels")]
[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 Venti : BodyReplacementBase
	{
		private static int crouchFrameTimer;

		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Venti";
			GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>(text);
			if ((Object)(object)val == (Object)null)
			{
				Debug.Log((object)"Load Fail: Venti");
			}
			else
			{
				Debug.Log((object)"Venti Loaded");
			}
			return val;
		}

		protected override void OnEmoteStart(int emoteId)
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			if (emoteId == 1)
			{
				material.SetFloat("_Index", 3f);
			}
			else
			{
				material.SetFloat("_Index", 0f);
			}
		}

		protected override void OnEmoteEnd()
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			material.SetFloat("_Index", 0f);
		}

		public override void LateUpdate()
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			((BodyReplacementBase)this).LateUpdate();
			if (((BodyReplacementBase)this).controller.isPlayerDead)
			{
				material.SetFloat("_Index", 4f);
			}
			else if (((BodyReplacementBase)this).controller.criticallyInjured)
			{
				material.SetFloat("_Index", 6f);
			}
			else if (((BodyReplacementBase)this).controller.insanityLevel > ((BodyReplacementBase)this).controller.maxInsanityLevel / 1.5f)
			{
				material.SetFloat("_Index", 2f);
			}
			else if (((BodyReplacementBase)this).controller.playersManager.fearLevel >= 0.8f)
			{
				material.SetFloat("_Index", 13f);
			}
			else if (((BodyReplacementBase)this).controller.isExhausted)
			{
				material.SetFloat("_Index", 1f);
			}
			else if (((BodyReplacementBase)this).controller.isSinking)
			{
				material.SetFloat("_Index", 5f);
			}
			else if (((BodyReplacementBase)this).controller.isCrouching && ((BodyReplacementBase)this).controller.health <= 75)
			{
				crouchFrameTimer++;
				if (crouchFrameTimer >= 0 && crouchFrameTimer < 20)
				{
					material.SetFloat("_Index", 10f);
				}
				else if (crouchFrameTimer >= 20 && crouchFrameTimer < 25)
				{
					material.SetFloat("_Index", 11f);
				}
				else if (crouchFrameTimer >= 25 && crouchFrameTimer < 45)
				{
					material.SetFloat("_Index", 12f);
				}
				else if (crouchFrameTimer >= 45 && crouchFrameTimer < 50)
				{
					material.SetFloat("_Index", 11f);
				}
				else if (crouchFrameTimer >= 50 || crouchFrameTimer < 0)
				{
					crouchFrameTimer = 0;
					material.SetFloat("_Index", 10f);
				}
			}
			else if (((BodyReplacementBase)this).controller.isCrouching && ((BodyReplacementBase)this).controller.health > 75)
			{
				crouchFrameTimer++;
				if (crouchFrameTimer >= 0 && crouchFrameTimer < 20)
				{
					material.SetFloat("_Index", 7f);
				}
				else if (crouchFrameTimer >= 20 && crouchFrameTimer < 25)
				{
					material.SetFloat("_Index", 8f);
				}
				else if (crouchFrameTimer >= 25 && crouchFrameTimer < 45)
				{
					material.SetFloat("_Index", 9f);
				}
				else if (crouchFrameTimer >= 45 && crouchFrameTimer < 50)
				{
					material.SetFloat("_Index", 8f);
				}
				else if (crouchFrameTimer >= 50 || crouchFrameTimer < 0)
				{
					crouchFrameTimer = 0;
					material.SetFloat("_Index", 7f);
				}
			}
			else if (material.GetFloat("_Index") != 3f)
			{
				material.SetFloat("_Index", 0f);
			}
		}
	}
	public class Silver : BodyReplacementBase
	{
		private static int crouchFrameTimer;

		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Silver";
			GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>(text);
			if ((Object)(object)val == (Object)null)
			{
				Debug.Log((object)"Load Fail: Silver");
			}
			else
			{
				Debug.Log((object)"Silver Loaded");
			}
			return val;
		}

		protected override void OnEmoteStart(int emoteId)
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			if (emoteId == 1)
			{
				material.SetFloat("_Index", 3f);
			}
			else
			{
				material.SetFloat("_Index", 0f);
			}
		}

		protected override void OnEmoteEnd()
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			material.SetFloat("_Index", 0f);
		}

		public override void LateUpdate()
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			((BodyReplacementBase)this).LateUpdate();
			if (((BodyReplacementBase)this).controller.isPlayerDead)
			{
				material.SetFloat("_Index", 4f);
			}
			else if (((BodyReplacementBase)this).controller.criticallyInjured)
			{
				material.SetFloat("_Index", 6f);
			}
			else if (((BodyReplacementBase)this).controller.insanityLevel > ((BodyReplacementBase)this).controller.maxInsanityLevel / 1.5f)
			{
				material.SetFloat("_Index", 2f);
			}
			else if (((BodyReplacementBase)this).controller.playersManager.fearLevel >= 0.8f)
			{
				material.SetFloat("_Index", 13f);
			}
			else if (((BodyReplacementBase)this).controller.isExhausted)
			{
				material.SetFloat("_Index", 1f);
			}
			else if (((BodyReplacementBase)this).controller.isSinking)
			{
				material.SetFloat("_Index", 5f);
			}
			else if (((BodyReplacementBase)this).controller.isCrouching && ((BodyReplacementBase)this).controller.health <= 75)
			{
				crouchFrameTimer++;
				if (crouchFrameTimer >= 0 && crouchFrameTimer < 20)
				{
					material.SetFloat("_Index", 10f);
				}
				else if (crouchFrameTimer >= 20 && crouchFrameTimer < 25)
				{
					material.SetFloat("_Index", 11f);
				}
				else if (crouchFrameTimer >= 25 && crouchFrameTimer < 45)
				{
					material.SetFloat("_Index", 12f);
				}
				else if (crouchFrameTimer >= 45 && crouchFrameTimer < 50)
				{
					material.SetFloat("_Index", 11f);
				}
				else if (crouchFrameTimer >= 50 || crouchFrameTimer < 0)
				{
					crouchFrameTimer = 0;
					material.SetFloat("_Index", 10f);
				}
			}
			else if (((BodyReplacementBase)this).controller.isCrouching && ((BodyReplacementBase)this).controller.health > 75)
			{
				crouchFrameTimer++;
				if (crouchFrameTimer >= 0 && crouchFrameTimer < 20)
				{
					material.SetFloat("_Index", 7f);
				}
				else if (crouchFrameTimer >= 20 && crouchFrameTimer < 25)
				{
					material.SetFloat("_Index", 8f);
				}
				else if (crouchFrameTimer >= 25 && crouchFrameTimer < 45)
				{
					material.SetFloat("_Index", 9f);
				}
				else if (crouchFrameTimer >= 45 && crouchFrameTimer < 50)
				{
					material.SetFloat("_Index", 8f);
				}
				else if (crouchFrameTimer >= 50 || crouchFrameTimer < 0)
				{
					crouchFrameTimer = 0;
					material.SetFloat("_Index", 7f);
				}
			}
			else if (material.GetFloat("_Index") != 3f)
			{
				material.SetFloat("_Index", 0f);
			}
		}
	}
	public class Zak : BodyReplacementBase
	{
		private static int crouchFrameTimer;

		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Zak";
			GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>(text);
			if ((Object)(object)val == (Object)null)
			{
				Debug.Log((object)"Load Fail: Zak");
			}
			else
			{
				Debug.Log((object)"Zak Loaded!");
			}
			return val;
		}

		protected override void OnEmoteStart(int emoteId)
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			if (emoteId == 1)
			{
				material.SetFloat("_Index", 3f);
			}
			else
			{
				material.SetFloat("_Index", 0f);
			}
		}

		protected override void OnEmoteEnd()
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			material.SetFloat("_Index", 0f);
		}

		public override void LateUpdate()
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			((BodyReplacementBase)this).LateUpdate();
			if (((BodyReplacementBase)this).controller.isPlayerDead)
			{
				material.SetFloat("_Index", 4f);
			}
			else if (((BodyReplacementBase)this).controller.criticallyInjured)
			{
				material.SetFloat("_Index", 6f);
			}
			else if (((BodyReplacementBase)this).controller.insanityLevel > ((BodyReplacementBase)this).controller.maxInsanityLevel / 1.5f)
			{
				material.SetFloat("_Index", 2f);
			}
			else if (((BodyReplacementBase)this).controller.playersManager.fearLevel >= 0.8f)
			{
				material.SetFloat("_Index", 13f);
			}
			else if (((BodyReplacementBase)this).controller.isExhausted)
			{
				material.SetFloat("_Index", 1f);
			}
			else if (((BodyReplacementBase)this).controller.isSinking)
			{
				material.SetFloat("_Index", 5f);
			}
			else if (((BodyReplacementBase)this).controller.isCrouching && ((BodyReplacementBase)this).controller.health <= 75)
			{
				crouchFrameTimer++;
				if (crouchFrameTimer >= 0 && crouchFrameTimer < 20)
				{
					material.SetFloat("_Index", 10f);
				}
				else if (crouchFrameTimer >= 20 && crouchFrameTimer < 25)
				{
					material.SetFloat("_Index", 11f);
				}
				else if (crouchFrameTimer >= 25 && crouchFrameTimer < 45)
				{
					material.SetFloat("_Index", 12f);
				}
				else if (crouchFrameTimer >= 45 && crouchFrameTimer < 50)
				{
					material.SetFloat("_Index", 11f);
				}
				else if (crouchFrameTimer >= 50 || crouchFrameTimer < 0)
				{
					crouchFrameTimer = 0;
					material.SetFloat("_Index", 10f);
				}
			}
			else if (((BodyReplacementBase)this).controller.isCrouching && ((BodyReplacementBase)this).controller.health > 75)
			{
				crouchFrameTimer++;
				if (crouchFrameTimer >= 0 && crouchFrameTimer < 20)
				{
					material.SetFloat("_Index", 7f);
				}
				else if (crouchFrameTimer >= 20 && crouchFrameTimer < 25)
				{
					material.SetFloat("_Index", 8f);
				}
				else if (crouchFrameTimer >= 25 && crouchFrameTimer < 45)
				{
					material.SetFloat("_Index", 9f);
				}
				else if (crouchFrameTimer >= 45 && crouchFrameTimer < 50)
				{
					material.SetFloat("_Index", 8f);
				}
				else if (crouchFrameTimer >= 50 || crouchFrameTimer < 0)
				{
					crouchFrameTimer = 0;
					material.SetFloat("_Index", 7f);
				}
			}
			else if (material.GetFloat("_Index") != 3f)
			{
				material.SetFloat("_Index", 0f);
			}
		}
	}
	public class BearCave : BodyReplacementBase
	{
		private static int crouchFrameTimer;

		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "BearCave";
			GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>(text);
			if ((Object)(object)val == (Object)null)
			{
				Debug.Log((object)"Load Fail: BearCave");
			}
			else
			{
				Debug.Log((object)"BearCave Loaded");
			}
			return val;
		}

		protected override void OnEmoteStart(int emoteId)
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			if (emoteId == 1)
			{
				material.SetFloat("_Index", 3f);
			}
			else
			{
				material.SetFloat("_Index", 0f);
			}
		}

		protected override void OnEmoteEnd()
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			material.SetFloat("_Index", 0f);
		}

		public override void LateUpdate()
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			((BodyReplacementBase)this).LateUpdate();
			if (((BodyReplacementBase)this).controller.isPlayerDead)
			{
				material.SetFloat("_Index", 4f);
			}
			else if (((BodyReplacementBase)this).controller.criticallyInjured)
			{
				material.SetFloat("_Index", 6f);
			}
			else if (((BodyReplacementBase)this).controller.insanityLevel > ((BodyReplacementBase)this).controller.maxInsanityLevel / 1.5f)
			{
				material.SetFloat("_Index", 2f);
			}
			else if (((BodyReplacementBase)this).controller.playersManager.fearLevel >= 0.8f)
			{
				material.SetFloat("_Index", 13f);
			}
			else if (((BodyReplacementBase)this).controller.isExhausted)
			{
				material.SetFloat("_Index", 1f);
			}
			else if (((BodyReplacementBase)this).controller.isSinking)
			{
				material.SetFloat("_Index", 5f);
			}
			else if (((BodyReplacementBase)this).controller.isCrouching && ((BodyReplacementBase)this).controller.health <= 75)
			{
				crouchFrameTimer++;
				if (crouchFrameTimer >= 0 && crouchFrameTimer < 20)
				{
					material.SetFloat("_Index", 10f);
				}
				else if (crouchFrameTimer >= 20 && crouchFrameTimer < 25)
				{
					material.SetFloat("_Index", 11f);
				}
				else if (crouchFrameTimer >= 25 && crouchFrameTimer < 45)
				{
					material.SetFloat("_Index", 12f);
				}
				else if (crouchFrameTimer >= 45 && crouchFrameTimer < 50)
				{
					material.SetFloat("_Index", 11f);
				}
				else if (crouchFrameTimer >= 50 || crouchFrameTimer < 0)
				{
					crouchFrameTimer = 0;
					material.SetFloat("_Index", 10f);
				}
			}
			else if (((BodyReplacementBase)this).controller.isCrouching && ((BodyReplacementBase)this).controller.health > 75)
			{
				crouchFrameTimer++;
				if (crouchFrameTimer >= 0 && crouchFrameTimer < 20)
				{
					material.SetFloat("_Index", 7f);
				}
				else if (crouchFrameTimer >= 20 && crouchFrameTimer < 25)
				{
					material.SetFloat("_Index", 8f);
				}
				else if (crouchFrameTimer >= 25 && crouchFrameTimer < 45)
				{
					material.SetFloat("_Index", 9f);
				}
				else if (crouchFrameTimer >= 45 && crouchFrameTimer < 50)
				{
					material.SetFloat("_Index", 8f);
				}
				else if (crouchFrameTimer >= 50 || crouchFrameTimer < 0)
				{
					crouchFrameTimer = 0;
					material.SetFloat("_Index", 7f);
				}
			}
			else if (material.GetFloat("_Index") != 3f)
			{
				material.SetFloat("_Index", 0f);
			}
		}
	}
	public class Viv : BodyReplacementBase
	{
		private static int crouchFrameTimer;

		protected override GameObject LoadAssetsAndReturnModel()
		{
			string text = "Viv";
			GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>(text);
			if ((Object)(object)val == (Object)null)
			{
				Debug.Log((object)"Load Fail: Viv");
			}
			else
			{
				Debug.Log((object)"Viv Loaded!");
			}
			return val;
		}

		protected override void OnEmoteStart(int emoteId)
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			if (emoteId == 1)
			{
				material.SetFloat("_Index", 3f);
			}
			else
			{
				material.SetFloat("_Index", 0f);
			}
		}

		protected override void OnEmoteEnd()
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			material.SetFloat("_Index", 0f);
		}

		public override void LateUpdate()
		{
			Transform val = base.replacementModel.transform.Find("Plane");
			Material material = ((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).material;
			((BodyReplacementBase)this).LateUpdate();
			if (((BodyReplacementBase)this).controller.isPlayerDead)
			{
				material.SetFloat("_Index", 4f);
			}
			else if (((BodyReplacementBase)this).controller.criticallyInjured)
			{
				material.SetFloat("_Index", 6f);
			}
			else if (((BodyReplacementBase)this).controller.insanityLevel > ((BodyReplacementBase)this).controller.maxInsanityLevel / 1.5f)
			{
				material.SetFloat("_Index", 2f);
			}
			else if (((BodyReplacementBase)this).controller.playersManager.fearLevel >= 0.8f)
			{
				material.SetFloat("_Index", 13f);
			}
			else if (((BodyReplacementBase)this).controller.isExhausted)
			{
				material.SetFloat("_Index", 1f);
			}
			else if (((BodyReplacementBase)this).controller.isSinking)
			{
				material.SetFloat("_Index", 5f);
			}
			else if (((BodyReplacementBase)this).controller.isCrouching && ((BodyReplacementBase)this).controller.health <= 75)
			{
				crouchFrameTimer++;
				if (crouchFrameTimer >= 0 && crouchFrameTimer < 20)
				{
					material.SetFloat("_Index", 10f);
				}
				else if (crouchFrameTimer >= 20 && crouchFrameTimer < 25)
				{
					material.SetFloat("_Index", 11f);
				}
				else if (crouchFrameTimer >= 25 && crouchFrameTimer < 45)
				{
					material.SetFloat("_Index", 12f);
				}
				else if (crouchFrameTimer >= 45 && crouchFrameTimer < 50)
				{
					material.SetFloat("_Index", 11f);
				}
				else if (crouchFrameTimer >= 50 || crouchFrameTimer < 0)
				{
					crouchFrameTimer = 0;
					material.SetFloat("_Index", 10f);
				}
			}
			else if (((BodyReplacementBase)this).controller.isCrouching && ((BodyReplacementBase)this).controller.health > 75)
			{
				crouchFrameTimer++;
				if (crouchFrameTimer >= 0 && crouchFrameTimer < 20)
				{
					material.SetFloat("_Index", 7f);
				}
				else if (crouchFrameTimer >= 20 && crouchFrameTimer < 25)
				{
					material.SetFloat("_Index", 8f);
				}
				else if (crouchFrameTimer >= 25 && crouchFrameTimer < 45)
				{
					material.SetFloat("_Index", 9f);
				}
				else if (crouchFrameTimer >= 45 && crouchFrameTimer < 50)
				{
					material.SetFloat("_Index", 8f);
				}
				else if (crouchFrameTimer >= 50 || crouchFrameTimer < 0)
				{
					crouchFrameTimer = 0;
					material.SetFloat("_Index", 7f);
				}
			}
			else if (material.GetFloat("_Index") != 3f)
			{
				material.SetFloat("_Index", 0f);
			}
		}
	}
	[BepInPlugin("com.gamecenter.voxelmodelsforfriends", "VoxelModelsForFriends", "0.9.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		private void Awake()
		{
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Expected O, but got Unknown
			Assets.PopulateAssets();
			ModelReplacementAPI.RegisterSuitModelReplacement("Venti", typeof(Venti));
			ModelReplacementAPI.RegisterSuitModelReplacement("Silver", typeof(Silver));
			ModelReplacementAPI.RegisterSuitModelReplacement("Zak", typeof(Zak));
			ModelReplacementAPI.RegisterSuitModelReplacement("BearCave", typeof(BearCave));
			ModelReplacementAPI.RegisterSuitModelReplacement("Viv", typeof(Viv));
			Harmony val = new Harmony("com.gamecenter.voxelmodelsforfriends");
			val.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin com.gamecenter.voxelmodelsforfriends is loaded!");
		}
	}
	public static class Assets
	{
		public static string mainAssetBundleName = "FriendModels";

		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);
				MainAssetBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "FriendModels"));
			}
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}