Decompiled source of LC VEGA v3.1.0

BepInEx/plugins/LC-VEGA.dll

Decompiled 4 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using Diversity;
using FacilityMeltdown.MeltdownSequence.Behaviours;
using GameNetcodeStuff;
using HarmonyLib;
using LC_VEGA.Patches;
using LethalCompanyInputUtils.Api;
using LobbyCompatibility.Attributes;
using Malfunctions;
using Malfunctions.Patches;
using Microsoft.CodeAnalysis;
using MoreShipUpgrades.Misc.Upgrades;
using MoreShipUpgrades.UpgradeComponents.TierUpgrades.Ship;
using ShipWindows;
using ShipWindows.Components;
using ShipWindows.Networking;
using TMPro;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.UI;
using VoiceRecognitionAPI;
using com.github.zehsteam.ToilHead.MonoBehaviours;

[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("LC-VEGA")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+1a61c2b955fed0ceef4b6b18dbb4b78aaf27be2e")]
[assembly: AssemblyProduct("LC-VEGA")]
[assembly: AssemblyTitle("LC-VEGA")]
[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 LC_VEGA
{
	public static class CoroutineManager
	{
		internal class CoroutineManagerBehaviour : MonoBehaviour
		{
		}

		private static MonoBehaviour _instance;

		private static MonoBehaviour instance
		{
			get
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)_instance == (Object)null)
				{
					_instance = (MonoBehaviour)(object)new GameObject("CoroutineManager").AddComponent<CoroutineManagerBehaviour>();
				}
				return _instance;
			}
		}

		public static Coroutine StartCoroutine(IEnumerator routine)
		{
			return instance.StartCoroutine(routine);
		}
	}
	public enum VocalLevels
	{
		None,
		Low,
		Medium,
		High
	}
	public enum DisplayModes
	{
		Default,
		Compact,
		OneLine,
		CompactOneLine
	}
	public enum Layouts
	{
		Custom,
		TopLeft,
		TopRight,
		TopCentered,
		AboveHotbar,
		BottomCentered
	}
	public enum Colors
	{
		Custom,
		Red,
		LightRed,
		DarkRed,
		OperaRed,
		Blood,
		Crimson,
		Blue,
		LightBlue,
		DarkBlue,
		LunxaraBlue,
		Cyan,
		SuachiTeal,
		Green,
		LightGreen,
		DarkGreen,
		LyraGreen,
		Lime,
		Yellow,
		LightYellow,
		DarkYellow,
		Gold,
		Orange,
		LightOrange,
		DarkOrange,
		PapayaOrange,
		Pink,
		LightPink,
		DarkPink,
		LunxaraPink,
		Purple,
		LightPurple,
		DarkPurple,
		LunxaraPurple,
		Magenta,
		White,
		Gray,
		LightGray,
		DarkGray,
		Black
	}
	internal class ModChecker
	{
		public static bool hasVoiceRecognitionAPI;

		public static bool hasToilHead;

		public static bool hasMalfunctions;

		public static bool hasDiversity;

		public static bool hasFacilityMeltdown;

		public static bool hasShipWindows;

		public static bool hasLGU;

		public static bool hasEladsHUD;

		public static bool CheckForMod(string modGUID)
		{
			Dictionary<string, PluginInfo> pluginInfos = Chainloader.PluginInfos;
			foreach (PluginInfo value in pluginInfos.Values)
			{
				if (value.Metadata.GUID.Equals(modGUID))
				{
					Plugin.LogToConsole("Found mod: " + value.Metadata.Name);
					return true;
				}
			}
			return false;
		}
	}
	internal class PlayerInput : LcInputActions
	{
		[InputAction(/*Could not decode attribute arguments.*/)]
		public InputAction Activation { get; set; }
	}
	[BepInPlugin("JS03.LC-VEGA", "LC-VEGA", "3.1.0")]
	[LobbyCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		private const string modGUID = "JS03.LC-VEGA";

		private const string modName = "LC-VEGA";

		private const string modVersion = "3.1.0";

		internal static AssetBundle assetBundle;

		internal static PlayerInput PlayerInputInstance;

		public static ConfigEntry<float> gratitudeConfidence;

		public static ConfigEntry<float> stopConfidence;

		public static ConfigEntry<float> infoConfidence;

		public static ConfigEntry<float> manualActivationConfidence;

		public static ConfigEntry<float> secureDoorsConfidence;

		public static ConfigEntry<float> turretsConfidence;

		public static ConfigEntry<float> landminesConfidence;

		public static ConfigEntry<float> trapsConfidence;

		public static ConfigEntry<float> signalsConfidence;

		public static ConfigEntry<float> teleportConfidence;

		public static ConfigEntry<float> shipConfidence;

		public static ConfigEntry<float> miscConfidence;

		public static ConfigEntry<float> upgradesConfidence;

		public static ConfigEntry<float> crewStatusConfidence;

		public static ConfigEntry<float> crewInShipConfidence;

		public static ConfigEntry<float> scrapLeftConfidence;

		public static ConfigEntry<VocalLevels> vocalLevel;

		public static ConfigEntry<bool> playIntro;

		public static ConfigEntry<bool> readBestiaryEntries;

		public static ConfigEntry<bool> remoteEntityID;

		public static ConfigEntry<bool> giveWeatherInfo;

		public static ConfigEntry<bool> giveApparatusWarnings;

		public static ConfigEntry<string> messages;

		public static ConfigEntry<bool> malfunctionWarnings;

		public static ConfigEntry<bool> diversitySpeaker;

		public static ConfigEntry<int> diversitySpeakerReplyChance;

		public static ConfigEntry<bool> meltdownTimer;

		public static ConfigEntry<string> playerNameColors;

		public static ConfigEntry<bool> sendRadarSwitchChatMessage;

		public static ConfigEntry<bool> sendSignalTranslatorChatMessage;

		public static ConfigEntry<bool> sendTeleporterChatMessage;

		public static ConfigEntry<bool> sendDiscombobulatorChatMessage;

		public static ConfigEntry<float> volume;

		public static ConfigEntry<bool> ignoreMasterVolume;

		public static ConfigEntry<DisplayModes> infoDisplayMode;

		public static ConfigEntry<float> scannerRange;

		public static ConfigEntry<bool> enableAdvancedScannerAuto;

		public static ConfigEntry<bool> detectMasked;

		public static ConfigEntry<float> scale;

		public static ConfigEntry<float> horizontalPosition;

		public static ConfigEntry<float> verticalPosition;

		public static ConfigEntry<float> horizontalGap;

		public static ConfigEntry<float> verticalGap;

		public static ConfigEntry<float> entitiesTextLength;

		public static ConfigEntry<float> itemsTextLength;

		public static ConfigEntry<float> entitiesTilt;

		public static ConfigEntry<float> itemsTilt;

		public static ConfigEntry<TextAlignmentOptions> entitiesAlignment;

		public static ConfigEntry<TextAlignmentOptions> itemsAlignment;

		public static ConfigEntry<Colors> clearTextColor;

		public static ConfigEntry<Colors> entitiesNearbyTextColor;

		public static ConfigEntry<Colors> itemsNearbyTextColor;

		public static ConfigEntry<Colors> dataUnavailableTextColor;

		public static ConfigEntry<string> customColorCodes;

		public static ConfigEntry<bool> useManualListening;

		public static ConfigEntry<bool> enableManualListeningAuto;

		public static ConfigEntry<bool> patchReadInput;

		public static ConfigEntry<bool> enhancedTeleportCommands;

		public static ConfigEntry<bool> registerActivation;

		public static ConfigEntry<string> startListeningCommands;

		public static ConfigEntry<string> stopListeningCommands;

		public static ConfigEntry<bool> registerMoonsInfo;

		public static ConfigEntry<string> moonsInfoCommands;

		public static ConfigEntry<bool> registerBestiaryEntries;

		public static ConfigEntry<string> bestiaryEntriesCommands;

		public static ConfigEntry<bool> registerCreatureInfo;

		public static ConfigEntry<string> creatureInfoCommands;

		public static ConfigEntry<bool> registerAdvancedScanner;

		public static ConfigEntry<string> activateAdvancedScannerCommands;

		public static ConfigEntry<string> deactivateAdvancedScannerCommands;

		public static ConfigEntry<bool> registerInteractSecureDoor;

		public static ConfigEntry<string> openSecureDoorCommands;

		public static ConfigEntry<string> closeSecureDoorCommands;

		public static ConfigEntry<bool> registerInteractAllSecureDoors;

		public static ConfigEntry<string> openAllSecureDoorsCommands;

		public static ConfigEntry<string> closeAllSecureDoorsCommands;

		public static ConfigEntry<bool> registerDisableTurret;

		public static ConfigEntry<string> disableTurretCommands;

		public static ConfigEntry<bool> registerDisableAllTurrets;

		public static ConfigEntry<string> disableAllTurretsCommands;

		public static ConfigEntry<bool> registerDisableMine;

		public static ConfigEntry<string> disableMineCommands;

		public static ConfigEntry<bool> registerDisableAllMines;

		public static ConfigEntry<string> disableAllMinesCommands;

		public static ConfigEntry<bool> registerDisableSpikeTrap;

		public static ConfigEntry<string> disableSpikeTrapCommands;

		public static ConfigEntry<bool> registerDisableAllSpikeTraps;

		public static ConfigEntry<string> disableAllSpikeTrapsCommands;

		public static ConfigEntry<bool> registerTeleporter;

		public static ConfigEntry<string> teleporterCommands;

		public static ConfigEntry<bool> registerRadarSwitch;

		public static ConfigEntry<string> radarSwitchCommands;

		public static ConfigEntry<bool> registerDiscombobulator;

		public static ConfigEntry<string> discombobulatorCommands;

		public static ConfigEntry<bool> registerCrewStatus;

		public static ConfigEntry<string> crewStatusCommands;

		public static ConfigEntry<bool> registerCrewInShip;

		public static ConfigEntry<string> crewInShipCommands;

		public static ConfigEntry<bool> registerScrapLeft;

		public static ConfigEntry<string> scrapLeftCommands;

		public static ConfigEntry<bool> registerRadarBoosters;

		public static ConfigEntry<string> radarPingCommands;

		public static ConfigEntry<string> radarFlashCommands;

		public static ConfigEntry<bool> registerSignalTranslator;

		public static ConfigEntry<string> transmitCommands;

		public static ConfigEntry<bool> registerTime;

		public static ConfigEntry<string> timeCommands;

		public static ConfigEntry<bool> registerInteractShipDoors;

		public static ConfigEntry<string> openShipDoorsCommands;

		public static ConfigEntry<string> closeShipDoorsCommands;

		public static ConfigEntry<bool> registerInteractShipLights;

		public static ConfigEntry<string> lightsOnCommands;

		public static ConfigEntry<string> lightsOffCommands;

		public static ConfigEntry<bool> registerInteractShipMagnet;

		public static ConfigEntry<string> magnetOnCommands;

		public static ConfigEntry<string> magnetOffCommands;

		public static ConfigEntry<bool> registerInteractShipShutters;

		public static ConfigEntry<string> openShuttersCommands;

		public static ConfigEntry<string> closeShuttersCommands;

		public static ConfigEntry<bool> registerWeatherInfo;

		public static ConfigEntry<bool> registerStop;

		public static ConfigEntry<string> stopCommands;

		public static ConfigEntry<bool> registerThanks;

		public static ConfigEntry<string> gratitudeCommands;

		private readonly Harmony harmony = new Harmony("JS03.LC-VEGA");

		private static Plugin Instance;

		internal static ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("JS03.LC-VEGA");
			mls.LogInfo((object)"The installation of VEGA has begun");
			PlayerInputInstance = new PlayerInput();
			LoadAssets();
			GenerateConfigValues();
			CheckInstalledMods();
			ManageSaveValues();
			VEGA.Initialize();
			PatchStuff();
		}

		internal void LoadAssets()
		{
			mls.LogInfo((object)"Loading assets");
			VEGA.audioClips = new List<AudioClip>();
			string location = ((BaseUnityPlugin)Instance).Info.Location;
			location = location.TrimEnd("LC-VEGA.dll".ToCharArray());
			assetBundle = AssetBundle.LoadFromFile(location + "lcvegavoicelines");
			if ((Object)(object)assetBundle != (Object)null)
			{
				VEGA.audioClips = assetBundle.LoadAllAssets<AudioClip>().ToList();
				mls.LogInfo((object)"Assets loaded successfully");
			}
			else
			{
				mls.LogWarning((object)"Unable to load assets");
			}
		}

		internal void PatchStuff()
		{
			mls.LogInfo((object)"Patching things");
			harmony.PatchAll(typeof(Plugin));
			harmony.PatchAll(typeof(StartOfRoundPatch));
			harmony.PatchAll(typeof(TerminalPatch));
			harmony.PatchAll(typeof(TimeOfDayPatch));
			harmony.PatchAll(typeof(HUDManagerPatch));
			harmony.PatchAll(typeof(GeneralPatches));
			if (patchReadInput.Value)
			{
				harmony.PatchAll(typeof(ReadInputPatch));
			}
			if (ModChecker.hasMalfunctions)
			{
				harmony.PatchAll(typeof(MalfunctionsPatches));
			}
			if (ModChecker.hasDiversity)
			{
				harmony.PatchAll(typeof(DiversityPatches));
			}
			if (ModChecker.hasShipWindows)
			{
				harmony.PatchAll(typeof(ShipWindowsPatches));
			}
			if (ModChecker.hasLGU)
			{
				harmony.PatchAll(typeof(LGUPatches));
			}
			if (ModChecker.hasFacilityMeltdown)
			{
				harmony.PatchAll(typeof(FacilityMeltdownPatches));
			}
		}

		internal void CheckInstalledMods()
		{
			mls.LogInfo((object)"Looking for compatible mods...");
			ModChecker.hasVoiceRecognitionAPI = ModChecker.CheckForMod("me.loaforc.voicerecognitionapi");
			ModChecker.hasToilHead = ModChecker.CheckForMod("com.github.zehsteam.ToilHead");
			ModChecker.hasMalfunctions = ModChecker.CheckForMod("com.zealsprince.malfunctions");
			ModChecker.hasFacilityMeltdown = ModChecker.CheckForMod("me.loaforc.facilitymeltdown");
			ModChecker.hasDiversity = ModChecker.CheckForMod("Chaos.Diversity");
			ModChecker.hasShipWindows = ModChecker.CheckForMod("TestAccount666.ShipWindows");
			ModChecker.hasLGU = ModChecker.CheckForMod("com.malco.lethalcompany.moreshipupgrades");
			ModChecker.hasEladsHUD = ModChecker.CheckForMod("me.eladnlg.customhud");
		}

		internal void ManageSaveValues()
		{
			mls.LogDebug((object)("Looking for: " + Application.persistentDataPath + SaveManager.fileName));
			SaveManager.playedIntro = false;
			SaveManager.firstTimeDiversity = true;
			SaveManager.hadDiversity = false;
			if (File.Exists(Application.persistentDataPath + SaveManager.fileName))
			{
				mls.LogDebug((object)"File found. Reading values...");
				SaveManager.playedIntro = SaveManager.GetValueFromIndex(0);
				mls.LogDebug((object)("Has played the intro? -> " + SaveManager.playedIntro));
				SaveManager.firstTimeDiversity = SaveManager.GetValueFromIndex(1);
				mls.LogDebug((object)("First time using Diversity? -> " + SaveManager.firstTimeDiversity));
				SaveManager.hadDiversity = SaveManager.GetValueFromIndex(2);
				mls.LogDebug((object)("Had Diversity installed? -> " + SaveManager.hadDiversity));
				if (!SaveManager.firstTimeDiversity && !SaveManager.hadDiversity)
				{
					SaveManager.firstTimeDiversity = true;
				}
			}
			else
			{
				mls.LogDebug((object)"File not found. Creating it now!");
				SaveManager.SaveToFile();
			}
		}

		internal void GenerateConfigValues()
		{
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Expected O, but got Unknown
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Expected O, but got Unknown
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Expected O, but got Unknown
			//IL_0220: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Expected O, but got Unknown
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Expected O, but got Unknown
			//IL_029a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Expected O, but got Unknown
			//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e1: Expected O, but got Unknown
			//IL_0314: Unknown result type (might be due to invalid IL or missing references)
			//IL_031e: Expected O, but got Unknown
			//IL_0351: Unknown result type (might be due to invalid IL or missing references)
			//IL_035b: Expected O, but got Unknown
			//IL_038e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0398: Expected O, but got Unknown
			//IL_03cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d5: Expected O, but got Unknown
			//IL_0408: Unknown result type (might be due to invalid IL or missing references)
			//IL_0412: Expected O, but got Unknown
			//IL_0445: Unknown result type (might be due to invalid IL or missing references)
			//IL_044f: Expected O, but got Unknown
			//IL_0482: Unknown result type (might be due to invalid IL or missing references)
			//IL_048c: Expected O, but got Unknown
			//IL_04bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c9: Expected O, but got Unknown
			//IL_04fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0506: Expected O, but got Unknown
			//IL_0539: Unknown result type (might be due to invalid IL or missing references)
			//IL_0543: Expected O, but got Unknown
			//IL_0576: Unknown result type (might be due to invalid IL or missing references)
			//IL_0580: Expected O, but got Unknown
			//IL_0691: Unknown result type (might be due to invalid IL or missing references)
			//IL_069b: Expected O, but got Unknown
			vocalLevel = ((BaseUnityPlugin)this).Config.Bind<VocalLevels>("Dialogue & Interactions", "Vocal Level", VocalLevels.High, "Changes how often VEGA speaks and the length of his answers.\nHigh: The default value. Will speak on every interaction. Recommended for inexperienced players.\nMedium: Gives you useful info, doesn't speak on every interaction. Recommended for experienced players.\nLow: Speaks as often as the Medium option, but gives you shorter answers. Recommended for players who already have experience with VEGA.\nNone: Will only speak when asked to.");
			playIntro = ((BaseUnityPlugin)this).Config.Bind<bool>("Dialogue & Interactions", "Play intro", true, "If set to true, VEGA will give you its introduction speech the first time you use the mod.");
			readBestiaryEntries = ((BaseUnityPlugin)this).Config.Bind<bool>("Dialogue & Interactions", "Read Bestiary entries", true, "If set to true, VEGA will read every bestiary entry you open in the terminal.");
			remoteEntityID = ((BaseUnityPlugin)this).Config.Bind<bool>("Dialogue & Interactions", "Remote Entity Identification", true, "If set to true, VEGA will give you the name of every new entity your crew scans.");
			giveApparatusWarnings = ((BaseUnityPlugin)this).Config.Bind<bool>("Dialogue & Interactions", "Give Apparatus warnings", true, "If set to true, VEGA will give you brief and informative warnings when the Apparatus is pulled.");
			giveWeatherInfo = ((BaseUnityPlugin)this).Config.Bind<bool>("Dialogue & Interactions", "Give weather info", true, "If set to true, VEGA will give you information on a moon's current weather upon landing if you have little to no experience.");
			messages = ((BaseUnityPlugin)this).Config.Bind<string>("Dialogue & Interactions", "Signal Translator messages", "YES, NO, OKAY, HELP, THANKS, ITEMS, MAIN, FIRE, GIANT, GIANTS, DOG, DOGS, WORM, WORMS, BABOONS, HAWKS, DANGER, GIRL, GHOST, BRACKEN, BUTLER, BUTLERS, BUG, BUGS, YIPPEE, SNARE, FLEA, COIL, JESTER, SLIME, THUMPER, MIMIC, MIMICS, MASKED, SPIDER, SNAKES, OLD BIRD, HEROBRINE, FOOTBALL, FIEND, SLENDER, LOCKER, SHY GUY, SIRENHEAD, DRIFTWOOD, WALKER, WATCHER, LOST, INSIDE, TRAPPED, LEAVE, GOLD, APPARATUS", "The messages VEGA can transmit using the Signal Translator.\nEach message must be separated by a comma and a white space, like so -> 'Message, Another message'\nApplies after a game restart.");
			malfunctionWarnings = ((BaseUnityPlugin)this).Config.Bind<bool>("Mod Interactions", "Malfunction Warnings", true, "If set to true, VEGA will warn you and give you info on a malfunction from the Malfunctions mod when it happens.");
			meltdownTimer = ((BaseUnityPlugin)this).Config.Bind<bool>("Mod Interactions", "Facility Meltdown timer", true, "If set to true, VEGA will tell you how much time you have left before the explosion happens when there's a minute or less left.");
			diversitySpeaker = ((BaseUnityPlugin)this).Config.Bind<bool>("Mod Interactions", "Diversity Speaker", true, "If set to true, VEGA will reply to Diversity's speaker.");
			diversitySpeakerReplyChance = ((BaseUnityPlugin)this).Config.Bind<int>("Mod Interactions", "Reply chance", 40, new ConfigDescription("Changes how likely it is for VEGA to reply to the Diversity speaker.\n0 means it will never reply, 100 means it will always reply.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			gratitudeConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Gratitude", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize the 'Thank you' voice commands. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			stopConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Stop talking", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize the 'Stop talking' voice commands. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			secureDoorsConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Secure doors", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize the voice commands used to interact with secure doors. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			turretsConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Turrets", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize voice commands used to disable turrets. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			landminesConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Landmines", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize voice commands used to disable landmines. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			trapsConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Spike traps", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize voice commands used to disable spike traps. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			signalsConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Signal translator", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize the voice commands related to the Signal Translator. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			teleportConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Teleport", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize the 'Teleport' and 'Radar Switch' voice commands. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			shipConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Ship", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize voice commands related to the ship's lights, doors and shutters. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			miscConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Miscellaneous", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize voice commands related to the Advanced Scanner and Radar Boosters. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			upgradesConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Ship upgrades", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize voice commands related to LGU. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			crewStatusConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Crew Status", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize the 'Crew status' voice commands. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			crewInShipConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Crew in ship", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize the 'Crew in ship' voice commands. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			scrapLeftConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Scrap / items left", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize the 'Scrap / items left' voice commands. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			infoConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Info", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize voice commands related to information about Entities, Moons, Weather phenomena and the current Time of day. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			manualActivationConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("Confidence", "Manual Activation", 0.7f, new ConfigDescription("Determines how difficult it is for VEGA to recognize the 'Manual Activation' voice commands. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\nCan be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			volume = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Settings", "Volume", 1f, new ConfigDescription("Changes how loud VEGA is.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			volume.SettingChanged += delegate
			{
				if ((Object)(object)VEGA.audioSource != (Object)null)
				{
					VEGA.audioSource.volume = volume.Value;
				}
				if ((Object)(object)VEGA.sfxAudioSource != (Object)null)
				{
					VEGA.sfxAudioSource.volume = volume.Value;
				}
			};
			ignoreMasterVolume = ((BaseUnityPlugin)this).Config.Bind<bool>("Sound Settings", "Ignore Master Volume setting", false, "If set to true, VEGA will ignore the game's master volume setting and always play at the same volume level.\nThis setting only applies before joining a game.");
			ignoreMasterVolume.SettingChanged += delegate
			{
				if ((Object)(object)VEGA.audioSource != (Object)null)
				{
					VEGA.audioSource.ignoreListenerVolume = ignoreMasterVolume.Value;
				}
				if ((Object)(object)VEGA.sfxAudioSource != (Object)null)
				{
					VEGA.sfxAudioSource.ignoreListenerVolume = ignoreMasterVolume.Value;
				}
			};
			useManualListening = ((BaseUnityPlugin)this).Config.Bind<bool>("Manual Listening", "Enabled", false, "Manual Listening determines if VEGA should only be able to hear you when you ask him to.");
			enableManualListeningAuto = ((BaseUnityPlugin)this).Config.Bind<bool>("Manual Listening", "Enable VEGA listening automatically", false, "Makes VEGA listen automatically when joining a game. Only works if Manual Listening is set to true.");
			enableManualListeningAuto.SettingChanged += delegate
			{
				if (!VEGA.listening)
				{
					VEGA.PlaySFX("Activate");
				}
				else
				{
					VEGA.PlaySFX("Deactivate");
				}
				VEGA.listening = enableManualListeningAuto.Value;
			};
			scannerRange = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Range", 29f, new ConfigDescription("Changes how far the Advanced Scanner can reach (in meters).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 29f), Array.Empty<object>()));
			scannerRange.SettingChanged += delegate
			{
				VEGA.scannerRange = scannerRange.Value;
			};
			enableAdvancedScannerAuto = ((BaseUnityPlugin)this).Config.Bind<bool>("Advanced Scanner", "Enable the Advanced Scanner automatically", false, "Enables VEGA's Advanced Scanner automatically when joining a game. Useful if you always want to have it on and don't want to repeat the voice command often.");
			enableAdvancedScannerAuto.SettingChanged += delegate
			{
				VEGA.advancedScannerActive = enableAdvancedScannerAuto.Value;
				if (!VEGA.advancedScannerActive)
				{
					if ((Object)(object)HUDManagerPatch.entities != (Object)null)
					{
						((TMP_Text)HUDManagerPatch.entities.GetComponent<TextMeshProUGUI>()).SetText("", true);
					}
					if ((Object)(object)HUDManagerPatch.items != (Object)null)
					{
						((TMP_Text)HUDManagerPatch.items.GetComponent<TextMeshProUGUI>()).SetText("", true);
					}
				}
			};
			detectMasked = ((BaseUnityPlugin)this).Config.Bind<bool>("Advanced Scanner", "Detect Masked employees", false, "Determines if the Advanced Scanner should be able to count Masked employees as entities.");
			infoDisplayMode = ((BaseUnityPlugin)this).Config.Bind<DisplayModes>("Advanced Scanner", "Info display mode", DisplayModes.Default, "Changes how the Advanced Scanner displays information.");
			infoDisplayMode.SettingChanged += delegate
			{
				VEGA.UpdateScannerDisplayMode();
			};
			scale = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Scale", 1f, "The size of the Advanced Scanner on the screen.");
			scale.SettingChanged += delegate
			{
				HUDManagerPatch.UpdateScannerPosAndScale();
			};
			horizontalPosition = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Horizontal position", 45f, "The horizontal position of the Advanced Scanner on the screen.");
			horizontalPosition.SettingChanged += delegate
			{
				HUDManagerPatch.UpdateScannerPosAndScale();
			};
			verticalPosition = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Vertical position", 180f, "The vertical position of the Advanced Scanner on the screen.");
			verticalPosition.SettingChanged += delegate
			{
				HUDManagerPatch.UpdateScannerPosAndScale();
			};
			horizontalGap = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Horizontal gap", 0f, "The horizontal gap between the nearby Entities and Items on the screen.");
			horizontalGap.SettingChanged += delegate
			{
				HUDManagerPatch.UpdateScannerPosAndScale();
			};
			verticalGap = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Vertical gap", 50f, "The vertical gap between the nearby Entities and Items on the screen.");
			verticalGap.SettingChanged += delegate
			{
				HUDManagerPatch.UpdateScannerPosAndScale();
			};
			entitiesTextLength = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Entities text length", 200f, "Determines how much text fits in a single line in the Entities section of the scanner.");
			entitiesTextLength.SettingChanged += delegate
			{
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				//IL_0053: Unknown result type (might be due to invalid IL or missing references)
				float num4 = (ModChecker.hasEladsHUD ? (entitiesTextLength.Value + 100f) : entitiesTextLength.Value);
				if ((Object)(object)HUDManagerPatch.entities != (Object)null)
				{
					HUDManagerPatch.entities.GetComponent<RectTransform>().sizeDelta = new Vector2(num4, HUDManagerPatch.entities.GetComponent<RectTransform>().sizeDelta.y);
				}
			};
			itemsTextLength = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Items text length", 200f, "Determines how much text fits in a single line in the Items section of the scanner.");
			itemsTextLength.SettingChanged += delegate
			{
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				//IL_0053: Unknown result type (might be due to invalid IL or missing references)
				float num3 = (ModChecker.hasEladsHUD ? (itemsTextLength.Value + 100f) : itemsTextLength.Value);
				if ((Object)(object)HUDManagerPatch.items != (Object)null)
				{
					HUDManagerPatch.items.GetComponent<RectTransform>().sizeDelta = new Vector2(num3, HUDManagerPatch.items.GetComponent<RectTransform>().sizeDelta.y);
				}
			};
			entitiesAlignment = ((BaseUnityPlugin)this).Config.Bind<TextAlignmentOptions>("Advanced Scanner", "Entities text alignment", (TextAlignmentOptions)513, "The alignment of the Entities section of the scanner.");
			entitiesAlignment.SettingChanged += delegate
			{
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)VEGA.entitiesTextComponent != (Object)null)
				{
					((TMP_Text)VEGA.entitiesTextComponent).alignment = entitiesAlignment.Value;
				}
			};
			itemsAlignment = ((BaseUnityPlugin)this).Config.Bind<TextAlignmentOptions>("Advanced Scanner", "Items text alignment", (TextAlignmentOptions)513, "The alignment of the Advanced Scanner on the screen.");
			itemsAlignment.SettingChanged += delegate
			{
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)VEGA.itemsTextComponent != (Object)null)
				{
					((TMP_Text)VEGA.itemsTextComponent).alignment = itemsAlignment.Value;
				}
			};
			entitiesTilt = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Entities tilt", 22f, "The inclination of the Entities component on the screen.");
			entitiesTilt.SettingChanged += delegate
			{
				//IL_0042: Unknown result type (might be due to invalid IL or missing references)
				//IL_004f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0059: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)VEGA.entitiesTextComponent != (Object)null)
				{
					RectTransform component2 = ((Component)VEGA.entitiesTextComponent).GetComponent<RectTransform>();
					float num2 = (ModChecker.hasEladsHUD ? (entitiesTilt.Value - 17f) : entitiesTilt.Value);
					((Transform)component2).localRotation = Quaternion.Euler(((Transform)component2).localRotation.x, 0f - num2, ((Transform)component2).localRotation.z);
				}
			};
			itemsTilt = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Items tilt", 22f, "The inclination of the Items component on the screen.");
			itemsTilt.SettingChanged += delegate
			{
				//IL_0042: Unknown result type (might be due to invalid IL or missing references)
				//IL_004f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0059: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)VEGA.itemsTextComponent != (Object)null)
				{
					RectTransform component = ((Component)VEGA.itemsTextComponent).GetComponent<RectTransform>();
					float num = (ModChecker.hasEladsHUD ? (itemsTilt.Value - 17f) : itemsTilt.Value);
					((Transform)component).localRotation = Quaternion.Euler(((Transform)component).localRotation.x, 0f - num, ((Transform)component).localRotation.z);
				}
			};
			clearTextColor = ((BaseUnityPlugin)this).Config.Bind<Colors>("Advanced Scanner", "Clear color", Colors.Blue, "Changes the color of the text under both sections of the scanner when no entities or items are within its range.");
			clearTextColor.SettingChanged += delegate
			{
				VEGA.UpdateScannerColors();
			};
			entitiesNearbyTextColor = ((BaseUnityPlugin)this).Config.Bind<Colors>("Advanced Scanner", "Entities nearby color", Colors.Red, "Changes the color of the text under the Entities section of the scanner when entities are within the scanner's range.");
			entitiesNearbyTextColor.SettingChanged += delegate
			{
				VEGA.UpdateScannerColors();
			};
			itemsNearbyTextColor = ((BaseUnityPlugin)this).Config.Bind<Colors>("Advanced Scanner", "Items nearby color", Colors.Green, "Changes the color of the text under the Items section of the scanner when items are within the scanner's range.");
			itemsNearbyTextColor.SettingChanged += delegate
			{
				VEGA.UpdateScannerColors();
			};
			dataUnavailableTextColor = ((BaseUnityPlugin)this).Config.Bind<Colors>("Advanced Scanner", "Data unavailable color", Colors.Yellow, "Changes the color of the text under both sections of the scanner when a Communications or Power malfunction happen.");
			dataUnavailableTextColor.SettingChanged += delegate
			{
				VEGA.UpdateScannerColors();
			};
			customColorCodes = ((BaseUnityPlugin)this).Config.Bind<string>("Advanced Scanner", "Custom color codes", "#0000ff, #ff0000, #008000, #ffff00", "Allows you to introduce your own custom color codes for the Clear, Entities, Items and Data unavailable color options.\nMake sure you separate the different values with a comma and a blank space.");
			customColorCodes.SettingChanged += delegate
			{
				VEGA.UpdateScannerColors();
			};
			playerNameColors = ((BaseUnityPlugin)this).Config.Bind<string>("Text Chat", "Player name colors", "", "Allows you to change the color of people's usernames in VEGA's chat messages using hex codes. The format is:\n'username: hex code, otherusername: hex code'");
			playerNameColors.SettingChanged += delegate
			{
				VEGA.RestoreNameColors();
				VEGA.AddNameColors();
			};
			sendRadarSwitchChatMessage = ((BaseUnityPlugin)this).Config.Bind<bool>("Text Chat", "Send Radar Switch chat message", true, "If set to true, VEGA will send a message in the text chat that lets everyone know you used the Radar Switch command.");
			sendSignalTranslatorChatMessage = ((BaseUnityPlugin)this).Config.Bind<bool>("Text Chat", "Send Signal Translator chat message", true, "If set to true, VEGA will send a message in the text chat that lets everyone know you used VEGA to transmit a signal.");
			sendTeleporterChatMessage = ((BaseUnityPlugin)this).Config.Bind<bool>("Text Chat", "Send Teleporter chat message", true, "If set to true, VEGA will send a message in the text chat that lets everyone know you asked VEGA to activate the teleporter.");
			sendDiscombobulatorChatMessage = ((BaseUnityPlugin)this).Config.Bind<bool>("Text Chat", "Send Discombobulator chat message", true, "If set to true, VEGA will send a message in the text chat that lets everyone know you made use of the Discombobulator through VEGA.");
			patchReadInput = ((BaseUnityPlugin)this).Config.Bind<bool>("Patches", "Patch ReadInput", true, "Enables / disables the code that checks for player input and allows you to make VEGA listen / stop listening by pressing a key.");
			enhancedTeleportCommands = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Enhanced Teleport commands", true, "Makes VEGA perform the radar switch before activating the teleporter.");
			registerActivation = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Manual Listening commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			startListeningCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Start listening commands", "VEGA, activate", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			stopListeningCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Stop listening commands", "VEGA, deactivate", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerMoonsInfo = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Moon info commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			moonsInfoCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Moon info commands", "VEGA, info about", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.\nIMPORTANT: Moon info commands will always have the moon's name at the end!");
			registerBestiaryEntries = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Bestiary entries commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			bestiaryEntriesCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Bestiary entries commands", "VEGA, read", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.\nIMPORTANT: Bestiary entries commands will always end with the name of the creature + entry, like so:\nVEGA, read Bracken entry");
			registerCreatureInfo = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Creature info commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			creatureInfoCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Creature info commands", "VEGA, info about", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.\nIMPORTANT: Creature info commands will always have the creature's name at the end!");
			registerAdvancedScanner = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Advanced Scanner commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			activateAdvancedScannerCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Activate Advanced Scanner commands", "VEGA, activate scanner/VEGA, activate advanced scanner/VEGA, turn on scanner/VEGA, turn on advanced scanner/VEGA, scan/VEGA, enable scanner/VEGA, enable advanced scanner", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			deactivateAdvancedScannerCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Deactivate Advanced Scanner commands", "VEGA, disable scanner/VEGA, disable advanced scanner/VEGA, turn off scanner/VEGA, turn off advanced scanner/VEGA, disable scan", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerInteractSecureDoor = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Open / Close Secure Door commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			openSecureDoorCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Open secure door commands", "VEGA, open secure door/VEGA, open door/VEGA, open the door/VEGA, open the secure door", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			closeSecureDoorCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Close secure door commands", "VEGA, close secure door/VEGA, close door/VEGA, close the door/VEGA, close the secure door", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerInteractAllSecureDoors = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Open / Close All Secure Doors command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
			openAllSecureDoorsCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Open all secure door commands", "VEGA, open all secure doors/VEGA, open all doors", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			closeAllSecureDoorsCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Close all secure door commands", "VEGA, close all secure doors/VEGA, close all doors", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerDisableTurret = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Disable Turret command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
			disableTurretCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Disable turret commands", "VEGA, disable turret/VEGA, disable the turret", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerDisableAllTurrets = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Disable All Turrets command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
			disableAllTurretsCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Disable all turrets commands", "VEGA, disable all turrets", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerDisableMine = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Disable Mine command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
			disableMineCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Disable landmine commands", "VEGA, disable the mine/VEGA, disable mine/VEGA, disable the landmine/VEGA, disable landmine", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerDisableAllMines = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Disable All Mines command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
			disableAllMinesCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Disable all landmines commands", "VEGA, disable all mines/VEGA, disable all landmines", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerDisableSpikeTrap = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Disable Spike Trap command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
			disableSpikeTrapCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Disable spike trap commands", "VEGA, disable the trap/VEGA, disable trap/VEGA, disable the spike trap/VEGA, disable spike trap", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerDisableAllSpikeTraps = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Disable All Spike Traps command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
			disableAllSpikeTrapsCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Disable all spike traps commands", "VEGA, disable all traps/VEGA, disable all spike traps", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerTeleporter = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Teleporter commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			teleporterCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Teleporter commands", "VEGA, teleport/VEGA, activate teleporter/VEGA, tp/VEGA, activate tp", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerRadarSwitch = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Radar Switch commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			radarSwitchCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Radar Switch commands", "VEGA, switch to me/VEGA, switch radar/VEGA, switch radar to me/VEGA, focus/VEGA, focus on me", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerDiscombobulator = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Discombobulator upgrade commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.\nNote: This command only works with Late Game Upgrades installed.");
			discombobulatorCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Discombobulator commands", "VEGA, attack/VEGA, stun/VEGA, shock", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerCrewStatus = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Crew Status commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			crewStatusCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Crew Status commands", "VEGA, crew status/VEGA, team status/VEGA, crew info/VEGA, team info/VEGA, crew report/VEGA, team report", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerCrewInShip = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Crew in ship commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			crewInShipCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Crew in ship commands", "VEGA, crew in ship/VEGA, people in ship/VEGA, get crew in ship/VEGA, get people in ship/VEGA, how many people are in the ship/VEGA, is anyone in the ship/VEGA, is anybody in the ship?", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerScrapLeft = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Scrap / items left commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			scrapLeftCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Scrap / items left commands", "VEGA, scrap left/VEGA, items left/VEGA, scan for scrap/VEGA, scan for items", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerRadarBoosters = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Radar Booster commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			radarPingCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Radar Booster ping commands", "VEGA, ping", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			radarFlashCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Radar Booster flash commands", "VEGA, flash", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerSignalTranslator = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Signal Translator commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			transmitCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Transmit / send commands", "VEGA, transmit/VEGA, send", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.\nIMPORTANT: Transmit / send commands will always have the message at the end!");
			registerTime = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Current time of day commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			timeCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Current time commands", "VEGA, what's the current time of day/VEGA, current time of day/VEGA, time of day/VEGA, current time/VEGA, time/VEGA, what time is it?", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerInteractShipDoors = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Ship Door commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			openShipDoorsCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Open ship doors commands", "VEGA, open ship doors/VEGA, open the ship's doors/VEGA, open hangar doors", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			closeShipDoorsCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Close ship doors commands", "VEGA, close ship doors/VEGA, close the ship's doors/VEGA, close hangar doors", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerInteractShipLights = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Ship Lights commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			lightsOnCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Ship Lights on commands", "VEGA, lights on/VEGA, turn the lights on", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			lightsOffCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Ship Lights off commands", "VEGA, lights out/VEGA, lights off/VEGA, turn the lights off", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerInteractShipMagnet = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Ship Magnet commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			magnetOnCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Activate Magnet commands", "VEGA, activate magnet/VEGA, enable magnet/VEGA, turn magnet on", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			magnetOffCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Deactivate Magnet commands", "VEGA, deactivate magnet/VEGA, disable magnet/VEGA, turn magnet off", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerInteractShipShutters = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Ship Shutters commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.\nNote: This command only works with ShipWindows installed.");
			openShuttersCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Open Ship Shutters commands", "VEGA, open shutters/VEGA, open window shutters/VEGA, open ship shutters", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			closeShuttersCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Close Ship Shutters commands", "VEGA, close shutters/VEGA, close window shutters/VEGA, close ship shutters", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerWeatherInfo = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Weather info commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			registerStop = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Stop Talking commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			stopCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Stop talking commands", "VEGA, shut up/VEGA, stop/VEGA, stop talking/Shut up, VEGA/Stop, VEGA/Stop talking, VEGA", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
			registerThanks = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register gratitude commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
			gratitudeCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Gratitude commands", "VEGA, thank you/VEGA, thanks/Thank you, VEGA/Thanks, VEGA", "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
		}

		public static void LogToConsole(string message, string logType = "")
		{
			switch (logType.ToLower())
			{
			case "warn":
				mls.LogWarning((object)message);
				break;
			case "error":
				mls.LogError((object)message);
				break;
			case "debug":
				mls.LogDebug((object)message);
				break;
			default:
				mls.LogInfo((object)message);
				break;
			}
		}
	}
	internal class SaveManager
	{
		public static string fileName = "\\VEGA_Interactions.bin";

		public static bool playedIntro;

		public static bool firstTimeDiversity;

		public static bool hadDiversity;

		public static void SaveToFile()
		{
			using BinaryWriter binaryWriter = new BinaryWriter(File.Open(Application.persistentDataPath + fileName, FileMode.Create));
			binaryWriter.Write(playedIntro);
			binaryWriter.Write(firstTimeDiversity);
			binaryWriter.Write(hadDiversity);
		}

		public static List<bool> ReadFromFile()
		{
			List<bool> list = new List<bool>();
			using (FileStream fileStream = new FileStream(Application.persistentDataPath + fileName, FileMode.Open, FileAccess.Read))
			{
				using BinaryReader binaryReader = new BinaryReader(fileStream);
				while (fileStream.Position < fileStream.Length)
				{
					list.Add(binaryReader.ReadBoolean());
				}
			}
			return list;
		}

		public static bool GetValueFromIndex(int index)
		{
			List<bool> list = ReadFromFile();
			if (list.Count > index)
			{
				return list[index];
			}
			return false;
		}
	}
	internal class VEGA
	{
		public static AudioSource audioSource;

		public static AudioSource sfxAudioSource;

		public static List<AudioClip> audioClips;

		public static bool listening;

		public static bool shouldBeInterrupted;

		public static bool warningGiven;

		public static bool facilityHasPower;

		public static float teleporterCooldownTime;

		public static TextMeshProUGUI entitiesTextComponent;

		public static TextMeshProUGUI itemsTextComponent;

		public static char creditsChar;

		private static Dictionary<string, string> nameColorPairs = new Dictionary<string, string>
		{
			{ "JS0", "#b51b3e" },
			{ "Dorimon Pls", "#ff0000" },
			{ "Lunxara", "#6700bd" },
			{ "Mina", "#a11010" },
			{ "Sua", "#79e5cb" },
			{ "Nico", "#ffffff" },
			{ "xVenatoRx", "#ff8000" },
			{ "Jowyck", "#00ffff" }
		};

		internal static string[] htmlColors = new string[40]
		{
			"", "<color=red>", "<color=#ff4d4d>", "<color=#b30000>", "<color=#b51b3e>", "<color=#a11010>", "<color=#dc143c>", "<color=blue>", "<color=#6666ff>", "<color=#0000b3>",
			"<color=#0848ad>", "<color=#00ffff>", "<color=#79e5cb>", "<color=green>", "<color=#00cc00>", "<color=#004d00>", "<color=#02F296>", "<color=#00ff00>", "<color=yellow>", "<color=#ffff66>",
			"<color=#cccc00>", "<color=#ffd700>", "<color=#ffa500>", "<color=#ffc966>", "<color=#cc8500>", "<color=#ff8000>", "<color=#ffc0cb>", "<color=#ffe6ea>", "<color=#ff8095>", "<color=#e20c96>",
			"<color=#800080>", "<color=#b300b3>", "<color=#4d004d>", "<color=#6700BD>", "<color=#ff00ff>", "<color=#ffffff>", "<color=#808080>", "<color=#b3b3b3>", "<color=#4d4d4d>", "<color=#000000>"
		};

		public static bool advancedScannerActive;

		internal static string enemiesTopText;

		internal static string enemiesTextColor;

		internal static string itemsTopText;

		internal static string itemsTextColor;

		internal static string clearTextColor;

		internal static string dataUnavailableTextColor;

		internal static float scannerRange;

		private static string oneEntityText;

		private static string entitiesText;

		private static string oneItemText;

		private static string itemsText;

		internal static bool turretsExist;

		internal static bool turretDisabled;

		internal static bool noVisibleTurret;

		internal static bool noTurrets;

		internal static float distanceToTurret;

		internal static bool toilDisabled;

		internal static bool noToils;

		internal static float distanceToToil;

		internal static bool malfunctionPowerTriggered;

		internal static bool malfunctionTeleporterTriggered;

		internal static bool malfunctionDistortionTriggered;

		internal static bool malfunctionDoorTriggered;

		public static string[] signals;

		public static string[] weathers = new string[5] { "Foggy", "Rainy", "Stormy", "Flooded", "Eclipsed" };

		public static Dictionary<int, string> enemies = new Dictionary<int, string>
		{
			{ 0, "SnareFlea" },
			{ 1, "Bracken" },
			{ 2, "Thumper" },
			{ 3, "EyelessDog" },
			{ 4, "YippeeBug" },
			{ 5, "Slime" },
			{ 6, "ForestKeeper" },
			{ 7, "Coil-Head" },
			{ 9, "Sandworm" },
			{ 10, "Jester" },
			{ 11, "SporeLizard" },
			{ 12, "BunkerSpider" },
			{ 13, "Manticoil" },
			{ 14, "RedBees" },
			{ 15, "Locusts" },
			{ 16, "BaboonHawk" },
			{ 17, "Nutcracker" },
			{ 18, "OldBird" },
			{ 19, "Butler" },
			{ 20, "Hornets" },
			{ 21, "Snakes" },
			{ 22, "VainShroud" },
			{ 23, "KidnapperFox" },
			{ 24, "Barber" }
		};

		public static string[] moddedEnemies = new string[14]
		{
			"RedWood Giant", "Stalker", "DriftWood Giant", "Football", "Shy guy", "Locker", "Siren Head", "Rolling Giant", "Peepers", "Shockwave Drone",
			"Cleaning Drone", "Moving Turret", "Maggie", "Shrimp"
		};

		private static readonly string[] vanillaEntityNames = new string[53]
		{
			"Baboon Hawk", "Baboon", "Hawk", "Bunker Spider", "Spider", "Hoarding Bug", "Loot Bug", "Yippee Bug", "Barber", "Bracken",
			"Butler", "Coil Head", "Coil", "Forest Keeper", "Giant", "Keeper", "Eyeless Dog", "Dog", "Earth Leviathan", "Leviathan",
			"Worm", "Jester", "Roaming Locusts", "Locusts", "Manticoil", "Nutcracker", "Old Bird", "Bird", "Mech", "Circuit Bees",
			"Red Bees", "Bees", "Hygrodere", "Slime", "Blob", "Tulip Snake", "Tulip", "Snake", "Snare Flea", "Flea",
			"Centipede", "Spore Lizard", "Spore Doggy", "Lizard", "Thumper", "Crawler", "Halve", "Vain Shroud", "Vain", "Shroud",
			"Kidnapper Fox", "Kidnapper", "Fox"
		};

		private static readonly string[] moddedEntityNames = new string[22]
		{
			"Redwood Giant", "Redwood", "Driftwood Giant", "Driftwood", "Faceless Stalker", "Slenderman", "Slender", "Football", "Shy Guy", "SCP 096",
			"Locker", "Siren Head", "Rolling Giant", "Peepers", "Peeper", "Shockwave Drone", "Cleaning Drone", "Moving Turret", "Mobile Turret", "The Lost",
			"Maggie", "Shrimp"
		};

		private static readonly string[] moonNames = new string[15]
		{
			"Experimentation", "Vow", "Assurance", "Ass", "March", "Adamance", "Offense", "Rend", "Dine", "Titan",
			"Tit", "Artifice", "Embrion", "Mars", "Liquidation"
		};

		public static void PlayLine(string clipName, float delay = 0.25f, bool checkPlayerStatus = true, bool skip = false)
		{
			if ((Object)(object)audioSource != (Object)null)
			{
				if ((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null || (checkPlayerStatus && StartOfRound.Instance.localPlayerController.isPlayerDead) || (!skip && audioSource.isPlaying))
				{
					return;
				}
				foreach (AudioClip audioClip in audioClips)
				{
					if (((Object)audioClip).name.Equals(clipName))
					{
						audioSource.clip = audioClip;
					}
				}
				if ((Object)(object)audioSource.clip != (Object)null)
				{
					Plugin.LogToConsole("Playing " + ((Object)audioSource.clip).name + " with a " + delay + " second delay");
				}
				audioSource.PlayDelayed(delay);
			}
			else
			{
				Plugin.LogToConsole("Unable to play audio. The audio source for VEGA does not exist", "warn");
			}
		}

		public static void PlaySFX(string clipName, float delay = 0.25f, bool checkPlayerStatus = true, bool skip = false)
		{
			if ((Object)(object)sfxAudioSource != (Object)null)
			{
				if ((checkPlayerStatus && StartOfRound.Instance.localPlayerController.isPlayerDead) || (!skip && sfxAudioSource.isPlaying))
				{
					return;
				}
				foreach (AudioClip audioClip in audioClips)
				{
					if (((Object)audioClip).name.Equals(clipName))
					{
						sfxAudioSource.clip = audioClip;
					}
				}
				if ((Object)(object)sfxAudioSource.clip != (Object)null)
				{
					Plugin.LogToConsole("Playing " + ((Object)sfxAudioSource.clip).name + " with a " + delay + " second delay");
				}
				sfxAudioSource.PlayDelayed(delay);
			}
			else
			{
				Plugin.LogToConsole("Unable to play SFX. The SFX audio source for VEGA does not exist", "warn");
			}
		}

		public static void PlayRandomLine(string clipName, int range, float delay = 0.25f, bool checkPlayerStatus = true, bool skip = false)
		{
			clipName = clipName + "-" + range;
			PlayLine(clipName, delay, checkPlayerStatus, skip);
		}

		internal static string GetEntityAudioClipName(string entityName)
		{
			switch (entityName)
			{
			case "Baboon Hawk":
			case "Baboon":
			case "Hawk":
				return "BaboonHawk";
			case "Bunker Spider":
			case "Spider":
				return "BunkerSpider";
			case "Hoarding Bug":
			case "Loot Bug":
			case "Yippee Bug":
				return "YippeeBug";
			case "Coil Head":
			case "Coil":
				return "Coil-Head";
			case "Forest Keeper":
			case "Giant":
			case "Keeper":
				return "ForestKeeper";
			case "Eyeless Dog":
			case "Dog":
				return "EyelessDog";
			case "Earth Leviathan":
			case "Leviathan":
			case "Worm":
				return "Sandworm";
			case "Roaming Locusts":
				return "Locusts";
			case "Old Bird":
			case "Bird":
			case "Mech":
				return "OldBird";
			case "Circuit Bees":
			case "Red Bees":
			case "Bees":
				return "RedBees";
			case "Hygrodere":
			case "Blob":
				return "Slime";
			case "Tulip Snake":
			case "Tulip":
			case "Snake":
				return "Snakes";
			case "Snare Flea":
			case "Flea":
			case "Centipede":
				return "SnareFlea";
			case "Spore Lizard":
			case "Spore Doggy":
			case "Lizard":
				return "SporeLizard";
			case "Crawler":
			case "Halve":
				return "Thumper";
			case "Vain Shroud":
			case "Vain":
			case "Shroud":
				return "VainShroud";
			case "Kidnapper Fox":
			case "Kidnapper":
			case "Fox":
				return "KidnapperFox";
			case "Redwood Giant":
			case "Redwood":
				return "RedWood Giant";
			case "Driftwood Giant":
			case "Driftwood":
				return "DriftWood Giant";
			case "Faceless Stalker":
			case "Slenderman":
			case "Slender":
				return "Stalker";
			case "Shy Guy":
			case "SCP 096":
				return "Shy guy";
			case "Peeper":
				return "Peepers";
			case "Mobile Turret":
				return "Moving Turret";
			case "The Lost":
				return "Maggie";
			default:
				return entityName;
			}
		}

		internal static string GetMoonAudioClipName(string moonName)
		{
			switch (moonName)
			{
			case "Experimentation":
				return "41-EXP";
			case "Vow":
				return "56-VOW";
			case "Ass":
			case "Assurance":
				return "220-ASS";
			case "March":
				return "61-MAR";
			case "Adamance":
				return "20-ADA";
			case "Offense":
				return "21-OFF";
			case "Rend":
				return "85-REN";
			case "Dine":
				return "7-DIN";
			case "Tit":
			case "Titan":
				return "8-TIT";
			case "Artifice":
				return "68-ART";
			case "Embrion":
				return "5-EMB";
			case "Liquidation":
				return "44-LIQ";
			case "Mars":
				return "4-MARS";
			default:
				return moonName;
			}
		}

		internal static bool ClientHasMoon(string moonName)
		{
			SelectableLevel[] levels = StartOfRound.Instance.levels;
			foreach (SelectableLevel val in levels)
			{
				if (val.PlanetName.Equals(moonName))
				{
					return true;
				}
			}
			PlayRandomLine("NoInfoOnMoon", Random.Range(1, 4));
			return false;
		}

		internal static void OpenSecureDoor()
		{
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			TerminalAccessibleObject closestSecureDoor = GetClosestSecureDoor();
			if (StartOfRound.Instance.localPlayerController.isInsideFactory)
			{
				if (!facilityHasPower)
				{
					PlayRandomLine("NoPower", Random.Range(1, 4));
				}
				else
				{
					if (!((Object)(object)closestSecureDoor != (Object)null))
					{
						return;
					}
					if (Vector3.Distance(((Component)closestSecureDoor).transform.position, ((Component)StartOfRound.Instance.localPlayerController).transform.position) < 11f)
					{
						Plugin.LogToConsole("Opening door", "debug");
						closestSecureDoor.SetDoorLocalClient(true);
						if (Plugin.vocalLevel.Value >= VocalLevels.High)
						{
							PlayRandomLine("DoorOpened", Random.Range(1, 4), 0.7f);
						}
					}
					else
					{
						if (Plugin.vocalLevel.Value >= VocalLevels.Medium)
						{
							PlayLine("NoDoorNearby");
						}
						PlayLine("NoDoorNearbyLow");
					}
				}
			}
			else
			{
				PlayRandomLine("IndoorsOnly", Random.Range(1, 4));
			}
		}

		internal static void OpenAllDoors()
		{
			bool flag = false;
			TerminalAccessibleObject[] array = Object.FindObjectsOfType<TerminalAccessibleObject>();
			TerminalAccessibleObject[] array2 = array;
			foreach (TerminalAccessibleObject val in array2)
			{
				if (val.isBigDoor)
				{
					val.SetDoorLocalClient(true);
					flag = true;
				}
			}
			if (flag)
			{
				if (!facilityHasPower)
				{
					PlayRandomLine("NoPower", Random.Range(1, 4));
					return;
				}
				Plugin.LogToConsole("Opening all doors", "debug");
				if (Plugin.vocalLevel.Value >= VocalLevels.High)
				{
					PlayRandomLine("AllDoorsOpened", Random.Range(1, 3), 0.7f);
				}
			}
			else
			{
				PlayLine("NoDoors");
			}
		}

		internal static void CloseSecureDoor()
		{
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			TerminalAccessibleObject closestSecureDoor = GetClosestSecureDoor();
			if (StartOfRound.Instance.localPlayerController.isInsideFactory)
			{
				if (!facilityHasPower)
				{
					PlayRandomLine("NoPower", Random.Range(1, 4));
				}
				else
				{
					if (!((Object)(object)closestSecureDoor != (Object)null))
					{
						return;
					}
					if (Vector3.Distance(((Component)closestSecureDoor).transform.position, ((Component)StartOfRound.Instance.localPlayerController).transform.position) < 11f)
					{
						Plugin.LogToConsole("Closing door", "debug");
						closestSecureDoor.SetDoorLocalClient(false);
						if (Plugin.vocalLevel.Value >= VocalLevels.High)
						{
							PlayRandomLine("DoorClosed", Random.Range(1, 4), 0.7f);
						}
					}
					else
					{
						PlayLine("NoDoorNearby");
					}
				}
			}
			else
			{
				PlayRandomLine("IndoorsOnly", Random.Range(1, 4));
			}
		}

		internal static void CloseAllDoors()
		{
			bool flag = false;
			TerminalAccessibleObject[] array = Object.FindObjectsOfType<TerminalAccessibleObject>();
			TerminalAccessibleObject[] array2 = array;
			foreach (TerminalAccessibleObject val in array2)
			{
				if (val.isBigDoor)
				{
					val.SetDoorLocalClient(false);
					flag = true;
				}
			}
			if (flag)
			{
				if (!facilityHasPower)
				{
					PlayRandomLine("NoPower", Random.Range(1, 4));
					return;
				}
				Plugin.LogToConsole("Closing all doors", "debug");
				if (Plugin.vocalLevel.Value >= VocalLevels.High)
				{
					PlayRandomLine("AllDoorsClosed", Random.Range(1, 3), 0.7f);
				}
			}
			else
			{
				PlayLine("NoDoors");
			}
		}

		internal static TerminalAccessibleObject? GetClosestSecureDoor()
		{
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			Plugin.LogToConsole("Getting closest secure door", "debug");
			TerminalAccessibleObject[] array = Object.FindObjectsOfType<TerminalAccessibleObject>();
			List<TerminalAccessibleObject> list = new List<TerminalAccessibleObject>();
			TerminalAccessibleObject[] array2 = array;
			foreach (TerminalAccessibleObject val in array2)
			{
				if (val.isBigDoor)
				{
					list.Add(val);
				}
			}
			if (list.Count() == 0)
			{
				PlayLine("NoDoors");
				return null;
			}
			TerminalAccessibleObject result = list[0];
			List<float> list2 = new List<float>();
			foreach (TerminalAccessibleObject item in list)
			{
				float num = Vector3.Distance(((Component)item).transform.position, ((Component)StartOfRound.Instance.localPlayerController).transform.position);
				list2.Add(num);
				if (num <= list2.Min())
				{
					result = item;
				}
			}
			return result;
		}

		internal static TerminalAccessibleObject? GetClosestTurret()
		{
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			Plugin.LogToConsole("Getting closest turret", "debug");
			List<TerminalAccessibleObject> list = new List<TerminalAccessibleObject>();
			TerminalAccessibleObject[] array = Object.FindObjectsOfType<TerminalAccessibleObject>();
			TerminalAccessibleObject[] array2 = array;
			foreach (TerminalAccessibleObject val in array2)
			{
				if (Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent<Turret>()))
				{
					list.Add(val);
				}
			}
			if (list.Count() == 0)
			{
				noTurrets = true;
				return null;
			}
			TerminalAccessibleObject result = list[0];
			List<float> list2 = new List<float>();
			foreach (TerminalAccessibleObject item in list)
			{
				float num = Vector3.Distance(((Component)item).transform.position, ((Component)StartOfRound.Instance.localPlayerController).transform.position);
				list2.Add(num);
				if (num <= list2.Min() && StartOfRound.Instance.localPlayerController.HasLineOfSightToPosition(((Component)item).transform.position, 45f, 10000, -1f))
				{
					result = item;
				}
				else if (list2.Count() > 0)
				{
					list2.Remove(num);
				}
			}
			if (list2.Count() == 0)
			{
				noVisibleTurret = true;
				return null;
			}
			distanceToTurret = list2.Min();
			return result;
		}

		internal static FollowTerminalAccessibleObjectBehaviour? GetClosestToil()
		{
			//IL_0091: 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_00d5: Unknown result type (might be due to invalid IL or missing references)
			Plugin.LogToConsole("Getting closest toil", "debug");
			List<FollowTerminalAccessibleObjectBehaviour> list = new List<FollowTerminalAccessibleObjectBehaviour>();
			FollowTerminalAccessibleObjectBehaviour[] array = Object.FindObjectsOfType<FollowTerminalAccessibleObjectBehaviour>();
			FollowTerminalAccessibleObjectBehaviour[] array2 = array;
			foreach (FollowTerminalAccessibleObjectBehaviour item in array2)
			{
				list.Add(item);
			}
			if (list.Count() == 0)
			{
				noToils = true;
				return null;
			}
			FollowTerminalAccessibleObjectBehaviour result = list[0];
			List<float> list2 = new List<float>();
			foreach (FollowTerminalAccessibleObjectBehaviour item2 in list)
			{
				float num = Vector3.Distance(((Component)item2).transform.position, ((Component)StartOfRound.Instance.localPlayerController).transform.position);
				list2.Add(num);
				if (num <= list2.Min() && StartOfRound.Instance.localPlayerController.HasLineOfSightToPosition(((Component)item2).transform.position, 45f, 10000, -1f))
				{
					result = item2;
				}
				else if (list2.Count() > 0)
				{
					list2.Remove(num);
				}
			}
			if (list2.Count() == 0)
			{
				noVisibleTurret = true;
				return null;
			}
			distanceToToil = list2.Min();
			return result;
		}

		internal static void DisableTurret()
		{
			TerminalAccessibleObject closestTurret = GetClosestTurret();
			if ((Object)(object)closestTurret != (Object)null)
			{
				Plugin.LogToConsole("Disabling turret", "debug");
				closestTurret.CallFunctionFromTerminal();
				turretDisabled = true;
			}
		}

		internal static void DisableToil()
		{
			FollowTerminalAccessibleObjectBehaviour closestToil = GetClosestToil();
			TerminalAccessibleObject closestTurret = GetClosestTurret();
			if ((Object)(object)closestToil == (Object)null)
			{
				toilDisabled = false;
				return;
			}
			if ((Object)(object)closestTurret == (Object)null)
			{
				distanceToTurret = distanceToToil + 10f;
			}
			if (distanceToToil < distanceToTurret)
			{
				Plugin.LogToConsole("Disabling toil turret", "debug");
				closestToil.CallFunctionFromTerminal();
				toilDisabled = true;
				turretDisabled = true;
			}
			else
			{
				toilDisabled = false;
			}
		}

		internal static void PlayTurretAudio()
		{
			if (turretDisabled)
			{
				if (Plugin.vocalLevel.Value >= VocalLevels.High)
				{
					PlayRandomLine("TurretDisabled", Random.Range(1, 4), 0.7f);
				}
			}
			else if (noVisibleTurret)
			{
				PlayLine("NoVisibleTurret");
			}
			else if (noTurrets && noToils)
			{
				PlayLine("NoTurrets");
			}
		}

		internal static void DisableAllTurrets()
		{
			Plugin.LogToConsole("Disabling all turrets", "debug");
			TerminalAccessibleObject[] array = Object.FindObjectsOfType<TerminalAccessibleObject>();
			TerminalAccessibleObject[] array2 = array;
			foreach (TerminalAccessibleObject val in array2)
			{
				if (Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent<Turret>()))
				{
					val.CallFunctionFromTerminal();
					turretsExist = true;
				}
			}
			if (turretsExist)
			{
				if (Plugin.vocalLevel.Value >= VocalLevels.High)
				{
					PlayRandomLine("AllTurretsDisabled", Random.Range(1, 4), 0.7f);
				}
			}
			else
			{
				PlayLine("NoTurrets");
			}
		}

		internal static void DisableAllToils()
		{
			Plugin.LogToConsole("Disabling all toils", "debug");
			FollowTerminalAccessibleObjectBehaviour[] array = Object.FindObjectsOfType<FollowTerminalAccessibleObjectBehaviour>();
			FollowTerminalAccessibleObjectBehaviour[] array2 = array;
			foreach (FollowTerminalAccessibleObjectBehaviour val in array2)
			{
				turretsExist = true;
				val.CallFunctionFromTerminal();
			}
		}

		internal static TerminalAccessibleObject? GetClosestMine()
		{
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: 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)
			Plugin.LogToConsole("Getting closest landmine", "debug");
			TerminalAccessibleObject[] array = Object.FindObjectsOfType<TerminalAccessibleObject>();
			List<TerminalAccessibleObject> list = new List<TerminalAccessibleObject>();
			TerminalAccessibleObject[] array2 = array;
			foreach (TerminalAccessibleObject val in array2)
			{
				if (Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent<Landmine>()))
				{
					list.Add(val);
				}
			}
			if (list.Count() == 0)
			{
				PlayLine("NoMines");
				return null;
			}
			TerminalAccessibleObject result = list[0];
			List<float> list2 = new List<float>();
			foreach (TerminalAccessibleObject item in list)
			{
				float num = Vector3.Distance(((Component)item).transform.position, ((Component)StartOfRound.Instance.localPlayerController).transform.position);
				list2.Add(num);
				if (num <= list2.Min() && StartOfRound.Instance.localPlayerController.HasLineOfSightToPosition(((Component)item).transform.position, 45f, 10000, -1f))
				{
					result = item;
				}
				else if (list2.Count() > 0)
				{
					list2.Remove(num);
				}
			}
			if (list2.Count() == 0)
			{
				PlayLine("NoVisibleMine");
				return null;
			}
			return result;
		}

		internal static void DisableMine()
		{
			TerminalAccessibleObject closestMine = GetClosestMine();
			if ((Object)(object)closestMine != (Object)null)
			{
				Plugin.LogToConsole("Disabling landmine", "debug");
				closestMine.CallFunctionFromTerminal();
				if (Plugin.vocalLevel.Value >= VocalLevels.High)
				{
					PlayRandomLine("MineDisabled", Random.Range(1, 4));
				}
			}
		}

		internal static void DisableAllMines()
		{
			bool flag = false;
			Plugin.LogToConsole("Disabling all landmines", "debug");
			TerminalAccessibleObject[] array = Object.FindObjectsOfType<TerminalAccessibleObject>();
			TerminalAccessibleObject[] array2 = array;
			foreach (TerminalAccessibleObject val in array2)
			{
				if (Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent<Landmine>()))
				{
					val.CallFunctionFromTerminal();
					flag = true;
				}
			}
			if (flag)
			{
				if (Plugin.vocalLevel.Value >= VocalLevels.Low)
				{
					PlayRandomLine("AllMinesDisabled", Random.Range(1, 4));
				}
			}
			else
			{
				PlayLine("NoMines");
			}
		}

		internal static TerminalAccessibleObject? GetClosestSpikeTrap()
		{
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			Plugin.LogToConsole("Getting closest spike trap", "debug");
			TerminalAccessibleObject[] array = Object.FindObjectsOfType<TerminalAccessibleObject>();
			List<TerminalAccessibleObject> list = new List<TerminalAccessibleObject>();
			TerminalAccessibleObject[] array2 = array;
			foreach (TerminalAccessibleObject val in array2)
			{
				if ((Object)(object)((Component)val).gameObject.transform.parent != (Object)null && ((Object)((Component)val).gameObject.transform.parent).name.Equals("Container"))
				{
					list.Add(val);
				}
			}
			if (list.Count() == 0)
			{
				PlayLine("NoTraps");
				return null;
			}
			TerminalAccessibleObject result = list[0];
			List<float> list2 = new List<float>();
			foreach (TerminalAccessibleObject item in list)
			{
				float num = Vector3.Distance(((Component)item).transform.position, ((Component)StartOfRound.Instance.localPlayerController).transform.position);
				list2.Add(num);
				if (num <= list2.Min() && StartOfRound.Instance.localPlayerController.HasLineOfSightToPosition(((Component)item).transform.position, 45f, 10000, -1f))
				{
					result = item;
				}
				else if (list2.Count() > 0)
				{
					list2.Remove(num);
				}
			}
			if (list2.Count() == 0)
			{
				PlayLine("NoVisibleTrap");
				return null;
			}
			return result;
		}

		internal static void DisableSpikeTrap()
		{
			TerminalAccessibleObject closestSpikeTrap = GetClosestSpikeTrap();
			if ((Object)(object)closestSpikeTrap != (Object)null)
			{
				Plugin.LogToConsole("Disabling spike trap", "debug");
				closestSpikeTrap.CallFunctionFromTerminal();
				if (Plugin.vocalLevel.Value >= VocalLevels.Low)
				{
					PlayRandomLine("TrapDisabled", Random.Range(1, 4));
				}
			}
		}

		internal static void DisableAllSpikeTraps()
		{
			bool flag = false;
			Plugin.LogToConsole("Disabling all spike traps", "debug");
			TerminalAccessibleObject[] array = Object.FindObjectsOfType<TerminalAccessibleObject>();
			TerminalAccessibleObject[] array2 = array;
			foreach (TerminalAccessibleObject val in array2)
			{
				if ((Object)(object)((Component)val).gameObject.transform.parent != (Object)null && ((Object)((Component)val).gameObject.transform.parent).name.Equals("Container"))
				{
					val.CallFunctionFromTerminal();
					flag = true;
				}
			}
			if (flag)
			{
				if (Plugin.vocalLevel.Value >= VocalLevels.Low)
				{
					PlayRandomLine("AllTrapsDisabled", Random.Range(1, 4));
				}
			}
			else
			{
				PlayLine("NoTraps");
			}
		}

		internal static IEnumerator ActivateTeleporter()
		{
			if (Object.op_Implicit((Object)(object)GameObject.Find("Teleporter(Clone)")))
			{
				ShipTeleporter teleporter = GameObject.Find("Teleporter(Clone)").GetComponent<ShipTeleporter>();
				if (teleporterCooldownTime <= 0f)
				{
					if (Plugin.vocalLevel.Value >= VocalLevels.High)
					{
						PlayRandomLine("Teleport", Random.Range(1, 4));
					}
					if (Plugin.enhancedTeleportCommands.Value && (Object)(object)StartOfRound.Instance.mapScreen.targetedPlayer != (Object)(object)StartOfRound.Instance.localPlayerController)
					{
						SwitchRadar(checkMalfunctions: false, checkCurrentTarget: false);
						yield return (object)new WaitForSeconds(1f);
					}
					teleporter.PressTeleportButtonServerRpc();
					if (Plugin.sendTeleporterChatMessage.Value)
					{
						SendChatMessage("has activated the teleporter");
					}
				}
				else
				{
					PlayLine("TeleporterOnCooldown");
					Plugin.LogToConsole("The teleporter is on cooldown!", "warn");
				}
			}
			else
			{
				PlayRandomLine("NoTeleporter", Random.Range(1, 4));
			}
		}

		internal static void SwitchRadar(bool checkMalfunctions = true, bool checkCurrentTarget = true)
		{
			if (ModChecker.hasMalfunctions && checkMalfunctions)
			{
				if (malfunctionPowerTriggered)
				{
					PlayRandomLine("PowerMalfunction", Random.Range(1, 4));
					return;
				}
				if (malfunctionDistortionTriggered)
				{
					PlayRandomLine("CommsMalfunction", Random.Range(1, 4));
					return;
				}
			}
			if (checkCurrentTarget && (Object)(object)StartOfRound.Instance.mapScreen.targetedPlayer == (Object)(object)StartOfRound.Instance.localPlayerController)
			{
				PlayLine("RadarAlreadyFocused");
				return;
			}
			int num = StartOfRound.Instance.mapScreen.radarTargets.FindIndex((TransformAndName target) => (Object)(object)target.transform == (Object)(object)((Component)StartOfRound.Instance.localPlayerController).transform);
			StartOfRound.Instance.mapScreen.SwitchRadarTargetAndSync(num);
			if (Plugin.sendRadarSwitchChatMessage.Value)
			{
				SendChatMessage("performed a radar switch");
			}
		}

		internal static IEnumerator SwitchLights(bool on)
		{
			ShipLights shipLights = Object.FindObjectOfType<ShipLights>();
			if (!((Object)(object)shipLights != (Object)null))
			{
				yield break;
			}
			if (on)
			{
				if (shipLights.areLightsOn)
				{
					PlayLine("LightsAlreadyOn");
				}
				else
				{
					PlayLine("LightsOn");
				}
			}
			else if (!shipLights.areLightsOn)
			{
				PlayLine("LightsAlreadyOff");
			}
			else
			{
				PlayLine("LightsOff");
			}
			yield return (object)new WaitForSeconds(2f);
			shipLights.SetShipLightsServerRpc(on);
		}

		public static void PerformAdvancedScan()
		{
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: 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)
			if (!advancedScannerActive)
			{
				return;
			}
			if (ModChecker.hasMalfunctions && (malfunctionDistortionTriggered || malfunctionPowerTriggered))
			{
				((TMP_Text)entitiesTextComponent).SetText(enemiesTopText + dataUnavailableTextColor + "Data unavailable</color>", true);
				((TMP_Text)itemsTextComponent).SetText(itemsTopText + dataUnavailableTextColor + "Data unavailable</color>", true);
				return;
			}
			Vector3 position = ((Component)StartOfRound.Instance.localPlayerController).transform.position;
			int num = 0;
			int num2 = 0;
			float num3 = 0f;
			Collider[] array = Physics.OverlapSphere(position, scannerRange);
			Collider[] array2 = array;
			foreach (Collider val in array2)
			{
				GrabbableObject component = ((Component)val).GetComponent<GrabbableObject>();
				if ((Object)(object)component != (Object)null)
				{
					if (component.itemProperties.isScrap && !component.isHeld)
					{
						num2++;
						num3 += (float)component.scrapValue;
					}
					continue;
				}
				ScanNodeProperties component2 = ((Component)val).GetComponent<ScanNodeProperties>();
				if ((Object)(object)component2 != (Object)null && component2.creatureScanID != -1)
				{
					if (component2.creatureScanID == 18)
					{
						num++;
						continue;
					}
					EnemyAI val2 = ((Component)((Component)component2).transform.parent).GetComponent<EnemyAI>();
					if ((Object)(object)val2 == (Object)null)
					{
						val2 = ((Component)((Component)component2).transform.parent).GetComponent<EnemyAICollisionDetect>()?.mainScript;
					}
					if ((Object)(object)val2 != (Object)null && !val2.isEnemyDead && ((object)val2).GetType() != typeof(DocileLocustBeesAI) && ((object)val2).GetType() != typeof(DoublewingAI) && ((object)val2).GetType() != typeof(SandWormAI))
					{
						num++;
					}
				}
				else if (Plugin.detectMasked.Value)
				{
					MaskedPlayerEnemy component3 = ((Component)val).GetComponent<MaskedPlayerEnemy>();
					if (component3 != null && !((EnemyAI)component3).isEnemyDead)
					{
						num++;
					}
				}
			}
			switch (num)
			{
			case 0:
				((TMP_Text)entitiesTextComponent).SetText(enemiesTopText + clearTextColor + "Clear</color>", true);
				break;
			case 1:
				((TMP_Text)entitiesTextComponent).SetText(enemiesTopText + enemiesTextColor + oneEntityText, true);
				break;
			default:
				((TMP_Text)entitiesTextComponent).SetText(enemiesTopText + enemiesTextColor + num + entitiesText, true);
				break;
			}
			switch (num2)
			{
			case 0:
				((TMP_Text)itemsTextComponent).SetText(itemsTopText + clearTextColor + "Clear</color>", true);
				break;
			case 1:
				((TMP_Text)itemsTextComponent).SetText(itemsTopText + itemsTextColor + oneItemText + creditsChar + num3 + "</color>", true);
				break;
			default:
				((TMP_Text)itemsTextComponent).SetText(itemsTopText + itemsTextColor + num2 + itemsText + creditsChar + num3 + "</color>", true);
				break;
			}
		}

		internal static void GetDayMode()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Expected I4, but got Unknown
			DayMode dayMode = TimeOfDay.Instance.dayMode;
			DayMode val = dayMode;
			switch (val - -1)
			{
			case 0:
				PlayLine("None");
				Plugin.LogToConsole("No day mode found", "warn");
				break;
			case 1:
				PlayLine("Dawn");
				break;
			case 2:
				PlayLine("Noon");
				break;
			case 3:
				PlayLine("Sundown");
				break;
			case 4:
				PlayLine("Midnight");
				break;
			default:
				PlayLine("None");
				Plugin.LogToConsole("No day mode found", "warn");
				break;
			}
		}

		internal static RadarBoosterItem? GetClosestRadarBooster()
		{
			//IL_0078: 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)
			RadarBoosterItem[] array = Object.FindObjectsOfType<RadarBoosterItem>();
			if (array.Count() == 0)
			{
				if (Plugin.vocalLevel.Value >= VocalLevels.Medium)
				{
					PlayLine("NoBoosters");
				}
				PlayLine("NoBoostersLow");
				return null;
			}
			RadarBoosterItem result = array[0];
			List<float> list = new List<float>();
			RadarBoosterItem[] array2 = array;
			foreach (RadarBoosterItem val in array2)
			{
				float num = Vector3.Distance(((Component)val).transform.position, ((Component)StartOfRound.Instance.localPlayerController).transform.position);
				list.Add(num);
				if (num <= list.Min())
				{
					result = val;
				}
			}
			return result;
		}

		internal static void InteractWithBooster(bool ping)
		{
			//IL_0044: 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)
			RadarBoosterItem closestBooster = GetClosestRadarBooster();
			if (!((Object)(object)closestBooster != (Object)null) || !closestBooster.radarEnabled)
			{
				return;
			}
			if (Vector3.Distance(((Component)closestBooster).transform.position, ((Component)StartOfRound.Instance.localPlayerController).transform.position) < 16f)
			{
				int num = StartOfRound.Instance.mapScreen.radarTargets.FindIndex((TransformAndName target) => (Object)(object)target.transform == (Object)(object)((Component)closestBooster).transform);
				if (ping)
				{
					Plugin.LogToConsole("Pinging " + closestBooster.radarBoosterName);
					StartOfRound.Instance.mapScreen.PingRadarBooster(num);
				}
				else
				{
					Plugin.LogToConsole("Flashing " + closestBooster.radarBoosterName);
					StartOfRound.Instance.mapScreen.FlashRadarBooster(num);
				}
			}
			else
			{
				if (Plugin.vocalLevel.Value >= VocalLevels.Medium)
				{
					PlayLine("NoBoostersNearby");
				}
				PlayLine("NoBoostersNearbyLow");
			}
		}

		internal static IEnumerator GetCrewStatus(float delay = 5f)
		{
			int deadPlayers = 0;
			PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
			foreach (PlayerControllerB player in allPlayerScripts)
			{
				if (player.isPlayerDead)
				{
					deadPlayers++;
				}
			}
			if (StartOfRound.Instance.livingPlayers == 1 && deadPlayers == 0)
			{
				PlayLine("CrewStatusSolo");
				yield break;
			}
			PlayLine("GettingCrewStatus");
			yield return (object)new WaitForSeconds(delay);
			string header = "CREW STATUS REPORT:";
			string livingPlayers2 = StartOfRound.Instance.livingPlayers + " employees alive\n";
			string deceasedPlayers = deadPlayers + " deceased employees";
			if (deadPlayers == 1)
			{
				deceasedPlayers = "1 deceased employee\n";
			}
			if (StartOfRound.Instance.livingPlayers == 1)
			{
				PlayLine("GoodLuck", 2.5f);
				livingPlayers2 = "1 employee alive\n";
				HUDManager.Instance.DisplayTip(header, livingPlayers2 + deceasedPlayers, true, false, "LC_Tip1");
				yield break;
			}
			if (Plugin.vocalLevel.Value >= VocalLevels.High)
			{
				PlayRandomLine("ReportComplete", Random.Range(1, 4));
			}
			HUDManager.Instance.DisplayTip(header, livingPlayers2 + deceasedPlayers, false, false, "LC_Tip1");
		}

		internal static IEnumerator GetCrewInShip(float delay = 5f)
		{
			int deadPlayers = 0;
			List<string> playersInShip = new List<string>();
			PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
			foreach (PlayerControllerB player in allPlayerScripts)
			{
				if (player.isInHangarShipRoom)
				{
					playersInShip.Add(player.playerUsername);
				}
				if (player.isPlayerDead)
				{
					deadPlayers++;
				}
			}
			if (StartOfRound.Instance.livingPlayers == 1 && deadPlayers == 0)
			{
				if (playersInShip.Count > 0)
				{
					PlayLine("CrewInShipSolo");
				}
				else
				{
					PlayLine("CrewOutsideShipSolo");
				}
				yield break;
			}
			PlayLine("GettingCrewInShip");
			yield return (object)new WaitForSeconds(delay);
			string header = "CREWMATES IN THE SHIP:";
			string body = "";
			if (playersInShip.Count == 0)
			{
				body = "No one is in the ship.";
			}
			else
			{
				foreach (string playerName in playersInShip)
				{
					body = ((!(playersInShip.Last() == playerName)) ? (body + playerName + ", ") : (body + playerName));
				}
			}
			if (Plugin.vocalLevel.Value >= VocalLevels.High)
			{
				PlayRandomLine("ReportComplete", Random.Range(2, 4));
			}
			HUDManager.Instance.DisplayTip(header, "<size=15>" + body + "</size>", false, false, "LC_Tip1");
		}

		internal static IEnumerator GetScrapLeft(string message, float delay = 5f)
		{
			int scrapLeft = 0;
			int scrapInShip = 0;
			int creditsLeft = 0;
			int creditsInShip = 0;
			if (message.ToLower().Contains("item"))
			{
				PlayLine("PerformingItemScan");
			}
			PlayLine("PerformingScrapScan");
			yield return (object)new WaitForSeconds(delay);
			string header = "SCRAP SCAN RESULTS:";
			GrabbableObject[] items = Object.FindObjectsOfType<GrabbableObject>();
			GrabbableObject[] array = items;
			foreach (GrabbableObject item in array)
			{
				if (item.it