Decompiled source of LC VEGA v4.0.0
BepInEx/plugins/LC-VEGA.dll
Decompiled a week ago
The result has been truncated due to the large size, download it to view full contents!
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 DiversityRemastered; using FacilityMeltdown.API; using FacilityMeltdown.MeltdownSequence.Behaviours; using GameNetcodeStuff; using HarmonyLib; using LC_VEGA.Patches; using LethalCompanyInputUtils.Api; using LobbyCompatibility.Enums; using LobbyCompatibility.Features; using Malfunctions; using Malfunctions.Patches; using Microsoft.CodeAnalysis; using MoreShipUpgrades.Misc.Upgrades; using MoreShipUpgrades.UpgradeComponents.TierUpgrades.Ship; using PySpeech; using ShipWindows; using ShipWindows.Components; using ShipWindows.Networking; using TMPro; using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.UI; 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+8017f7f4c20dff1ac3c7220284986d0a8c8710d2")] [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 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; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void RegisterPlugin(string modGUID, string modVersion) { PluginHelper.RegisterPlugin(modGUID, Version.Parse(modVersion), (CompatibilityLevel)0, (VersionStrictness)0); } } internal class PlayerInput : LcInputActions { [InputAction(/*Could not decode attribute arguments.*/)] public InputAction Activation { get; set; } } [BepInPlugin("JS03.LC-VEGA", "LC-VEGA", "4.0.0")] [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.*/)] [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 = "4.0.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> enhancedHazardDisabling; 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"); public 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..."); if (ModChecker.CheckForMod("BMX.LobbyCompatibility")) { ModChecker.RegisterPlugin("JS03.LC-VEGA", "4.0.0"); } 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. Interactions that have their own toggle will not be affected by this.\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>("Similarity thresholds", "Gratitude", 0.5f, 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>("Similarity thresholds", "Stop talking", 0.5f, 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>("Similarity thresholds", "Secure doors", 0.5f, 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>("Similarity thresholds", "Turrets", 0.5f, 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>("Similarity thresholds", "Landmines", 0.5f, 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>("Similarity thresholds", "Spike traps", 0.5f, 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>("Similarity thresholds", "Signal translator", 0.5f, 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>("Similarity thresholds", "Teleport", 0.5f, 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>("Similarity thresholds", "Ship", 0.5f, 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>("Similarity thresholds", "Miscellaneous", 0.5f, 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>("Similarity thresholds", "Ship upgrades", 0.5f, 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>("Similarity thresholds", "Crew Status", 0.5f, 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>("Similarity thresholds", "Crew in ship", 0.5f, 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>("Similarity thresholds", "Scrap / items left", 0.5f, 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>("Similarity thresholds", "Info", 0.5f, 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>("Similarity thresholds", "Manual Activation", 0.5f, 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."); enhancedHazardDisabling = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Enhanced Hazard Disabling commands", true, "Makes VEGA disable all visible turrets / landmines / spike traps when using their respective commands."); 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; } } public static string GetPluginsPath() { return ((BaseUnityPlugin)Instance).Info.Location.TrimEnd("LC-VEGA.dll".ToCharArray()); } } 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 { [CompilerGenerated] private sealed class <ActivateTeleporter>d__72 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private ShipTeleporter <teleporter>5__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ActivateTeleporter>d__72(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <teleporter>5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; } else { <>1__state = -1; if (!Object.op_Implicit((Object)(object)GameObject.Find("Teleporter(Clone)"))) { PlayRandomLine("NoTeleporter", Random.Range(1, 4)); goto IL_0165; } <teleporter>5__1 = GameObject.Find("Teleporter(Clone)").GetComponent<ShipTeleporter>(); if (!(teleporterCooldownTime <= 0f)) { PlayLine("TeleporterOnCooldown"); Plugin.LogToConsole("The teleporter is on cooldown!", "warn"); goto IL_0140; } 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); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; } } <teleporter>5__1.PressTeleportButtonServerRpc(); if (Plugin.sendTeleporterChatMessage.Value) { SendChatMessage("has activated the teleporter"); } goto IL_0140; IL_0165: return false; IL_0140: <teleporter>5__1 = null; goto IL_0165; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <GetCrewInShip>d__80 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; private int <deadPlayers>5__1; private List<string> <playersInShip>5__2; private PlayerControllerB[] <>s__3; private int <>s__4; private PlayerControllerB <player>5__5; private string <header>5__6; private string <body>5__7; private List<string>.Enumerator <>s__8; private string <playerName>5__9; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GetCrewInShip>d__80(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <playersInShip>5__2 = null; <>s__3 = null; <player>5__5 = null; <header>5__6 = null; <body>5__7 = null; <>s__8 = default(List<string>.Enumerator); <playerName>5__9 = null; <>1__state = -2; } private bool MoveNext() { //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <deadPlayers>5__1 = 0; <playersInShip>5__2 = new List<string>(); <>s__3 = StartOfRound.Instance.allPlayerScripts; for (<>s__4 = 0; <>s__4 < <>s__3.Length; <>s__4++) { <player>5__5 = <>s__3[<>s__4]; if (<player>5__5.isInHangarShipRoom) { <playersInShip>5__2.Add(<player>5__5.playerUsername); } if (<player>5__5.isPlayerDead) { <deadPlayers>5__1++; } <player>5__5 = null; } <>s__3 = null; if (StartOfRound.Instance.livingPlayers == 1 && <deadPlayers>5__1 == 0) { if (<playersInShip>5__2.Count > 0) { PlayLine("CrewInShipSolo"); } else { PlayLine("CrewOutsideShipSolo"); } break; } PlayLine("GettingCrewInShip"); <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1; <header>5__6 = "CREWMATES IN THE SHIP:"; <body>5__7 = ""; if (<playersInShip>5__2.Count == 0) { <body>5__7 = "No one is in the ship."; } else { <>s__8 = <playersInShip>5__2.GetEnumerator(); try { while (<>s__8.MoveNext()) { <playerName>5__9 = <>s__8.Current; if (<playersInShip>5__2.Last() == <playerName>5__9) { <body>5__7 += <playerName>5__9; } else { <body>5__7 = <body>5__7 + <playerName>5__9 + ", "; } <playerName>5__9 = null; } } finally { ((IDisposable)<>s__8).Dispose(); } <>s__8 = default(List<string>.Enumerator); } if (Plugin.vocalLevel.Value >= VocalLevels.High) { PlayRandomLine("ReportComplete", Random.Range(2, 4)); } HUDManager.Instance.DisplayTip(<header>5__6, "<size=15>" + <body>5__7 + "</size>", false, false, "LC_Tip1"); <header>5__6 = null; <body>5__7 = null; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <GetCrewStatus>d__79 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; private int <deadPlayers>5__1; private PlayerControllerB[] <>s__2; private int <>s__3; private PlayerControllerB <player>5__4; private string <header>5__5; private string <livingPlayers>5__6; private string <deceasedPlayers>5__7; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GetCrewStatus>d__79(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__2 = null; <player>5__4 = null; <header>5__5 = null; <livingPlayers>5__6 = null; <deceasedPlayers>5__7 = null; <>1__state = -2; } private bool MoveNext() { //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <deadPlayers>5__1 = 0; <>s__2 = StartOfRound.Instance.allPlayerScripts; for (<>s__3 = 0; <>s__3 < <>s__2.Length; <>s__3++) { <player>5__4 = <>s__2[<>s__3]; if (<player>5__4.isPlayerDead) { <deadPlayers>5__1++; } <player>5__4 = null; } <>s__2 = null; if (StartOfRound.Instance.livingPlayers == 1 && <deadPlayers>5__1 == 0) { PlayLine("CrewStatusSolo"); break; } PlayLine("GettingCrewStatus"); <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1; <header>5__5 = "CREW STATUS REPORT:"; <livingPlayers>5__6 = StartOfRound.Instance.livingPlayers + " employees alive\n"; <deceasedPlayers>5__7 = <deadPlayers>5__1 + " deceased employees"; if (<deadPlayers>5__1 == 1) { <deceasedPlayers>5__7 = "1 deceased employee\n"; } if (StartOfRound.Instance.livingPlayers == 1) { PlayLine("GoodLuck", 2.5f); <livingPlayers>5__6 = "1 employee alive\n"; HUDManager.Instance.DisplayTip(<header>5__5, <livingPlayers>5__6 + <deceasedPlayers>5__7, true, false, "LC_Tip1"); } else { if (Plugin.vocalLevel.Value >= VocalLevels.High) { PlayRandomLine("ReportComplete", Random.Range(1, 4)); } HUDManager.Instance.DisplayTip(<header>5__5, <livingPlayers>5__6 + <deceasedPlayers>5__7, false, false, "LC_Tip1"); } <header>5__5 = null; <livingPlayers>5__6 = null; <deceasedPlayers>5__7 = null; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <GetScrapLeft>d__81 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public string message; public float delay; private int <scrapLeft>5__1; private int <scrapInShip>5__2; private int <creditsLeft>5__3; private int <creditsInShip>5__4; private string <header>5__5; private string <scrapOutsideStr>5__6; private string <scrapInShipStr>5__7; private GrabbableObject[] <items>5__8; private GrabbableObject[] <>s__9; private int <>s__10; private GrabbableObject <item>5__11; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GetScrapLeft>d__81(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <header>5__5 = null; <scrapOutsideStr>5__6 = null; <scrapInShipStr>5__7 = null; <items>5__8 = null; <>s__9 = null; <item>5__11 = null; <>1__state = -2; } private bool MoveNext() { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <scrapLeft>5__1 = 0; <scrapInShip>5__2 = 0; <creditsLeft>5__3 = 0; <creditsInShip>5__4 = 0; if (message.ToLower().Contains("item")) { PlayLine("PerformingItemScan"); } PlayLine("PerformingScrapScan"); <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1; <header>5__5 = "SCRAP SCAN RESULTS:"; <items>5__8 = Object.FindObjectsOfType<GrabbableObject>(); <>s__9 = <items>5__8; for (<>s__10 = 0; <>s__10 < <>s__9.Length; <>s__10++) { <item>5__11 = <>s__9[<>s__10]; if (<item>5__11.itemProperties.isScrap && !<item>5__11.isHeld) { if (!<item>5__11.isInShipRoom) { <scrapLeft>5__1++; <creditsLeft>5__3 += <item>5__11.scrapValue; } else { <scrapInShip>5__2++; <creditsInShip>5__4 += <item>5__11.scrapValue; } } <item>5__11 = null; } <>s__9 = null; if (<scrapLeft>5__1 == 0) { <scrapOutsideStr>5__6 = "There are no items outside the ship."; } else if (<scrapLeft>5__1 > 1) { <scrapOutsideStr>5__6 = "There are " + <scrapLeft>5__1 + " items left, worth " + creditsChar + <creditsLeft>5__3; } else { <scrapOutsideStr>5__6 = "There is 1 item left, worth " + creditsChar + <creditsLeft>5__3; } if (<scrapInShip>5__2 == 0) { <scrapInShipStr>5__7 = "There are no items inside the ship."; } else if (<scrapInShip>5__2 > 1) { <scrapInShipStr>5__7 = "The ship currently has " + <scrapInShip>5__2 + " items, worth " + creditsChar + <creditsInShip>5__4; } else { <scrapInShipStr>5__7 = "The ship currently has 1 item, worth " + creditsChar + <creditsInShip>5__4; } if (Plugin.vocalLevel.Value >= VocalLevels.High) { PlayRandomLine("ScrapScanComplete", Random.Range(1, 4)); } HUDManager.Instance.DisplayTip(<header>5__5, "<size=15>" + <scrapOutsideStr>5__6 + "\n" + <scrapInShipStr>5__7 + "</size>", false, false, "LC_Tip1"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <SwitchLights>d__74 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public bool on; private ShipLights <shipLights>5__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <SwitchLights>d__74(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <shipLights>5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <shipLights>5__1 = Object.FindObjectOfType<ShipLights>(); if (!((Object)(object)<shipLights>5__1 != (Object)null)) { break; } if (on) { if (<shipLights>5__1.areLightsOn) { PlayLine("LightsAlreadyOn"); } else { PlayLine("LightsOn"); } } else if (!<shipLights>5__1.areLightsOn) { PlayLine("LightsAlreadyOff"); } else { PlayLine("LightsOff"); } <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; case 1: <>1__state = -1; <shipLights>5__1.SetShipLightsServerRpc(on); break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <SwitchWindowShutters>d__82 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public bool open; private ShipWindowShutterSwitch <windowSwitch>5__1; private Type <shipWindowsNetworkHandlerType>5__2; private MethodInfo <windowSwitchUsedMethodInfo>5__3; private object[] <parameters>5__4; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <SwitchWindowShutters>d__82(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <windowSwitch>5__1 = null; <shipWindowsNetworkHandlerType>5__2 = null; <windowSwitchUsedMethodInfo>5__3 = null; <parameters>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <windowSwitch>5__1 = Object.FindObjectOfType<ShipWindowShutterSwitch>(); if ((Object)(object)<windowSwitch>5__1 != (Object)null && WindowConfig.enableShutter.Value) { if (open) { PlayLine("OpenShipShutters"); } else { PlayLine("CloseShipShutters"); } <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; } break; case 1: <>1__state = -1; <shipWindowsNetworkHandlerType>5__2 = Type.GetType("ShipWindows.Networking.NetworkHandler, ShipWindows"); if (<shipWindowsNetworkHandlerType>5__2 != null) { <windowSwitchUsedMethodInfo>5__3 = <shipWindowsNetworkHandlerType>5__2.GetMethod("WindowSwitchUsed"); <parameters>5__4 = new object[1] { open }; <windowSwitchUsedMethodInfo>5__3.Invoke(null, <parameters>5__4); <windowSwitchUsedMethodInfo>5__3 = null; <parameters>5__4 = null; } <shipWindowsNetworkHandlerType>5__2 = null; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } 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" }, { 25, "Maneater" } }; public static string[] moddedEnemies = new string[15] { "RedWood Giant", "Stalker", "DriftWood Giant", "Football", "Shy guy", "Locker", "Siren Head", "Rolling Giant", "Peepers", "Shockwave Drone", "Cleaning Drone", "Moving Turret", "Maggie", "Shrimp", "The Fiend" }; private static readonly string[] vanillaEntityNames = new string[55] { "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", "Maneater", "Baby" }; 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" }; 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 "Baby": return "Maneater"; 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; } } 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 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) TerminalAccessibleObject closestSecureDoor = GetClosestSecureDoor(); 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"); } } } 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) TerminalAccessibleObject closestSecureDoor = GetClosestSecureDoor(); 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"); } } } 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 void DisableVisibleTurrets() { //IL_0093: Unknown result type (might be due to invalid IL or missing references) 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; } List<TerminalAccessibleObject> list2 = new List<TerminalAccessibleObject>(); foreach (TerminalAccessibleObject item in list) { if (StartOfRound.Instance.localPlayerController.HasLineOfSightToPosition(((Component)item).transform.position, 45f, 10000, -1f)) { list2.Add(item); item.CallFunctionFromTerminal(); turretDisabled = true; } } if (list2.Count == 0) { noVisibleTurret = true; } } 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 DisableVisibleToils() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) 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; } List<FollowTerminalAccessibleObjectBehaviour> list2 = new List<FollowTerminalAccessibleObjectBehaviour>(); foreach (FollowTerminalAccessibleObjectBehaviour it