Decompiled source of EyelessDogWalterJumpscare v1.1.0

fayemod.dll

Decompiled 8 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.UI;
using fayemod.Patches;

[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: AssemblyCompany("fayemod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("fayemod")]
[assembly: AssemblyTitle("fayemod")]
[assembly: AssemblyVersion("1.0.0.0")]
[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.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;
		}
	}
	[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;
		}
	}
}
internal static class logger
{
	internal static ManualLogSource logSource;

	public static void Initialize(string modGUID)
	{
		logSource = Logger.CreateLogSource(modGUID);
	}

	public static void Log(object message)
	{
		logSource.LogInfo(message);
	}

	public static void LogError(object message)
	{
		logSource.LogError(message);
	}

	public static void LogWarning(object message)
	{
		logSource.LogWarning(message);
	}
}
public static class AssetBundleExtension
{
	public static T LoadPersistentAsset<T>(this AssetBundle bundle, string name) where T : Object
	{
		Object val = bundle.LoadAsset(name);
		if (val != (Object)null)
		{
			val.hideFlags = (HideFlags)32;
			return (T)(object)val;
		}
		return default(T);
	}
}
internal static class ReflectionUtils
{
	public static T GetPrivateField<T>(this object obj, string field)
	{
		return (T)obj.GetType().GetField(field, BindingFlags.Instance | BindingFlags.NonPublic).GetValue(obj);
	}
}
namespace fayemod
{
	[BepInPlugin("faye.fayemod", "EyelessDogJumpscare", "1.1.0")]
	public class fayemodbase : BaseUnityPlugin
	{
		private const string modGUID = "faye.fayemod";

		private const string modName = "EyelessDogJumpscare";

		private const string modVersion = "1.1.0";

		private readonly Harmony harmony = new Harmony("faye.fayemod");

		public static fayemodbase? Instance;

		public static AudioClip? SoundFX;

		public static Texture2D? image1;

		public static Texture2D? image2;

		public static Texture2D? image3;

		public static Texture2D? image4;

		public static Texture2D? image5;

		public static Texture2D? image6;

		public static Texture2D? image7;

		public static ConfigEntry<bool> DynamicImageScaling;

		public static ConfigEntry<bool> DoRandomImages;

		public static void PlayAudioClip(GameObject gameObject, AudioClip audioClip)
		{
			AudioSource val = gameObject.AddComponent<AudioSource>();
			val.volume = 1f;
			val.clip = audioClip;
			val.Play();
		}

		public void NullCheck(object asset)
		{
			if (asset == null)
			{
				logger.LogError("asset is null!");
			}
			else
			{
				logger.Log("asset is " + asset);
			}
		}

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			DoRandomImages = ((BaseUnityPlugin)this).Config.Bind<bool>("EyelessDogWalter", "Random Images", true, "Every death will display a random image I could find. Turning this off defaults to the main image.");
			DynamicImageScaling = ((BaseUnityPlugin)this).Config.Bind<bool>("EyelessDogWalter", "Dynamic Image Scaling", false, "Enables/Disables Dynamic Image Scaling (this means images can resize with the window in-game) i suck at coding so i probably made it run like penis so disable if you have performance issues it might be my bad sory :(");
			logger.Initialize("faye.EyelessDogJumpscare 1.1.0");
			logger.Log("trans rights are human rights!!!");
			string location = ((BaseUnityPlugin)Instance).Info.Location;
			string text = "fayemod.dll";
			string text2 = location.TrimEnd(text.ToCharArray());
			string text3 = text2 + "fayemodobj";
			AssetBundle val = AssetBundle.LoadFromFile(text3);
			if ((Object)(object)val == (Object)null)
			{
				logger.LogError("Failed to load 'fayemodobj' AssetBundle!! :(");
				return;
			}
			image1 = val.LoadPersistentAsset<Texture2D>("assets/image1.png");
			image2 = val.LoadPersistentAsset<Texture2D>("assets/image2.png");
			image3 = val.LoadPersistentAsset<Texture2D>("assets/image3.png");
			image4 = val.LoadPersistentAsset<Texture2D>("assets/image4.png");
			image5 = val.LoadPersistentAsset<Texture2D>("assets/image5.png");
			image6 = val.LoadPersistentAsset<Texture2D>("assets/image6.png");
			image7 = val.LoadPersistentAsset<Texture2D>("assets/image7.jpg");
			Object obj = val.LoadAsset("assets/vine_boom.wav");
			SoundFX = (AudioClip?)(object)((obj is AudioClip) ? obj : null);
			NullCheck(image1);
			NullCheck(image2);
			NullCheck(image3);
			NullCheck(image4);
			NullCheck(image5);
			NullCheck(image6);
			NullCheck(image7);
			NullCheck(SoundFX);
			harmony.PatchAll(typeof(StartOfRoundPatch));
			harmony.PatchAll(typeof(MouthDogPatch));
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "fayemod";

		public const string PLUGIN_NAME = "fayemod";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}
namespace fayemod.Patches
{
	internal class MouthDogPatch
	{
		public static bool running = false;

		public static float alpha = 1f;

		public static float changePerSecond = 0.6f;

		public static bool PlayerDead = false;

		public static ulong PlayerID;

		public static string[] array = new string[7] { "Image1", "Image2", "Image3", "Image4", "Image5", "Image6", "Image7" };

		[HarmonyPatch(typeof(MouthDogAI), "Update")]
		[HarmonyPostfix]
		private static void MouthDogMain(ref MouthDogAI __instance)
		{
			GameObject gameObject = ((Component)((Component)__instance).transform).gameObject;
			GameObject gameObject2 = ((Component)gameObject.transform.Find("/Systems").Find("UI").Find("Canvas")
				.Find("Images")).gameObject;
			logger.Log(alpha);
			if (alpha == 0f)
			{
				gameObject2.SetActive(false);
				if (fayemodbase.DoRandomImages.Value)
				{
					((Component)gameObject2.transform.Find("Image1")).gameObject.SetActive(false);
					((Component)gameObject2.transform.Find("Image2")).gameObject.SetActive(false);
					((Component)gameObject2.transform.Find("Image3")).gameObject.SetActive(false);
					((Component)gameObject2.transform.Find("Image4")).gameObject.SetActive(false);
					((Component)gameObject2.transform.Find("Image5")).gameObject.SetActive(false);
					((Component)gameObject2.transform.Find("Image6")).gameObject.SetActive(false);
					((Component)gameObject2.transform.Find("Image7")).gameObject.SetActive(false);
				}
				else
				{
					((Component)gameObject2.transform.Find("Image6")).gameObject.SetActive(false);
				}
			}
			if (PlayerDead)
			{
				if (fayemodbase.DoRandomImages.Value)
				{
					Random random = new Random();
					int num = random.Next(array.Length);
					string text = array[num];
					GameObject gameObject3 = ((Component)gameObject2.transform.Find(text)).gameObject;
					gameObject3.SetActive(true);
				}
				else
				{
					GameObject gameObject4 = ((Component)gameObject2.transform.Find("Image6")).gameObject;
					gameObject4.SetActive(true);
				}
				logger.Log("Displaying Walter");
				gameObject2.SetActive(true);
				alpha = 1f;
				running = true;
				PlayerDead = false;
				fayemodbase.PlayAudioClip(gameObject2, fayemodbase.SoundFX);
				return;
			}
			if (!running)
			{
				if (alpha > 0f)
				{
					alpha -= changePerSecond * Time.deltaTime;
				}
				else
				{
					alpha = 0f;
				}
			}
			running = false;
			gameObject2.GetComponent<CanvasGroup>().alpha = alpha;
		}

		[HarmonyPatch(typeof(MouthDogAI), "KillPlayer")]
		[HarmonyPostfix]
		public static void OnPlayerDeathEvent(MouthDogAI __instance)
		{
			bool flag = true;
			PlayerDead = true;
			logger.Log("Player is dead!");
			bool flag2 = false;
		}
	}
	internal class StartOfRoundPatch
	{
		[HarmonyPatch(typeof(StartOfRound), "Start")]
		[HarmonyPostfix]
		public static void GOLoader(StartOfRound __instance)
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Expected O, but got Unknown
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ae: Expected O, but got Unknown
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0300: Unknown result type (might be due to invalid IL or missing references)
			//IL_0312: Unknown result type (might be due to invalid IL or missing references)
			//IL_0317: Unknown result type (might be due to invalid IL or missing references)
			//IL_032e: Unknown result type (might be due to invalid IL or missing references)
			//IL_036d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0378: Unknown result type (might be due to invalid IL or missing references)
			//IL_037f: Expected O, but got Unknown
			//IL_03cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0400: Unknown result type (might be due to invalid IL or missing references)
			//IL_043f: Unknown result type (might be due to invalid IL or missing references)
			//IL_044a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0451: Expected O, but got Unknown
			//IL_049f: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0511: Unknown result type (might be due to invalid IL or missing references)
			//IL_051c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0523: Expected O, but got Unknown
			//IL_0571: Unknown result type (might be due to invalid IL or missing references)
			//IL_0576: Unknown result type (might be due to invalid IL or missing references)
			//IL_0588: Unknown result type (might be due to invalid IL or missing references)
			//IL_058d: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f5: Expected O, but got Unknown
			//IL_0643: Unknown result type (might be due to invalid IL or missing references)
			//IL_0648: Unknown result type (might be due to invalid IL or missing references)
			//IL_065a: Unknown result type (might be due to invalid IL or missing references)
			//IL_065f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0676: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c7: Expected O, but got Unknown
			//IL_0715: Unknown result type (might be due to invalid IL or missing references)
			//IL_071a: Unknown result type (might be due to invalid IL or missing references)
			//IL_072c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0731: Unknown result type (might be due to invalid IL or missing references)
			//IL_0748: Unknown result type (might be due to invalid IL or missing references)
			//IL_0787: Unknown result type (might be due to invalid IL or missing references)
			//IL_0792: Unknown result type (might be due to invalid IL or missing references)
			//IL_0799: Expected O, but got Unknown
			//IL_07e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0803: Unknown result type (might be due to invalid IL or missing references)
			//IL_081a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0859: Unknown result type (might be due to invalid IL or missing references)
			float num = (float)Screen.width * 0.11111f;
			float num2 = (float)Screen.width / num;
			float num3 = (float)Screen.height / num;
			Sprite val = Sprite.Create(fayemodbase.image1, new Rect(0f, 0f, 492f, 366f), new Vector2(0f, 0f));
			((Object)val).name = "Image1Overlay";
			Sprite val2 = Sprite.Create(fayemodbase.image2, new Rect(0f, 0f, 953f, 532f), new Vector2(0f, 0f));
			((Object)val2).name = "Image2Overlay";
			Sprite val3 = Sprite.Create(fayemodbase.image3, new Rect(0f, 0f, 563f, 562f), new Vector2(0f, 0f));
			((Object)val3).name = "Image3Overlay";
			Sprite val4 = Sprite.Create(fayemodbase.image4, new Rect(0f, 0f, 195f, 258f), new Vector2(0f, 0f));
			((Object)val4).name = "Image4Overlay";
			Sprite val5 = Sprite.Create(fayemodbase.image5, new Rect(0f, 0f, 555f, 474f), new Vector2(0f, 0f));
			((Object)val5).name = "Image5Overlay";
			Sprite val6 = Sprite.Create(fayemodbase.image6, new Rect(0f, 0f, 1280f, 1280f), new Vector2(0f, 0f));
			((Object)val6).name = "Image6Overlay";
			Sprite sprite = Sprite.Create(fayemodbase.image7, new Rect(0f, 0f, 1400f, 1815f), new Vector2(0f, 0f));
			((Object)val6).name = "Image7Overlay";
			GameObject gameObject = ((Component)((Component)__instance).transform.parent).gameObject;
			GameObject gameObject2 = ((Component)gameObject.transform.Find("/Systems").Find("UI").Find("Canvas")).gameObject;
			GameObject val7 = new GameObject();
			val7.SetActive(false);
			val7.AddComponent<CanvasGroup>();
			CanvasGroup component = val7.GetComponent<CanvasGroup>();
			val7.transform.parent = gameObject2.transform;
			val7.transform.localPosition = new Vector3(0f, 0f, 0f);
			val7.transform.localScale = new Vector3(1f, 1f, 1f);
			((Object)val7).name = "Images";
			GameObject val8 = new GameObject();
			val8.SetActive(false);
			val8.transform.parent = val7.transform;
			((Object)val8).name = "Image1";
			Image val9 = val8.AddComponent<Image>();
			val9.sprite = val;
			val8.transform.localPosition = Vector2.op_Implicit(new Vector2(0f, 0f));
			Vector3 localScale = val8.transform.localScale;
			((Vector3)(ref localScale))..ctor(num2, num3, 0f);
			val8.transform.localScale = localScale;
			val8.transform.Rotate(0f, 0f, 0f);
			((Graphic)val8.GetComponent<Image>()).color = new Color(255f, 255f, 255f, 1f);
			GameObject val10 = new GameObject();
			val10.SetActive(false);
			val10.transform.parent = val7.transform;
			((Object)val10).name = "Image2";
			Image val11 = val10.AddComponent<Image>();
			val11.sprite = val2;
			val10.transform.localPosition = Vector2.op_Implicit(new Vector2(0f, 0f));
			Vector3 localScale2 = val10.transform.localScale;
			((Vector3)(ref localScale2))..ctor(num2, num3, 0f);
			val10.transform.localScale = localScale2;
			val10.transform.Rotate(0f, 0f, 0f);
			((Graphic)val10.GetComponent<Image>()).color = new Color(255f, 255f, 255f, 1f);
			GameObject val12 = new GameObject();
			val12.SetActive(false);
			val12.transform.parent = val7.transform;
			((Object)val12).name = "Image3";
			Image val13 = val12.AddComponent<Image>();
			val13.sprite = val3;
			val12.transform.localPosition = Vector2.op_Implicit(new Vector2(0f, 0f));
			Vector3 localScale3 = val12.transform.localScale;
			((Vector3)(ref localScale3))..ctor(num2, num3, 0f);
			val12.transform.localScale = localScale3;
			val12.transform.Rotate(0f, 0f, 0f);
			((Graphic)val12.GetComponent<Image>()).color = new Color(255f, 255f, 255f, 1f);
			GameObject val14 = new GameObject();
			val14.SetActive(false);
			val14.transform.parent = val7.transform;
			((Object)val14).name = "Image4";
			Image val15 = val14.AddComponent<Image>();
			val15.sprite = val4;
			val14.transform.localPosition = Vector2.op_Implicit(new Vector2(0f, 0f));
			Vector3 localScale4 = val14.transform.localScale;
			((Vector3)(ref localScale4))..ctor(num2, num3, 0f);
			val14.transform.localScale = localScale4;
			val14.transform.Rotate(0f, 0f, 0f);
			((Graphic)val14.GetComponent<Image>()).color = new Color(255f, 255f, 255f, 1f);
			GameObject val16 = new GameObject();
			val16.SetActive(false);
			val16.transform.parent = val7.transform;
			((Object)val16).name = "Image5";
			Image val17 = val16.AddComponent<Image>();
			val17.sprite = val5;
			val16.transform.localPosition = Vector2.op_Implicit(new Vector2(0f, 0f));
			Vector3 localScale5 = val16.transform.localScale;
			((Vector3)(ref localScale5))..ctor(num2, num3, 0f);
			val16.transform.localScale = localScale5;
			val16.transform.Rotate(0f, 0f, 0f);
			((Graphic)val16.GetComponent<Image>()).color = new Color(255f, 255f, 255f, 1f);
			GameObject val18 = new GameObject();
			val18.SetActive(false);
			val18.transform.parent = val7.transform;
			((Object)val18).name = "Image6";
			Image val19 = val18.AddComponent<Image>();
			val19.sprite = val6;
			val18.transform.localPosition = Vector2.op_Implicit(new Vector2(0f, 0f));
			Vector3 localScale6 = val18.transform.localScale;
			((Vector3)(ref localScale6))..ctor(num2, num3, 0f);
			val18.transform.localScale = localScale6;
			val18.transform.Rotate(0f, 0f, 0f);
			((Graphic)val18.GetComponent<Image>()).color = new Color(255f, 255f, 255f, 1f);
			GameObject val20 = new GameObject();
			val20.SetActive(false);
			val20.transform.parent = val7.transform;
			((Object)val20).name = "Image7";
			Image val21 = val20.AddComponent<Image>();
			val21.sprite = sprite;
			val20.transform.localPosition = Vector2.op_Implicit(new Vector2(0f, 0f));
			Vector3 localScale7 = val18.transform.localScale;
			((Vector3)(ref localScale7))..ctor(num2, num3, 0f);
			val20.transform.localScale = localScale7;
			val18.transform.Rotate(0f, 0f, 0f);
			((Graphic)val18.GetComponent<Image>()).color = new Color(255f, 255f, 255f, 1f);
		}

		[HarmonyPatch(typeof(StartOfRound), "Update")]
		[HarmonyPostfix]
		private static void ScalingFix(StartOfRound __instance)
		{
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: 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_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0293: Unknown result type (might be due to invalid IL or missing references)
			//IL_0298: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Unknown result type (might be due to invalid IL or missing references)
			if (fayemodbase.DynamicImageScaling.Value)
			{
				float num = (float)Screen.width * 0.11111f;
				float num2 = (float)Screen.width / num;
				float num3 = (float)Screen.height / num;
				GameObject gameObject = ((Component)((Component)__instance).transform.parent).gameObject;
				GameObject gameObject2 = ((Component)gameObject.transform.Find("/Systems").Find("UI").Find("Canvas")
					.Find("Images")).gameObject;
				GameObject gameObject3 = ((Component)gameObject2.transform.Find("Image1")).gameObject;
				if (gameObject3.activeSelf)
				{
					Vector3 localScale = gameObject3.transform.localScale;
					((Vector3)(ref localScale))..ctor(num2, num3, 0f);
					gameObject3.transform.localScale = localScale;
				}
				GameObject gameObject4 = ((Component)gameObject2.transform.Find("Image2")).gameObject;
				if (gameObject4.activeSelf)
				{
					Vector3 localScale2 = gameObject4.transform.localScale;
					((Vector3)(ref localScale2))..ctor(num2, num3, 0f);
					gameObject4.transform.localScale = localScale2;
				}
				GameObject gameObject5 = ((Component)gameObject2.transform.Find("Image3")).gameObject;
				if (gameObject5.activeSelf)
				{
					Vector3 localScale3 = gameObject5.transform.localScale;
					((Vector3)(ref localScale3))..ctor(num2, num3, 0f);
					gameObject5.transform.localScale = localScale3;
				}
				GameObject gameObject6 = ((Component)gameObject2.transform.Find("Image4")).gameObject;
				if (gameObject6.activeSelf)
				{
					Vector3 localScale4 = gameObject6.transform.localScale;
					((Vector3)(ref localScale4))..ctor(num2, num3, 0f);
					gameObject6.transform.localScale = localScale4;
				}
				GameObject gameObject7 = ((Component)gameObject2.transform.Find("Image5")).gameObject;
				if (gameObject7.activeSelf)
				{
					Vector3 localScale5 = gameObject7.transform.localScale;
					((Vector3)(ref localScale5))..ctor(num2, num3, 0f);
					gameObject7.transform.localScale = localScale5;
				}
				GameObject gameObject8 = ((Component)gameObject2.transform.Find("Image6")).gameObject;
				if (gameObject8.activeSelf)
				{
					Vector3 localScale6 = gameObject8.transform.localScale;
					((Vector3)(ref localScale6))..ctor(num2, num3, 0f);
					gameObject8.transform.localScale = localScale6;
				}
				GameObject gameObject9 = ((Component)gameObject2.transform.Find("Image7")).gameObject;
				if (gameObject9.activeSelf)
				{
					Vector3 localScale7 = gameObject8.transform.localScale;
					((Vector3)(ref localScale7))..ctor(num2, num3, 0f);
					gameObject9.transform.localScale = localScale7;
				}
			}
		}
	}
}