Decompiled source of CozyImprovements v1.2.2

com.spycibot.cozyimprovements.dll

Decompiled 11 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 BepInEx.Configuration;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using SpyciBot.LC.CozyImprovements.Improvements;
using Unity.Netcode;
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("com.spycibot.cozyimprovements")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("\r\n      Enhance the experience inside the ship to create a more immersive, cozy, and accessible environment. v47 compatible.\r\n    ")]
[assembly: AssemblyFileVersion("1.2.2.0")]
[assembly: AssemblyInformationalVersion("1.2.2+39da0e927e7ba9e69220c8a7b7ef50abc7f605fb")]
[assembly: AssemblyProduct("Cozy Improvements")]
[assembly: AssemblyTitle("com.spycibot.cozyimprovements")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.2.2.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 SpyciBot.LC.CozyImprovements
{
	public class Config
	{
		public ConfigEntry<bool> configStorageLights;

		public ConfigEntry<bool> configLightSwitchGlow;

		public ConfigEntry<bool> configTerminalGlow;

		public ConfigEntry<bool> configTerminalMonitorAlwaysOn;

		public ConfigEntry<bool> configChargeStationGlow;

		public ConfigEntry<bool> configBigDoorButtons;

		public ConfigEntry<bool> configEasyLaunchLever;

		public ConfigEntry<bool> configBigTeleporterButtons;

		public ConfigEntry<bool> configBigMonitorButtons;

		public Config(ConfigFile cfg)
		{
			configStorageLights = cfg.Bind<bool>("General", "StorageLightsEnabled", true, "Enables the Storage Lights System");
			configLightSwitchGlow = cfg.Bind<bool>("General", "LightSwitchGlowEnabled", true, "Makes the LightSwitch glow in the dark");
			configTerminalGlow = cfg.Bind<bool>("General", "TerminalGlowEnabled", true, "Makes the Terminal glow active all the time");
			configTerminalMonitorAlwaysOn = cfg.Bind<bool>("General", "TerminalMonitorAlwaysOn", true, "Makes the Terminal screen active all the time; Will show the screen you left it on");
			configChargeStationGlow = cfg.Bind<bool>("General", "ChargeStationGlowEnabled", true, "Makes the Charging Station glow with a yellow light");
			configBigDoorButtons = cfg.Bind<bool>("General.Accessibility", "BigDoorButtonsEnabled", false, "Enlarges the door buttons so they're easier to press");
			configEasyLaunchLever = cfg.Bind<bool>("General.Accessibility", "EasyLaunchLeverEnabled", true, "Enlarges the hitbox for the Launch Lever to cover more of the table so it's easier to pull");
			configBigTeleporterButtons = cfg.Bind<bool>("General.Accessibility", "BigTeleporterButtonsEnabled", false, "Enlarges the teleporter buttons so they're easier to press");
			configBigMonitorButtons = cfg.Bind<bool>("General.Accessibility", "BigMonitorButtonsEnabled", false, "Enlarges the Monitor buttons so they're easier to press");
		}
	}
	[BepInPlugin("com.spycibot.cozyimprovements", "Cozy Improvements", "1.2.2")]
	[HarmonyPatch]
	public class CozyImprovements : BaseUnityPlugin
	{
		private static GameObject gameObject;

		private static Terminal TermInst;

		public static Config CozyConfig { get; internal set; }

		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Cozy Improvements - com.spycibot.cozyimprovements - 1.2.2 is loaded!");
			Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), (string)null);
			CozyConfig = new Config(((BaseUnityPlugin)this).Config);
		}

		[HarmonyPatch(typeof(Terminal), "Start")]
		[HarmonyPostfix]
		private static void Postfix_Terminal_Start(Terminal __instance)
		{
			TermInst = __instance;
			if (CozyConfig.configTerminalMonitorAlwaysOn.Value)
			{
				TermInst.LoadNewNode(TermInst.terminalNodes.specialNodes[1]);
			}
			if (CozyConfig.configTerminalGlow.Value)
			{
				((Behaviour)TermInst.terminalLight).enabled = true;
			}
		}

		[HarmonyPatch(typeof(Terminal), "waitUntilFrameEndToSetActive")]
		[HarmonyPrefix]
		private static void Prefix_Terminal_WaitUntilFrameEndToSetActive(Terminal __instance, ref bool active)
		{
			TermInst = __instance;
			if (CozyConfig.configTerminalMonitorAlwaysOn.Value)
			{
				active = true;
			}
		}

		[HarmonyPatch(typeof(Terminal), "SetTerminalInUseClientRpc")]
		[HarmonyPostfix]
		private static void Postfix_Terminal_SetTerminalInUseClientRpc(Terminal __instance, bool inUse)
		{
			TermInst = __instance;
			if (CozyConfig.configTerminalGlow.Value)
			{
				((Behaviour)TermInst.terminalLight).enabled = true;
			}
		}

		[HarmonyPatch(typeof(StartOfRound), "OnPlayerConnectedClientRpc")]
		[HarmonyPostfix]
		private static void PostfixOnPlayerConnectedClientRpc(StartOfRound __instance, ulong clientId, int connectedPlayers, ulong[] connectedPlayerIdsOrdered, int assignedPlayerObjectId, int serverMoneyAmount, int levelID, int profitQuota, int timeUntilDeadline, int quotaFulfilled, int randomSeed)
		{
			if (clientId == NetworkManager.Singleton.LocalClientId)
			{
				DoAllTheThings();
			}
		}

		[HarmonyPatch(typeof(StartOfRound), "LoadUnlockables")]
		[HarmonyPostfix]
		private static void PostfixLoadUnlockables(StartOfRound __instance)
		{
			DoAllTheThings();
		}

		private static void DoAllTheThings()
		{
			try
			{
				manageInteractables();
			}
			catch (Exception arg)
			{
				Debug.LogError((object)$"Caught Exception in manageInteractables(): {arg}");
			}
			try
			{
				manageStorageCupboard();
			}
			catch (Exception arg2)
			{
				Debug.LogError((object)$"Caught Exception in manageStorageCupboard(): {arg2}");
			}
		}

		private static void manageInteractables()
		{
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			_ = GameNetworkManager.Instance.localPlayerController;
			GameObject[] array = GameObject.FindGameObjectsWithTag("InteractTrigger");
			for (int i = 0; i < array.Length; i++)
			{
				if (((Object)array[i]).name == "LightSwitch" && CozyConfig.configLightSwitchGlow.Value)
				{
					makeEmissive(array[i], new Color32((byte)182, (byte)240, (byte)150, (byte)102));
					makeEmissive(((Component)array[i].transform.GetChild(0)).gameObject, new Color32((byte)241, (byte)80, (byte)80, (byte)10), 0.15f);
				}
				if (((Object)array[i]).name == "Trigger" && ((Object)((Component)array[i].transform.parent).gameObject).name == "ChargeStationTrigger" && CozyConfig.configChargeStationGlow.Value)
				{
					GameObject val = ((Component)array[i].transform.parent.parent).gameObject;
					GameObject val2 = new GameObject("ChargeStationLight");
					Light obj = val2.AddComponent<Light>();
					obj.type = (LightType)2;
					obj.color = Color32.op_Implicit(new Color32((byte)240, (byte)240, (byte)140, byte.MaxValue));
					obj.intensity = 0.05f;
					obj.range = 0.3f;
					obj.shadows = (LightShadows)2;
					val2.layer = LayerMask.NameToLayer("Room");
					val2.transform.localPosition = new Vector3(0.5f, 0f, 0f);
					val2.transform.SetParent(val.transform, false);
				}
				if (((Object)array[i]).name == "Cube (2)" && ((Object)((Component)array[i].transform.parent).gameObject).name.StartsWith("CameraMonitor") && CozyConfig.configBigMonitorButtons.Value)
				{
					Accessibility.adjustMonitorButtons(array[i].gameObject);
				}
			}
		}

		private static void makeEmissive(GameObject gameObject, Color32 glowColor, float brightness = 0.02f)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			MeshRenderer component = gameObject.GetComponent<MeshRenderer>();
			Material material = ((Renderer)component).material;
			material.SetColor("_EmissiveColor", Color32.op_Implicit(glowColor) * brightness);
			((Renderer)component).material = material;
		}

		private static void manageStorageCupboard()
		{
			PlaceableShipObject[] array = Object.FindObjectsOfType<PlaceableShipObject>();
			for (int i = 0; i < array.Length; i++)
			{
				UnlockableItem obj = StartOfRound.Instance.unlockablesList.unlockables[array[i].unlockableID];
				_ = obj.unlockableType;
				if (obj.unlockableName == "Cupboard")
				{
					gameObject = ((Component)array[i].parentObject).gameObject;
					break;
				}
			}
			if (!((Object)(object)gameObject == (Object)null) && CozyConfig.configStorageLights.Value)
			{
				spawnStorageLights(gameObject);
			}
		}

		private static void spawnStorageLights(GameObject storageCloset)
		{
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: 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_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			float num = -1.1175f;
			List<float> obj = new List<float> { 2.804f, 2.163f, 1.48f, 0.999f };
			float num2 = 0.55f;
			float num3 = obj[0];
			AttachLightToStorageCloset(storageCloset, new Vector3(num - num2, 0.4f, num3));
			AttachLightToStorageCloset(storageCloset, new Vector3(num, 0.4f, num3));
			AttachLightToStorageCloset(storageCloset, new Vector3(num + num2, 0.4f, num3));
			num3 = obj[1];
			AttachLightToStorageCloset(storageCloset, new Vector3(num - num2, 0.4f, num3));
			AttachLightToStorageCloset(storageCloset, new Vector3(num, 0.4f, num3));
			AttachLightToStorageCloset(storageCloset, new Vector3(num + num2, 0.4f, num3));
			num3 = obj[2];
			AttachLightToStorageCloset(storageCloset, new Vector3(num - num2, 0.4f, num3), 2f);
			AttachLightToStorageCloset(storageCloset, new Vector3(num, 0.4f, num3), 2f);
			AttachLightToStorageCloset(storageCloset, new Vector3(num + num2, 0.4f, num3), 2f);
			num3 = obj[3];
			AttachLightToStorageCloset(storageCloset, new Vector3(num - num2, 0.4f, num3));
			AttachLightToStorageCloset(storageCloset, new Vector3(num, 0.4f, num3));
			AttachLightToStorageCloset(storageCloset, new Vector3(num + num2, 0.4f, num3));
		}

		private static void AttachLightToStorageCloset(GameObject storageCloset, Vector3 lightPositionOffset, float intensity = 3f)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: 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_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("StorageClosetLight");
			MeshFilter val2 = val.AddComponent<MeshFilter>();
			MeshRenderer obj = val.AddComponent<MeshRenderer>();
			GameObject val3 = GameObject.CreatePrimitive((PrimitiveType)0);
			val2.mesh = val3.GetComponent<MeshFilter>().mesh;
			Material val4 = new Material(Shader.Find("HDRP/Lit"));
			Color val5 = Color32.op_Implicit(new Color32((byte)249, (byte)240, (byte)202, byte.MaxValue));
			val4.SetColor("_BaseColor", val5);
			float num = 1f;
			val4.SetColor("_EmissiveColor", val5 * num);
			((Renderer)obj).material = val4;
			Object.DestroyImmediate((Object)(object)val3);
			Light obj2 = val.AddComponent<Light>();
			obj2.type = (LightType)0;
			obj2.color = val5;
			obj2.intensity = intensity;
			obj2.range = 1.05f;
			obj2.spotAngle = 125f;
			obj2.shadows = (LightShadows)2;
			val.layer = LayerMask.NameToLayer("Room");
			val.transform.localScale = new Vector3(0.125f, 0.125f, 0.04f);
			val.transform.localPosition = lightPositionOffset;
			val.transform.rotation = Quaternion.Euler(170f, 0f, 0f);
			val.transform.SetParent(storageCloset.transform, false);
		}

		private static string padString(string baseStr, char padChar, int width)
		{
			int totalWidth = (width - (baseStr.Length + 8)) / 2 + (baseStr.Length + 8);
			return ("    " + baseStr + "    ").PadLeft(totalWidth, padChar).PadRight(width, padChar);
		}

		private static void obviousDebug(string baseStr)
		{
			Debug.Log((object)"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
			Debug.Log((object)"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
			Debug.Log((object)"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
			Debug.Log((object)padString(baseStr ?? "", '~', 65));
			Debug.Log((object)"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
			Debug.Log((object)"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
			Debug.Log((object)"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "com.spycibot.cozyimprovements";

		public const string PLUGIN_NAME = "Cozy Improvements";

		public const string PLUGIN_VERSION = "1.2.2";
	}
}
namespace SpyciBot.LC.CozyImprovements.Improvements
{
	[HarmonyPatch]
	public static class Accessibility
	{
		private static HangarShipDoor hangarShipDoor;

		[HarmonyPatch(typeof(StartMatchLever), "Start")]
		[HarmonyPostfix]
		private static void Postfix_StartMatchLever_Start(StartMatchLever __instance)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			if (CozyImprovements.CozyConfig.configEasyLaunchLever.Value)
			{
				((Component)__instance).transform.localScale = new Vector3(1.139f, 0.339f, 1.539f);
				((Component)__instance).transform.localPosition = new Vector3(8.7938f, 1.479f, -7.0767f);
				((Component)__instance).transform.GetChild(0).position = new Vector3(8.8353f, 0.2931f, -14.5767f);
			}
		}

		[HarmonyPatch(typeof(HangarShipDoor), "Start")]
		[HarmonyPostfix]
		private static void Postfix_HangarShipDoor_Start(HangarShipDoor __instance)
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: 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_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: 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_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: 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)
			//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_032a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0333: Unknown result type (might be due to invalid IL or missing references)
			//IL_033b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0342: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			if (!CozyImprovements.CozyConfig.configBigDoorButtons.Value)
			{
				return;
			}
			hangarShipDoor = __instance;
			GameObject gameObject = ((Component)__instance.hydraulicsDisplay.transform.parent).gameObject;
			gameObject.transform.localScale = new Vector3(-2f, -2f, -2f);
			gameObject.transform.localPosition = new Vector3(-5.2085f, 1.8882f, -8.823f);
			GameObject gameObject2 = ((Component)gameObject.transform.Find("StartButton")).gameObject;
			GameObject gameObject3 = ((Component)gameObject.transform.Find("StopButton")).gameObject;
			gameObject3.transform.localScale = new Vector3(-1.1986f, -0.1986f, -1.1986f);
			gameObject2.transform.localScale = gameObject3.transform.localScale;
			gameObject2.transform.GetChild(0).localPosition = gameObject3.transform.GetChild(0).localPosition;
			gameObject2.transform.GetChild(0).localScale = gameObject3.transform.GetChild(0).localScale;
			Material[] materials = ((Renderer)gameObject2.GetComponent<MeshRenderer>()).materials;
			for (int i = 0; i < materials.Length; i++)
			{
				if (((Object)materials[i]).name == "GreenButton (Instance)")
				{
					materials[i].SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)39, (byte)51, (byte)39, byte.MaxValue)));
				}
				if (((Object)materials[i]).name == "ButtonWhite (Instance)")
				{
					materials[i].SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)179, (byte)179, (byte)179, byte.MaxValue)));
				}
			}
			((Renderer)gameObject2.GetComponent<MeshRenderer>()).materials = materials;
			Material[] materials2 = ((Renderer)gameObject3.GetComponent<MeshRenderer>()).materials;
			for (int j = 0; j < materials2.Length; j++)
			{
				if (((Object)materials2[j]).name == "RedButton (Instance)")
				{
					materials2[j].SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)64, (byte)24, (byte)24, byte.MaxValue)));
				}
				if (((Object)materials2[j]).name == "ButtonWhite (Instance)")
				{
					materials2[j].SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)179, (byte)179, (byte)179, byte.MaxValue)));
				}
			}
			((Renderer)gameObject3.GetComponent<MeshRenderer>()).materials = materials2;
			Transform child = gameObject.transform.Find("StartButton").GetChild(0);
			Transform child2 = gameObject.transform.Find("StopButton").GetChild(0);
			((Renderer)((Component)child).GetComponent<MeshRenderer>()).material.color = Color32.op_Implicit(new Color32((byte)39, byte.MaxValue, (byte)39, byte.MaxValue));
			((Renderer)((Component)child2).GetComponent<MeshRenderer>()).material.color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)24, (byte)24, byte.MaxValue));
			Vector3 position = default(Vector3);
			((Vector3)(ref position))..ctor(-3.7205f, 2.0504f, -16.3018f);
			Vector3 localScale = default(Vector3);
			((Vector3)(ref localScale))..ctor(0.7393f, 0.4526f, 0.6202f);
			Vector3 localScale2 = default(Vector3);
			((Vector3)(ref localScale2))..ctor(0.003493f, 0.000526f, 0.002202f);
			child.position = position;
			child.localScale = localScale;
			child2.position = position;
			child2.localScale = localScale2;
		}

		[HarmonyPatch(typeof(StartOfRound), "SetShipDoorsClosed")]
		[HarmonyPostfix]
		private static void Postfix_StartOfRound_SetShipDoorsClosed(StartOfRound __instance, bool closed)
		{
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: 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_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			if (CozyImprovements.CozyConfig.configBigDoorButtons.Value)
			{
				GameObject gameObject = ((Component)hangarShipDoor.hydraulicsDisplay.transform.parent).gameObject;
				Transform child = gameObject.transform.Find("StartButton").GetChild(0);
				Transform child2 = gameObject.transform.Find("StopButton").GetChild(0);
				Vector3 localScale = default(Vector3);
				((Vector3)(ref localScale))..ctor(0.7393f, 0.4526f, 0.6202f);
				Vector3 localScale2 = default(Vector3);
				((Vector3)(ref localScale2))..ctor(0.003493f, 0.000526f, 0.002202f);
				child.localScale = localScale;
				child2.localScale = localScale;
				if (closed)
				{
					child.localScale = localScale;
					child2.localScale = localScale2;
				}
				else
				{
					child2.localScale = localScale;
					child.localScale = localScale2;
				}
			}
		}

		[HarmonyPatch(typeof(ShipTeleporter), "Awake")]
		[HarmonyPostfix]
		private static void Postfix_ShipTeleporter_Awake(ShipTeleporter __instance)
		{
			//IL_0031: 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)
			if (CozyImprovements.CozyConfig.configBigTeleporterButtons.Value)
			{
				((Component)((Component)__instance.buttonTrigger).gameObject.transform.parent).gameObject.transform.localScale = Vector3.one * 3f;
			}
		}

		public static void adjustMonitorButtons(GameObject ButtonCube)
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			if (CozyImprovements.CozyConfig.configBigMonitorButtons.Value)
			{
				GameObject gameObject = ((Component)ButtonCube.transform.parent).gameObject;
				gameObject.transform.localScale = new Vector3(1.852f, 1.8475f, 1.852f);
				if (((Object)gameObject).name == "CameraMonitorSwitchButton")
				{
					gameObject.transform.localPosition = new Vector3(-0.28f, -1.807f, -0.29f);
				}
			}
		}
	}
}