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 System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LC_VEGA.Patches; using LethalCompanyInputUtils.Api; using LethalConfig; using LethalConfig.ConfigItems; using LobbyCompatibility.Enums; using LobbyCompatibility.Features; using Microsoft.CodeAnalysis; using SpeechRecognitionAPI; using TMPro; using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.UI; [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+9ecd33c31e6dee6a1deebccd1875565f84f80e0f")] [assembly: AssemblyProduct("LC-VEGA")] [assembly: AssemblyTitle("LC-VEGA")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } 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(); } 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 class LanguageHelper { internal static readonly Dictionary> Commands = new Dictionary> { [(Languages)0] = new Dictionary { ["startListening"] = "activate", ["stopListening"] = "deactivate", ["moonInfo"] = "info about", ["creatureInfo"] = "info about", ["activateScanner"] = "activate scanner/activate advanced scanner/turn on scanner/turn on advanced scanner/scan/enable scanner/enable advanced scanner", ["deactivateScanner"] = "disable scanner/disable advanced scanner/turn off scanner/turn off advanced scanner/disable scan", ["openDoor"] = "open secure door/open door/open the door/open the secure door", ["closeDoor"] = "close secure door/close door/close the door/close the secure door", ["openAllDoors"] = "open all secure doors/open all doors", ["closeAllDoors"] = "close all secure doors/close all doors", ["disableTurret"] = "disable turret/disable the turret", ["disableAllTurrets"] = "disable all turrets", ["disableMine"] = "disable the mine/disable mine/disable the landmine/disable landmine", ["disableAllMines"] = "disable all mines/disable all landmines", ["disableTrap"] = "disable the trap/disable trap/disable the spike trap/disable spike trap", ["disableAllTraps"] = "disable all traps/disable all spike traps", ["teleporter"] = "teleport/activate teleporter/tp/activate tp", ["mapSwitch"] = "switch to me/switch radar/switch radar to me/focus/focus on me", ["crewStatus"] = "crew status/team status/crew info/team info/crew report/team report", ["shipCrew"] = "crew in ship/people in ship/get crew in ship/get people in ship/how many people are in the ship/is anyone in the ship/is anybody in the ship", ["scrap"] = "scrap left/items left/scan for scrap/scan for items", ["radarBooster"] = "ping", ["radarFlash"] = "flash", ["signalTranslator"] = "transmit/send", ["time"] = "what's the current time of day/current time of day/time of day/current time/time/what time is it", ["openShip"] = "open ship doors/open the ship's doors/open hangar doors", ["closeShip"] = "close ship doors/close the ship's doors/close hangar doors", ["lightsOn"] = "lights on/turn the lights on", ["lightsOff"] = "lights out/lights off/turn the lights off", ["magnetOn"] = "activate magnet/enable magnet/turn magnet on", ["magnetOff"] = "deactivate magnet/disable magnet/turn magnet off", ["weatherInfo"] = "info about", ["stopTalking"] = "shut up/stop/stop talking", ["gratitude"] = "thank you/thanks" }, [(Languages)1] = new Dictionary { ["startListening"] = "activate", ["stopListening"] = "desactivate", ["moonInfo"] = "info sobre/informacion sobre", ["creatureInfo"] = "info sobre/informacion sobre", ["activateScanner"] = "activa el escaner/activa el escaner avanzado/enciende el escaner/enciende el escaner avanzado/escanea", ["deactivateScanner"] = "desactiva el escaner/desactiva el escaner avanzado/apaga el escaner/apaga el escaner avanzado", ["openDoor"] = "abre la puerta", ["closeDoor"] = "cierra la puerta", ["openAllDoors"] = "abre todas las puertas", ["closeAllDoors"] = "cierra todas las puertas", ["disableTurret"] = "desactiva la torreta/apaga la torreta", ["disableAllTurrets"] = "desactiva todas las torretas/apaga todas las torretas", ["disableMine"] = "desactiva la mina/apaga la mina", ["disableAllMines"] = "desactiva todas las minas/apaga todas las minas", ["disableTrap"] = "desactiva la trampa/apaga la trampa", ["disableAllTraps"] = "desactiva todas las trampas/apaga todas las trampas", ["teleporter"] = "teletransportame/activa el teletransportador/tp/activa el tp", ["mapSwitch"] = "centrate en mi/cambia el radar", ["crewStatus"] = "estado del equipo/estado actual", ["shipCrew"] = "quien esta en la nave/hay alguien en la nave", ["scrap"] = "cuantos objetos quedan/cuanta chatarra queda/haz un recuento", ["radarBooster"] = "ping", ["radarFlash"] = "flash", ["signalTranslator"] = "transmite/envia/escribe", ["time"] = "que hora es", ["openShip"] = "abre las puertas de la nave/abre la nave", ["closeShip"] = "cierra las puertas de la nave/cierra la nave", ["lightsOn"] = "enciende la luz/enciende las luces", ["lightsOff"] = "apaga la luz/apaga las luces", ["magnetOn"] = "enciende el iman/activa el iman", ["magnetOff"] = "apaga el iman/desactiva el iman", ["weatherInfo"] = "info sobre/informacion sobre", ["stopTalking"] = "callate/para de hablar/deja de hablar", ["gratitude"] = "gracias" } }; internal static readonly Dictionary Weathers = new Dictionary { [(Languages)0] = new string[5] { "Foggy", "Rainy", "Stormy", "Flooded", "Eclipsed" }, [(Languages)1] = new string[5] { "la niebla", "la lluvia", "las tormentas", "las inundaciones", "los eclipses" } }; internal static readonly Dictionary Messages = new Dictionary { [(Languages)0] = "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, LOST, INSIDE, TRAPPED, LEAVE, GOLD, APPARATUS", [(Languages)1] = "SI, NO, OKAY, AYUDA, GRACIAS, OBJETOS, ENTRADA, SALIDA, GIGANTE, GIGANTES, PERRO, PERROS, GUSANO, GUSANOS, BABUINO, BABUINOS, PELIGRO, NIÑA, FANTASMA, BRACKEN, ASESINO, BICHO, BICHOS, YIPPEE, PULGA, COIL, JESTER, SLIME, THUMPER, CLON, CLONES, MASCARA, ARAÑA, SERPIENTE, SERPIENTES, ROBOT, DENTRO, ATRAPADO, VETE, ORO, GENERADOR" }; internal static readonly Dictionary VanillaEntityNames = new Dictionary { [(Languages)0] = new string[62] { "Baboon Hawks", "Baboons", "Hawks", "Bunker Spiders", "Spiders", "Hoarding Bugs", "Loot Bugs", "Yippee Bugs", "Barbers", "Brackens", "Butlers", "Coil Heads", "Coils", "Forest Keepers", "Giants", "Eyeless Dogs", "Dogs", "Earth Leviathans", "Leviathans", "Worms", "Jesters", "Roaming Locusts", "Locusts", "Manticoils", "Nutcrackers", "Old Birds", "Mechs", "Circuit Bees", "Red Bees", "Bees", "Hygroderes", "Slimes", "Blobs", "Tulip Snakes", "Tulips", "Snakes", "Snare Fleas", "Fleas", "Centipedes", "Spore Lizards", "Spore Doggies", "Lizards", "Thumpers", "Crawlers", "Halves", "Vain Shrouds", "Shrouds", "Kidnapper Foxes", "Foxes", "Maneaters", "Babies", "Giant Sapsuckers", "Sapsuckers", "Kiwis", "Birds", "Backwater Gunkfish", "Stingrays", "Gunkfish", "Feiopars", "Panthers", "Cadavers", "Cadaver Growths" }, [(Languages)1] = new string[54] { "Los Babuinos", "Las Arañas", "Las Hoarding Bugs", "Las Loot Bugs", "Las Yippee Bugs", "Los Barberos", "Los Brackens", "Los Mayordomos", "Los Coil Heads", "Los Guardianes del bosque", "Los Gigantes", "Los Perros sin ojos", "Los Perros", "Los Leviatanes terrestres", "Los Leviatanes", "Los Gusanos", "Los Jesters", "Las Langostas errantes", "Las Langostas", "Los Manticoils", "Los Cascanueces", "Los Pajaros viejos", "Los Viejos pajaros", "Los Mechas", "Las Abejas rojas", "Las Abejas", "Los Hygroderes", "Los Slimes", "Los Blobs", "Las Serpientes", "Las Serpientes de flor", "Las Pulgas", "Los Ciempies", "Los Lagartos", "Los Lagartos de esporas", "Los Thumpers", "Los Vain Shrouds", "Los Shrouds", "Los Zorros secuestradores", "Los Zorros", "Los Maneaters", "Los Bebes", "Los Sapsuckers gigantes", "Los Sapsuckers", "Los Kiwis", "Los Pajaros", "Los Pajaros gigantes", "Los Peces de aguas estancadas", "Los Gunkfish", "Las Mantarrayas", "Los Feiopars", "Las Panteras", "Los Cadavers", "Los Cadaver Growths" } }; internal static string GetEntityAudioClipName(string entityName, Languages language) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 string result; if ((int)language != 0) { if ((int)language == 1) { if (1 == 0) { } switch (entityName) { case "Los Babuinos": result = "BaboonHawk"; break; case "Las Arañas": result = "BunkerSpider"; break; case "Las Hoarding Bugs": case "Las Loot Bugs": case "Las Yippee Bugs": result = "YippeeBug"; break; case "Los Barberos": result = "Barber"; break; case "Los Brackens": result = "Bracken"; break; case "Los Mayordomos": result = "Butler"; break; case "Los Coil Heads": result = "Coil-Head"; break; case "Los Gigantes": case "Los Guardianes del bosque": result = "ForestKeeper"; break; case "Los Perros": case "Los Perros sin ojos": result = "EyelessDog"; break; case "Los Leviatanes terrestres": case "Los Leviatanes": case "Los Gusanos": result = "Sandworm"; break; case "Los Jesters": result = "Jester"; break; case "Las Langostas errantes": case "Las Langostas": result = "Locusts"; break; case "Los Manticoils": result = "Manticoil"; break; case "Los Cascanueces": result = "Nutcracker"; break; case "Los Pajaros viejos": case "Los Viejos pajaros": case "Los Mechas": result = "OldBird"; break; case "Las Abejas rojas": case "Las Abejas": result = "RedBees"; break; case "Los Hygroderes": case "Los Blobs": case "Los Slimes": result = "Slime"; break; case "Las Serpientes de flor": case "Las Serpientes": result = "Snakes"; break; case "Las Pulgas": case "Los Ciempies": result = "SnareFlea"; break; case "Los Lagartos de esporas": case "Los Lagartos": result = "SporeLizard"; break; case "Los Thumpers": result = "Thumper"; break; case "Los Vain Shrouds": case "Los Shrouds": result = "VainShroud"; break; case "Los Zorros secuestradores": case "Los Zorros": result = "KidnapperFox"; break; case "Los Maneaters": case "Los Bebes": result = "Maneater"; break; case "Los Sapsuckers gigantes": case "Los Sapsuckers": case "Los Kiwis": case "Los Pajaros": case "Los Pajaros gigantes": result = "Sapsucker"; break; case "Los Peces de aguas estancadas": case "Los Gunkfish": case "Las Mantarrayas": result = "Gunkfish"; break; case "Los Feiopars": case "Las Panteras": result = "Feiopar"; break; case "Los Cadavers": case "Los Cadaver Growths": result = "Cadaver"; break; default: result = entityName; break; } if (1 == 0) { } return result; } return entityName; } if (1 == 0) { } switch (entityName) { case "Baboon Hawks": case "Baboons": case "Hawks": result = "BaboonHawk"; break; case "Bunker Spiders": case "Spiders": result = "BunkerSpider"; break; case "Hoarding Bugs": case "Loot Bugs": case "Yippee Bugs": result = "YippeeBug"; break; case "Barbers": result = "Barber"; break; case "Brackens": result = "Bracken"; break; case "Butlers": result = "Butler"; break; case "Coil Heads": case "Coils": result = "Coil-Head"; break; case "Forest Keepers": case "Giants": result = "ForestKeeper"; break; case "Eyeless Dogs": case "Dogs": result = "EyelessDog"; break; case "Earth Leviathans": case "Leviathans": case "Worms": result = "Sandworm"; break; case "Jesters": result = "Jester"; break; case "Roaming Locusts": result = "Locusts"; break; case "Manticoils": result = "Manticoil"; break; case "Nutcrackers": result = "Nutcracker"; break; case "Old Birds": case "Mechs": result = "OldBird"; break; case "Circuit Bees": case "Red Bees": case "Bees": result = "RedBees"; break; case "Hygroderes": case "Blobs": case "Slimes": result = "Slime"; break; case "Tulip Snakes": case "Tulips": result = "Snakes"; break; case "Snare Fleas": case "Fleas": case "Centipedes": result = "SnareFlea"; break; case "Spore Lizards": case "Spore Doggies": case "Lizards": result = "SporeLizard"; break; case "Thumpers": case "Crawlers": case "Halves": result = "Thumper"; break; case "Vain Shrouds": case "Shrouds": result = "VainShroud"; break; case "Kidnapper Foxes": case "Foxes": result = "KidnapperFox"; break; case "Maneaters": case "Babies": result = "Maneater"; break; case "Giant Sapsuckers": case "Sapsuckers": case "Kiwis": case "Birds": result = "Sapsucker"; break; case "Backwater Gunkfish": case "Stingrays": result = "Gunkfish"; break; case "Feiopars": case "Panthers": result = "Feiopar"; break; case "Cadavers": case "Cadaver Growths": result = "Cadaver"; break; default: result = entityName; break; } if (1 == 0) { } return result; } } internal class ModChecker { public static bool hasEladsHUD; public static bool CheckForMod(string modGUID) { Dictionary 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", "5.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.*/)] public class Plugin : BaseUnityPlugin { private const string modGUID = "JS03.LC-VEGA"; private const string modName = "LC-VEGA"; private const string modVersion = "5.0.0"; internal static AssetBundle assetBundle; internal static PlayerInput PlayerInputInstance; public static ConfigEntry voLanguage; public static ConfigEntry commandLanguage; public static ConfigEntry globalConfidence; public static ConfigEntry gratitudeConfidence; public static ConfigEntry stopConfidence; public static ConfigEntry infoConfidence; public static ConfigEntry manualActivationConfidence; public static ConfigEntry secureDoorsConfidence; public static ConfigEntry turretsConfidence; public static ConfigEntry landminesConfidence; public static ConfigEntry trapsConfidence; public static ConfigEntry signalsConfidence; public static ConfigEntry teleportConfidence; public static ConfigEntry shipConfidence; public static ConfigEntry miscConfidence; public static ConfigEntry crewStatusConfidence; public static ConfigEntry crewInShipConfidence; public static ConfigEntry scrapLeftConfidence; public static ConfigEntry vocalLevel; public static ConfigEntry playIntro; public static ConfigEntry remoteEntityID; public static ConfigEntry giveWeatherInfo; public static ConfigEntry giveApparatusWarnings; public static ConfigEntry messages; public static ConfigEntry playerNameColors; public static ConfigEntry sendRadarSwitchChatMessage; public static ConfigEntry sendSignalTranslatorChatMessage; public static ConfigEntry sendTeleporterChatMessage; public static ConfigEntry volume; public static ConfigEntry ignoreMasterVolume; public static ConfigEntry infoDisplayMode; public static ConfigEntry scannerRange; public static ConfigEntry enableAdvancedScannerAuto; public static ConfigEntry detectMasked; public static ConfigEntry scale; public static ConfigEntry horizontalPosition; public static ConfigEntry verticalPosition; public static ConfigEntry horizontalGap; public static ConfigEntry verticalGap; public static ConfigEntry entitiesTextLength; public static ConfigEntry itemsTextLength; public static ConfigEntry entitiesTilt; public static ConfigEntry itemsTilt; public static ConfigEntry entitiesAlignment; public static ConfigEntry itemsAlignment; public static ConfigEntry clearTextColor; public static ConfigEntry entitiesNearbyTextColor; public static ConfigEntry itemsNearbyTextColor; public static ConfigEntry dataUnavailableTextColor; public static ConfigEntry useManualListening; public static ConfigEntry enableManualListeningAuto; public static ConfigEntry patchReadInput; public static ConfigEntry name; public static ConfigEntry enhancedTeleportCommands; public static ConfigEntry enhancedHazardDisabling; public static ConfigEntry registerActivation; public static ConfigEntry startListeningCommands; public static ConfigEntry stopListeningCommands; public static ConfigEntry registerMoonsInfo; public static ConfigEntry moonsInfoCommands; public static ConfigEntry registerCreatureInfo; public static ConfigEntry creatureInfoCommands; public static ConfigEntry registerAdvancedScanner; public static ConfigEntry activateAdvancedScannerCommands; public static ConfigEntry deactivateAdvancedScannerCommands; public static ConfigEntry registerInteractSecureDoor; public static ConfigEntry openSecureDoorCommands; public static ConfigEntry closeSecureDoorCommands; public static ConfigEntry registerInteractAllSecureDoors; public static ConfigEntry openAllSecureDoorsCommands; public static ConfigEntry closeAllSecureDoorsCommands; public static ConfigEntry registerDisableTurret; public static ConfigEntry disableTurretCommands; public static ConfigEntry registerDisableAllTurrets; public static ConfigEntry disableAllTurretsCommands; public static ConfigEntry registerDisableMine; public static ConfigEntry disableMineCommands; public static ConfigEntry registerDisableAllMines; public static ConfigEntry disableAllMinesCommands; public static ConfigEntry registerDisableSpikeTrap; public static ConfigEntry disableSpikeTrapCommands; public static ConfigEntry registerDisableAllSpikeTraps; public static ConfigEntry disableAllSpikeTrapsCommands; public static ConfigEntry registerTeleporter; public static ConfigEntry teleporterCommands; public static ConfigEntry registerRadarSwitch; public static ConfigEntry radarSwitchCommands; public static ConfigEntry registerCrewStatus; public static ConfigEntry crewStatusCommands; public static ConfigEntry registerCrewInShip; public static ConfigEntry crewInShipCommands; public static ConfigEntry registerScrapLeft; public static ConfigEntry scrapLeftCommands; public static ConfigEntry registerRadarBoosters; public static ConfigEntry radarPingCommands; public static ConfigEntry radarFlashCommands; public static ConfigEntry registerSignalTranslator; public static ConfigEntry transmitCommands; public static ConfigEntry registerTime; public static ConfigEntry timeCommands; public static ConfigEntry registerInteractShipDoors; public static ConfigEntry openShipDoorsCommands; public static ConfigEntry closeShipDoorsCommands; public static ConfigEntry registerInteractShipLights; public static ConfigEntry lightsOnCommands; public static ConfigEntry lightsOffCommands; public static ConfigEntry registerInteractShipMagnet; public static ConfigEntry magnetOnCommands; public static ConfigEntry magnetOffCommands; public static ConfigEntry registerWeatherInfo; public static ConfigEntry weatherInfoCommands; public static ConfigEntry registerStop; public static ConfigEntry stopCommands; public static ConfigEntry registerThanks; public static ConfigEntry 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(); GenerateConfigValues(); LoadAssets(); CheckInstalledMods(); ManageSaveValues(); VEGA.Initialize(); PatchStuff(); } internal void LoadAssets() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) mls.LogInfo((object)"Loading assets"); string location = ((BaseUnityPlugin)Instance).Info.Location; location = location.TrimEnd("LC-VEGA.dll".ToCharArray()); assetBundle = AssetBundle.LoadFromFile(((int)voLanguage.Value == 0) ? (location + "vega_en") : (location + "vega_es")); if ((Object)(object)assetBundle != (Object)null) { VEGA.audioClips = new List(); VEGA.audioClips = assetBundle.LoadAllAssets().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(ApparatusPatch)); harmony.PatchAll(typeof(GeneralPatches)); if (patchReadInput.Value) { harmony.PatchAll(typeof(ReadInputPatch)); } } internal void CheckInstalledMods() { mls.LogInfo((object)"Looking for compatible mods..."); if (ModChecker.CheckForMod("BMX.LobbyCompatibility")) { ModChecker.RegisterPlugin("JS03.LC-VEGA", "5.0.0"); } 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_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Expected O, but got Unknown //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Expected O, but got Unknown //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Expected O, but got Unknown //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Expected O, but got Unknown //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Expected O, but got Unknown //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Expected O, but got Unknown //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Expected O, but got Unknown //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Expected O, but got Unknown //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Expected O, but got Unknown //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Expected O, but got Unknown //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Expected O, but got Unknown //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Expected O, but got Unknown //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Expected O, but got Unknown //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Expected O, but got Unknown //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Expected O, but got Unknown //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Expected O, but got Unknown //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Expected O, but got Unknown //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Expected O, but got Unknown //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Expected O, but got Unknown //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Expected O, but got Unknown //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Expected O, but got Unknown //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Expected O, but got Unknown //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Expected O, but got Unknown //IL_0565: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Expected O, but got Unknown //IL_059e: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Expected O, but got Unknown //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Expected O, but got Unknown //IL_05ec: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Expected O, but got Unknown //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Expected O, but got Unknown //IL_063a: Unknown result type (might be due to invalid IL or missing references) //IL_0644: Expected O, but got Unknown //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_0659: Expected O, but got Unknown //IL_0688: Unknown result type (might be due to invalid IL or missing references) //IL_0692: Expected O, but got Unknown //IL_069d: Unknown result type (might be due to invalid IL or missing references) //IL_06a7: Expected O, but got Unknown //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Expected O, but got Unknown //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Expected O, but got Unknown //IL_0770: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Expected O, but got Unknown //IL_07a1: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Expected O, but got Unknown //IL_07fc: Unknown result type (might be due to invalid IL or missing references) //IL_0806: Expected O, but got Unknown //IL_0835: Unknown result type (might be due to invalid IL or missing references) //IL_083f: Expected O, but got Unknown //IL_0874: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Expected O, but got Unknown //IL_08cf: Unknown result type (might be due to invalid IL or missing references) //IL_08d9: Expected O, but got Unknown //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_090a: Expected O, but got Unknown //IL_09ba: Unknown result type (might be due to invalid IL or missing references) //IL_09c4: Expected O, but got Unknown //IL_0a19: Unknown result type (might be due to invalid IL or missing references) //IL_0a23: Expected O, but got Unknown //IL_0a78: Unknown result type (might be due to invalid IL or missing references) //IL_0a82: Expected O, but got Unknown //IL_0ad7: Unknown result type (might be due to invalid IL or missing references) //IL_0ae1: Expected O, but got Unknown //IL_0b36: Unknown result type (might be due to invalid IL or missing references) //IL_0b40: Expected O, but got Unknown //IL_0b95: Unknown result type (might be due to invalid IL or missing references) //IL_0b9f: Expected O, but got Unknown //IL_0bf4: Unknown result type (might be due to invalid IL or missing references) //IL_0bfe: Expected O, but got Unknown //IL_0d11: Unknown result type (might be due to invalid IL or missing references) //IL_0d1b: Expected O, but got Unknown //IL_0d70: Unknown result type (might be due to invalid IL or missing references) //IL_0d7a: Expected O, but got Unknown //IL_0dcf: Unknown result type (might be due to invalid IL or missing references) //IL_0dd9: Expected O, but got Unknown //IL_0e2e: Unknown result type (might be due to invalid IL or missing references) //IL_0e38: Expected O, but got Unknown //IL_0e8d: Unknown result type (might be due to invalid IL or missing references) //IL_0e97: Expected O, but got Unknown //IL_0eec: Unknown result type (might be due to invalid IL or missing references) //IL_0ef6: Expected O, but got Unknown //IL_0f1d: Unknown result type (might be due to invalid IL or missing references) //IL_0f27: Expected O, but got Unknown //IL_0f4e: Unknown result type (might be due to invalid IL or missing references) //IL_0f58: Expected O, but got Unknown //IL_0f7f: Unknown result type (might be due to invalid IL or missing references) //IL_0f89: Expected O, but got Unknown //IL_0fb0: Unknown result type (might be due to invalid IL or missing references) //IL_0fba: Expected O, but got Unknown //IL_0fe4: Unknown result type (might be due to invalid IL or missing references) //IL_0fee: Expected O, but got Unknown //IL_1015: Unknown result type (might be due to invalid IL or missing references) //IL_101f: Expected O, but got Unknown //IL_1046: Unknown result type (might be due to invalid IL or missing references) //IL_1050: Expected O, but got Unknown //IL_1076: Unknown result type (might be due to invalid IL or missing references) //IL_1080: Expected O, but got Unknown //IL_109b: Unknown result type (might be due to invalid IL or missing references) //IL_10c3: Unknown result type (might be due to invalid IL or missing references) //IL_10cd: Expected O, but got Unknown //IL_10e8: Unknown result type (might be due to invalid IL or missing references) //IL_1110: Unknown result type (might be due to invalid IL or missing references) //IL_111a: Expected O, but got Unknown //IL_1140: Unknown result type (might be due to invalid IL or missing references) //IL_114a: Expected O, but got Unknown //IL_1165: Unknown result type (might be due to invalid IL or missing references) //IL_118d: Unknown result type (might be due to invalid IL or missing references) //IL_1197: Expected O, but got Unknown //IL_11bd: Unknown result type (might be due to invalid IL or missing references) //IL_11c7: Expected O, but got Unknown //IL_11e2: Unknown result type (might be due to invalid IL or missing references) //IL_120a: Unknown result type (might be due to invalid IL or missing references) //IL_1214: Expected O, but got Unknown //IL_123a: Unknown result type (might be due to invalid IL or missing references) //IL_1244: Expected O, but got Unknown //IL_125f: Unknown result type (might be due to invalid IL or missing references) //IL_1287: Unknown result type (might be due to invalid IL or missing references) //IL_1291: Expected O, but got Unknown //IL_12ac: Unknown result type (might be due to invalid IL or missing references) //IL_12d4: Unknown result type (might be due to invalid IL or missing references) //IL_12de: Expected O, but got Unknown //IL_1304: Unknown result type (might be due to invalid IL or missing references) //IL_130e: Expected O, but got Unknown //IL_1329: Unknown result type (might be due to invalid IL or missing references) //IL_1351: Unknown result type (might be due to invalid IL or missing references) //IL_135b: Expected O, but got Unknown //IL_1376: Unknown result type (might be due to invalid IL or missing references) //IL_139e: Unknown result type (might be due to invalid IL or missing references) //IL_13a8: Expected O, but got Unknown //IL_13ce: Unknown result type (might be due to invalid IL or missing references) //IL_13d8: Expected O, but got Unknown //IL_13f3: Unknown result type (might be due to invalid IL or missing references) //IL_141b: Unknown result type (might be due to invalid IL or missing references) //IL_1425: Expected O, but got Unknown //IL_1440: Unknown result type (might be due to invalid IL or missing references) //IL_1468: Unknown result type (might be due to invalid IL or missing references) //IL_1472: Expected O, but got Unknown //IL_1498: Unknown result type (might be due to invalid IL or missing references) //IL_14a2: Expected O, but got Unknown //IL_14bd: Unknown result type (might be due to invalid IL or missing references) //IL_14e5: Unknown result type (might be due to invalid IL or missing references) //IL_14ef: Expected O, but got Unknown //IL_1515: Unknown result type (might be due to invalid IL or missing references) //IL_151f: Expected O, but got Unknown //IL_153a: Unknown result type (might be due to invalid IL or missing references) //IL_1562: Unknown result type (might be due to invalid IL or missing references) //IL_156c: Expected O, but got Unknown //IL_1592: Unknown result type (might be due to invalid IL or missing references) //IL_159c: Expected O, but got Unknown //IL_15b7: Unknown result type (might be due to invalid IL or missing references) //IL_15df: Unknown result type (might be due to invalid IL or missing references) //IL_15e9: Expected O, but got Unknown //IL_160f: Unknown result type (might be due to invalid IL or missing references) //IL_1619: Expected O, but got Unknown //IL_1634: Unknown result type (might be due to invalid IL or missing references) //IL_165c: Unknown result type (might be due to invalid IL or missing references) //IL_1666: Expected O, but got Unknown //IL_168c: Unknown result type (might be due to invalid IL or missing references) //IL_1696: Expected O, but got Unknown //IL_16b1: Unknown result type (might be due to invalid IL or missing references) //IL_16d9: Unknown result type (might be due to invalid IL or missing references) //IL_16e3: Expected O, but got Unknown //IL_1709: Unknown result type (might be due to invalid IL or missing references) //IL_1713: Expected O, but got Unknown //IL_172e: Unknown result type (might be due to invalid IL or missing references) //IL_1756: Unknown result type (might be due to invalid IL or missing references) //IL_1760: Expected O, but got Unknown //IL_1786: Unknown result type (might be due to invalid IL or missing references) //IL_1790: Expected O, but got Unknown //IL_17ab: Unknown result type (might be due to invalid IL or missing references) //IL_17d3: Unknown result type (might be due to invalid IL or missing references) //IL_17dd: Expected O, but got Unknown //IL_1803: Unknown result type (might be due to invalid IL or missing references) //IL_180d: Expected O, but got Unknown //IL_1828: Unknown result type (might be due to invalid IL or missing references) //IL_1850: Unknown result type (might be due to invalid IL or missing references) //IL_185a: Expected O, but got Unknown //IL_1880: Unknown result type (might be due to invalid IL or missing references) //IL_188a: Expected O, but got Unknown //IL_18a5: Unknown result type (might be due to invalid IL or missing references) //IL_18cd: Unknown result type (might be due to invalid IL or missing references) //IL_18d7: Expected O, but got Unknown //IL_18fd: Unknown result type (might be due to invalid IL or missing references) //IL_1907: Expected O, but got Unknown //IL_1922: Unknown result type (might be due to invalid IL or missing references) //IL_194a: Unknown result type (might be due to invalid IL or missing references) //IL_1954: Expected O, but got Unknown //IL_197a: Unknown result type (might be due to invalid IL or missing references) //IL_1984: Expected O, but got Unknown //IL_199f: Unknown result type (might be due to invalid IL or missing references) //IL_19c7: Unknown result type (might be due to invalid IL or missing references) //IL_19d1: Expected O, but got Unknown //IL_19f7: Unknown result type (might be due to invalid IL or missing references) //IL_1a01: Expected O, but got Unknown //IL_1a1c: Unknown result type (might be due to invalid IL or missing references) //IL_1a44: Unknown result type (might be due to invalid IL or missing references) //IL_1a4e: Expected O, but got Unknown //IL_1a69: Unknown result type (might be due to invalid IL or missing references) //IL_1a91: Unknown result type (might be due to invalid IL or missing references) //IL_1a9b: Expected O, but got Unknown //IL_1ac1: Unknown result type (might be due to invalid IL or missing references) //IL_1acb: Expected O, but got Unknown //IL_1ae6: Unknown result type (might be due to invalid IL or missing references) //IL_1b0e: Unknown result type (might be due to invalid IL or missing references) //IL_1b18: Expected O, but got Unknown //IL_1b3e: Unknown result type (might be due to invalid IL or missing references) //IL_1b48: Expected O, but got Unknown //IL_1b63: Unknown result type (might be due to invalid IL or missing references) //IL_1b8b: Unknown result type (might be due to invalid IL or missing references) //IL_1b95: Expected O, but got Unknown //IL_1bbb: Unknown result type (might be due to invalid IL or missing references) //IL_1bc5: Expected O, but got Unknown //IL_1be0: Unknown result type (might be due to invalid IL or missing references) //IL_1c08: Unknown result type (might be due to invalid IL or missing references) //IL_1c12: Expected O, but got Unknown //IL_1c2d: Unknown result type (might be due to invalid IL or missing references) //IL_1c55: Unknown result type (might be due to invalid IL or missing references) //IL_1c5f: Expected O, but got Unknown //IL_1c85: Unknown result type (might be due to invalid IL or missing references) //IL_1c8f: Expected O, but got Unknown //IL_1caa: Unknown result type (might be due to invalid IL or missing references) //IL_1cd2: Unknown result type (might be due to invalid IL or missing references) //IL_1cdc: Expected O, but got Unknown //IL_1cf7: Unknown result type (might be due to invalid IL or missing references) //IL_1d1f: Unknown result type (might be due to invalid IL or missing references) //IL_1d29: Expected O, but got Unknown //IL_1d4f: Unknown result type (might be due to invalid IL or missing references) //IL_1d59: Expected O, but got Unknown //IL_1d74: Unknown result type (might be due to invalid IL or missing references) //IL_1d9c: Unknown result type (might be due to invalid IL or missing references) //IL_1da6: Expected O, but got Unknown //IL_1dc1: Unknown result type (might be due to invalid IL or missing references) //IL_1de9: Unknown result type (might be due to invalid IL or missing references) //IL_1df3: Expected O, but got Unknown //IL_1e19: Unknown result type (might be due to invalid IL or missing references) //IL_1e23: Expected O, but got Unknown //IL_1e3e: Unknown result type (might be due to invalid IL or missing references) //IL_1e66: Unknown result type (might be due to invalid IL or missing references) //IL_1e70: Expected O, but got Unknown //IL_1e96: Unknown result type (might be due to invalid IL or missing references) //IL_1ea0: Expected O, but got Unknown //IL_1ebb: Unknown result type (might be due to invalid IL or missing references) //IL_1ee3: Unknown result type (might be due to invalid IL or missing references) //IL_1eed: Expected O, but got Unknown //IL_1f13: Unknown result type (might be due to invalid IL or missing references) //IL_1f1d: Expected O, but got Unknown //IL_1f38: Unknown result type (might be due to invalid IL or missing references) //IL_1f60: Unknown result type (might be due to invalid IL or missing references) //IL_1f6a: Expected O, but got Unknown voLanguage = ((BaseUnityPlugin)this).Config.Bind("Language", "Voice lines", (Languages)0, "Changes the language in which VEGA speaks."); voLanguage.SettingChanged += delegate { LoadAssets(); }; LethalConfigManager.AddConfigItem((BaseConfigItem)(object)new EnumDropDownConfigItem(voLanguage, false)); commandLanguage = ((BaseUnityPlugin)this).Config.Bind("Language", "Voice commands", (Languages)0, "Changes the voice commands to the language you choose.\n\nWARNING: This will erase all your custom commands and replace them with the defaults for the chosen language. If you have any custom commands and would like to keep them, DO NOT touch this!!!\n\nRequires a restart."); commandLanguage.SettingChanged += delegate { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) Plugin.language.Value = commandLanguage.Value; UpdateVoiceCommands(); messages.Value = LanguageHelper.Messages[commandLanguage.Value]; }; LethalConfigManager.AddConfigItem((BaseConfigItem)(object)new EnumDropDownConfigItem(commandLanguage)); vocalLevel = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)new EnumDropDownConfigItem(vocalLevel, false)); playIntro = ((BaseUnityPlugin)this).Config.Bind("Dialogue & Interactions", "Play intro", true, "If set to true, VEGA will give you its introduction speech the first time you use the mod."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(playIntro, false)); remoteEntityID = ((BaseUnityPlugin)this).Config.Bind("Dialogue & Interactions", "Remote Entity Identification", true, "If set to true, VEGA will give you the name of every new entity your crew scans."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(remoteEntityID, false)); giveApparatusWarnings = ((BaseUnityPlugin)this).Config.Bind("Dialogue & Interactions", "Give Apparatus warnings", true, "If set to true, VEGA will give you brief and informative warnings when the Apparatus is pulled."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(giveApparatusWarnings, false)); giveWeatherInfo = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(giveWeatherInfo, false)); messages = ((BaseUnityPlugin)this).Config.Bind("Dialogue & Interactions", "Signal Translator messages", LanguageHelper.Messages[commandLanguage.Value], "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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(messages)); globalConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Global", 0.5f, new ConfigDescription("Determines how difficult it is for VEGA to recognize all voice commands. Higher values means he needs to be more confident, lower values will activate more often, but will cause more false positives.\n\nIf you'd like to change the threshold for a specific command or set of commands, simply change their values to something higher than 0.\n\nThis setting can be changed mid-game.", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(globalConfidence, false)); gratitudeConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Gratitude", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(gratitudeConfidence, false)); stopConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Stop talking", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(stopConfidence, false)); secureDoorsConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Secure doors", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(secureDoorsConfidence, false)); turretsConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Turrets", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(turretsConfidence, false)); landminesConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Landmines", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(landminesConfidence, false)); trapsConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Spike traps", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(trapsConfidence, false)); signalsConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Signal translator", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(signalsConfidence, false)); teleportConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Teleport", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(teleportConfidence, false)); shipConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Ship", 0f, new ConfigDescription("Determines how difficult it is for VEGA to recognize voice commands related to the ship's lights and door. 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(shipConfidence, false)); miscConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Miscellaneous", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(miscConfidence, false)); crewStatusConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Crew Status", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(crewStatusConfidence, false)); crewInShipConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Crew in ship", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(crewInShipConfidence, false)); scrapLeftConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Scrap / items left", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(scrapLeftConfidence, false)); infoConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Info", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(infoConfidence, false)); manualActivationConfidence = ((BaseUnityPlugin)this).Config.Bind("Accuracy thresholds", "Manual Activation", 0f, 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(0f, 1f), Array.Empty())); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(manualActivationConfidence, false)); volume = ((BaseUnityPlugin)this).Config.Bind("Sound Settings", "Volume", 1f, new ConfigDescription("Changes how loud VEGA is.", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); 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; } }; LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(volume, false)); ignoreMasterVolume = ((BaseUnityPlugin)this).Config.Bind("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; } }; LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(ignoreMasterVolume, false)); useManualListening = ((BaseUnityPlugin)this).Config.Bind("Manual Listening", "Enabled", false, "Manual Listening determines if VEGA should only be able to hear you when you ask him to."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(useManualListening, false)); enableManualListeningAuto = ((BaseUnityPlugin)this).Config.Bind("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; }; LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(enableManualListeningAuto, false)); scannerRange = ((BaseUnityPlugin)this).Config.Bind("Advanced Scanner", "Range", 29f, new ConfigDescription("Changes how far the Advanced Scanner can reach (in meters).", (AcceptableValueBase)(object)new AcceptableValueRange(1f, 29f), Array.Empty())); scannerRange.SettingChanged += delegate { VEGA.scannerRange = scannerRange.Value; }; LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatSliderConfigItem(scannerRange, false)); enableAdvancedScannerAuto = ((BaseUnityPlugin)this).Config.Bind("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()).SetText("", true); } if ((Object)(object)HUDManagerPatch.items != (Object)null) { ((TMP_Text)HUDManagerPatch.items.GetComponent()).SetText("", true); } } }; LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(enableAdvancedScannerAuto, false)); detectMasked = ((BaseUnityPlugin)this).Config.Bind("Advanced Scanner", "Detect Masked employees", false, "Determines if the Advanced Scanner should be able to count Masked employees as entities."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(detectMasked, false)); infoDisplayMode = ((BaseUnityPlugin)this).Config.Bind("Advanced Scanner", "Info display mode", DisplayModes.Default, "Changes how the Advanced Scanner displays information."); infoDisplayMode.SettingChanged += delegate { VEGA.UpdateScannerDisplayMode(); }; LethalConfigManager.AddConfigItem((BaseConfigItem)(object)new EnumDropDownConfigItem(infoDisplayMode, false)); scale = ((BaseUnityPlugin)this).Config.Bind("Advanced Scanner", "Scale", 1f, "The size of the Advanced Scanner on the screen."); scale.SettingChanged += delegate { HUDManagerPatch.UpdateScannerPosAndScale(); }; LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatInputFieldConfigItem(scale, false)); horizontalPosition = ((BaseUnityPlugin)this).Config.Bind("Advanced Scanner", "Horizontal position", 45f, "The horizontal position of the Advanced Scanner on the screen."); horizontalPosition.SettingChanged += delegate { HUDManagerPatch.UpdateScannerPosAndScale(); }; LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatInputFieldConfigItem(horizontalPosition, false)); verticalPosition = ((BaseUnityPlugin)this).Config.Bind("Advanced Scanner", "Vertical position", 180f, "The vertical position of the Advanced Scanner on the screen."); verticalPosition.SettingChanged += delegate { HUDManagerPatch.UpdateScannerPosAndScale(); }; LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatInputFieldConfigItem(verticalPosition, false)); horizontalGap = ((BaseUnityPlugin)this).Config.Bind("Advanced Scanner", "Horizontal gap", 0f, "The horizontal gap between the nearby Entities and Items on the screen."); horizontalGap.SettingChanged += delegate { HUDManagerPatch.UpdateScannerPosAndScale(); }; LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatInputFieldConfigItem(horizontalGap, false)); verticalGap = ((BaseUnityPlugin)this).Config.Bind("Advanced Scanner", "Vertical gap", 50f, "The vertical gap between the nearby Entities and Items on the screen."); verticalGap.SettingChanged += delegate { HUDManagerPatch.UpdateScannerPosAndScale(); }; LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatInputFieldConfigItem(verticalGap, false)); entitiesTextLength = ((BaseUnityPlugin)this).Config.Bind("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().sizeDelta = new Vector2(num4, HUDManagerPatch.entities.GetComponent().sizeDelta.y); } }; LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatInputFieldConfigItem(entitiesTextLength, false)); itemsTextLength = ((BaseUnityPlugin)this).Config.Bind("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().sizeDelta = new Vector2(num3, HUDManagerPatch.items.GetComponent().sizeDelta.y); } }; LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatInputFieldConfigItem(itemsTextLength, false)); entitiesAlignment = ((BaseUnityPlugin)this).Config.Bind("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; } }; LethalConfigManager.AddConfigItem((BaseConfigItem)(object)new EnumDropDownConfigItem(entitiesAlignment, false)); itemsAlignment = ((BaseUnityPlugin)this).Config.Bind("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; } }; LethalConfigManager.AddConfigItem((BaseConfigItem)(object)new EnumDropDownConfigItem(itemsAlignment, false)); entitiesTilt = ((BaseUnityPlugin)this).Config.Bind("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(); float num2 = (ModChecker.hasEladsHUD ? (entitiesTilt.Value - 17f) : entitiesTilt.Value); ((Transform)component2).localRotation = Quaternion.Euler(((Transform)component2).localRotation.x, 0f - num2, ((Transform)component2).localRotation.z); } }; LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatInputFieldConfigItem(entitiesTilt, false)); itemsTilt = ((BaseUnityPlugin)this).Config.Bind("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(); float num = (ModChecker.hasEladsHUD ? (itemsTilt.Value - 17f) : itemsTilt.Value); ((Transform)component).localRotation = Quaternion.Euler(((Transform)component).localRotation.x, 0f - num, ((Transform)component).localRotation.z); } }; LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatInputFieldConfigItem(itemsTilt, false)); clearTextColor = ((BaseUnityPlugin)this).Config.Bind("Advanced Scanner", "Clear color", "#0000ff", "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(); }; LethalConfigManager.AddConfigItem((BaseConfigItem)new HexColorInputFieldConfigItem(clearTextColor, false)); entitiesNearbyTextColor = ((BaseUnityPlugin)this).Config.Bind("Advanced Scanner", "Entities nearby color", "#ff0000", "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(); }; LethalConfigManager.AddConfigItem((BaseConfigItem)new HexColorInputFieldConfigItem(entitiesNearbyTextColor, false)); itemsNearbyTextColor = ((BaseUnityPlugin)this).Config.Bind("Advanced Scanner", "Items nearby color", "#008000", "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(); }; LethalConfigManager.AddConfigItem((BaseConfigItem)new HexColorInputFieldConfigItem(itemsNearbyTextColor, false)); playerNameColors = ((BaseUnityPlugin)this).Config.Bind("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.SetNameColors(); VEGA.AddNameColors(); }; LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(playerNameColors, false)); sendRadarSwitchChatMessage = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(sendRadarSwitchChatMessage, false)); sendSignalTranslatorChatMessage = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(sendSignalTranslatorChatMessage, false)); sendTeleporterChatMessage = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(sendTeleporterChatMessage, false)); patchReadInput = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(patchReadInput, false)); name = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Name", "VEGA", "The name you'd like to address the mod by for voice commands (VEGA by default). This name will be added at the beginning of every command, except for the gratitude commands, where it will be added at the end of the command instead.\n\nYou can also leave it empty if you'd like to not use a name at all."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(name)); enhancedTeleportCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Enhanced Teleport commands", true, "Makes VEGA perform the radar switch before activating the teleporter."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(enhancedTeleportCommands, false)); enhancedHazardDisabling = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Enhanced Hazard Disabling commands", true, "Makes VEGA disable all visible turrets / landmines / spike traps when using their respective commands."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(enhancedHazardDisabling, false)); registerActivation = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerActivation)); startListeningCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Start listening commands", LanguageHelper.Commands[commandLanguage.Value]["startListening"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(startListeningCommands)); stopListeningCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Stop listening commands", LanguageHelper.Commands[commandLanguage.Value]["stopListening"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(stopListeningCommands)); registerMoonsInfo = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerMoonsInfo)); moonsInfoCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Moon info commands", LanguageHelper.Commands[commandLanguage.Value]["moonInfo"], "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!"); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(moonsInfoCommands)); registerCreatureInfo = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerCreatureInfo)); creatureInfoCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Creature info commands", LanguageHelper.Commands[commandLanguage.Value]["creatureInfo"], "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! The list of usable names is available in the Thunderstore page."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(creatureInfoCommands)); registerAdvancedScanner = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerAdvancedScanner)); activateAdvancedScannerCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Activate Advanced Scanner commands", LanguageHelper.Commands[commandLanguage.Value]["activateScanner"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(activateAdvancedScannerCommands)); deactivateAdvancedScannerCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Deactivate Advanced Scanner commands", LanguageHelper.Commands[commandLanguage.Value]["deactivateScanner"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(deactivateAdvancedScannerCommands)); registerInteractSecureDoor = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerInteractSecureDoor)); openSecureDoorCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Open secure door commands", LanguageHelper.Commands[commandLanguage.Value]["openDoor"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(openSecureDoorCommands)); closeSecureDoorCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Close secure door commands", LanguageHelper.Commands[commandLanguage.Value]["closeDoor"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(closeSecureDoorCommands)); registerInteractAllSecureDoors = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerInteractAllSecureDoors)); openAllSecureDoorsCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Open all secure door commands", LanguageHelper.Commands[commandLanguage.Value]["openAllDoors"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(openAllSecureDoorsCommands)); closeAllSecureDoorsCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Close all secure door commands", LanguageHelper.Commands[commandLanguage.Value]["closeAllDoors"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(closeAllSecureDoorsCommands)); registerDisableTurret = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerDisableTurret)); disableTurretCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Disable turret commands", LanguageHelper.Commands[commandLanguage.Value]["disableTurret"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(disableTurretCommands)); registerDisableAllTurrets = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerDisableAllTurrets)); disableAllTurretsCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Disable all turrets commands", LanguageHelper.Commands[commandLanguage.Value]["disableAllTurrets"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(disableAllTurretsCommands)); registerDisableMine = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerDisableMine)); disableMineCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Disable landmine commands", LanguageHelper.Commands[commandLanguage.Value]["disableMine"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(disableMineCommands)); registerDisableAllMines = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerDisableAllMines)); disableAllMinesCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Disable all landmines commands", LanguageHelper.Commands[commandLanguage.Value]["disableAllMines"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(disableAllMinesCommands)); registerDisableSpikeTrap = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerDisableSpikeTrap)); disableSpikeTrapCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Disable spike trap commands", LanguageHelper.Commands[commandLanguage.Value]["disableTrap"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(disableSpikeTrapCommands)); registerDisableAllSpikeTraps = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerDisableAllSpikeTraps)); disableAllSpikeTrapsCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Disable all spike traps commands", LanguageHelper.Commands[commandLanguage.Value]["disableAllTraps"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(disableAllSpikeTrapsCommands)); registerTeleporter = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerTeleporter)); teleporterCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Teleporter commands", LanguageHelper.Commands[commandLanguage.Value]["teleporter"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(teleporterCommands)); registerRadarSwitch = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerRadarSwitch)); radarSwitchCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Radar Switch commands", LanguageHelper.Commands[commandLanguage.Value]["mapSwitch"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(radarSwitchCommands)); registerCrewStatus = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerCrewStatus)); crewStatusCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Crew Status commands", LanguageHelper.Commands[commandLanguage.Value]["crewStatus"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(crewStatusCommands)); registerCrewInShip = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerCrewInShip)); crewInShipCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Crew in ship commands", LanguageHelper.Commands[commandLanguage.Value]["shipCrew"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(crewInShipCommands)); registerScrapLeft = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerScrapLeft)); scrapLeftCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Scrap / items left commands", LanguageHelper.Commands[commandLanguage.Value]["scrap"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(scrapLeftCommands)); registerRadarBoosters = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerRadarBoosters)); radarPingCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Radar Booster ping commands", LanguageHelper.Commands[commandLanguage.Value]["radarBooster"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(radarPingCommands)); radarFlashCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Radar Booster flash commands", LanguageHelper.Commands[commandLanguage.Value]["radarFlash"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(radarFlashCommands)); registerSignalTranslator = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerSignalTranslator)); transmitCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Transmit / send commands", LanguageHelper.Commands[commandLanguage.Value]["signalTranslator"], "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!"); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(transmitCommands)); registerTime = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerTime)); timeCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Current time commands", LanguageHelper.Commands[commandLanguage.Value]["time"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(timeCommands)); registerInteractShipDoors = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerInteractShipDoors)); openShipDoorsCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Open ship doors commands", LanguageHelper.Commands[commandLanguage.Value]["openShip"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(openShipDoorsCommands)); closeShipDoorsCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Close ship doors commands", LanguageHelper.Commands[commandLanguage.Value]["closeShip"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(closeShipDoorsCommands)); registerInteractShipLights = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerInteractShipLights)); lightsOnCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Ship Lights on commands", LanguageHelper.Commands[commandLanguage.Value]["lightsOn"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(lightsOnCommands)); lightsOffCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Ship Lights off commands", LanguageHelper.Commands[commandLanguage.Value]["lightsOff"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(lightsOffCommands)); registerInteractShipMagnet = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerInteractShipMagnet)); magnetOnCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Activate Magnet commands", LanguageHelper.Commands[commandLanguage.Value]["magnetOn"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(magnetOnCommands)); magnetOffCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Deactivate Magnet commands", LanguageHelper.Commands[commandLanguage.Value]["magnetOff"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(magnetOffCommands)); registerWeatherInfo = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerWeatherInfo)); weatherInfoCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Weather info commands", LanguageHelper.Commands[commandLanguage.Value]["weatherInfo"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.\nIMPORTANT: Weather info commands will always have the condition's name and 'weather' at the end!"); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(weatherInfoCommands)); registerStop = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerStop)); stopCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Stop talking commands", LanguageHelper.Commands[commandLanguage.Value]["stopTalking"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(stopCommands)); registerThanks = ((BaseUnityPlugin)this).Config.Bind("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."); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(registerThanks)); gratitudeCommands = ((BaseUnityPlugin)this).Config.Bind("Voice Commands", "Gratitude commands", LanguageHelper.Commands[commandLanguage.Value]["gratitude"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'."); LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(gratitudeCommands)); } 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; } } private void UpdateVoiceCommands() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) startListeningCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["startListening"]; stopListeningCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["stopListening"]; moonsInfoCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["moonInfo"]; creatureInfoCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["creatureInfo"]; activateAdvancedScannerCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["activateScanner"]; deactivateAdvancedScannerCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["deactivateScanner"]; openSecureDoorCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["openDoor"]; closeSecureDoorCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["closeDoor"]; openAllSecureDoorsCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["openAllDoors"]; closeAllSecureDoorsCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["closeAllDoors"]; disableTurretCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["disableTurret"]; disableAllTurretsCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["disableAllTurrets"]; disableMineCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["disableMine"]; disableAllMinesCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["disableAllMines"]; disableSpikeTrapCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["disableTrap"]; disableAllSpikeTrapsCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["disableAllTraps"]; teleporterCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["teleporter"]; radarSwitchCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["mapSwitch"]; crewStatusCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["crewStatus"]; crewInShipCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["shipCrew"]; scrapLeftCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["scrap"]; radarPingCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["radarBooster"]; radarFlashCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["radarFlash"]; transmitCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["signalTranslator"]; timeCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["time"]; openShipDoorsCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["openShip"]; closeShipDoorsCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["closeShip"]; lightsOnCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["lightsOn"]; lightsOffCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["lightsOff"]; magnetOnCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["magnetOn"]; magnetOffCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["magnetOff"]; weatherInfoCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["weatherInfo"]; stopCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["stopTalking"]; gratitudeCommands.Value = LanguageHelper.Commands[commandLanguage.Value]["gratitude"]; } } 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 ReadFromFile() { List list = new List(); 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 list = ReadFromFile(); if (list.Count > index) { return list[index]; } return false; } } internal class VEGA { [CompilerGenerated] private sealed class d__57 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private ShipTeleporter 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__57(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 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; } 5__1 = GameObject.Find("Teleporter(Clone)").GetComponent(); 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; } } 5__1.PressTeleportButtonServerRpc(); if (Plugin.sendTeleporterChatMessage.Value) { SendChatMessage("has activated the teleporter"); } goto IL_0140; IL_0165: return false; IL_0140: 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 d__65 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; private int 5__1; private List 5__2; private PlayerControllerB[] <>s__3; private int <>s__4; private PlayerControllerB 5__5; private string
5__6; private string 5__7; private List.Enumerator <>s__8; private string 5__9; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__65(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>s__3 = null; 5__5 = null;
5__6 = null; 5__7 = null; <>s__8 = default(List.Enumerator); 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; 5__1 = 0; 5__2 = new List(); <>s__3 = StartOfRound.Instance.allPlayerScripts; for (<>s__4 = 0; <>s__4 < <>s__3.Length; <>s__4++) { 5__5 = <>s__3[<>s__4]; if (5__5.isInHangarShipRoom) { 5__2.Add(5__5.playerUsername); } if (5__5.isPlayerDead) { 5__1++; } 5__5 = null; } <>s__3 = null; if (StartOfRound.Instance.livingPlayers == 1 && 5__1 == 0) { if (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;
5__6 = "CREWMATES IN THE SHIP:"; 5__7 = ""; if (5__2.Count == 0) { 5__7 = "No one is in the ship."; } else { <>s__8 = 5__2.GetEnumerator(); try { while (<>s__8.MoveNext()) { 5__9 = <>s__8.Current; if (5__2.Last() == 5__9) { 5__7 += 5__9; } else { 5__7 = 5__7 + 5__9 + ", "; } 5__9 = null; } } finally { ((IDisposable)<>s__8).Dispose(); } <>s__8 = default(List.Enumerator); } if (Plugin.vocalLevel.Value >= VocalLevels.High) { PlayRandomLine("ReportComplete", Random.Range(2, 4)); } HUDManager.Instance.DisplayTip(
5__6, "" + 5__7 + "", false, false, "LC_Tip1");
5__6 = null; 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 d__64 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; private int 5__1; private PlayerControllerB[] <>s__2; private int <>s__3; private PlayerControllerB 5__4; private string
5__5; private string 5__6; private string 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__64(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__2 = null; 5__4 = null;
5__5 = null; 5__6 = null; 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; 5__1 = 0; <>s__2 = StartOfRound.Instance.allPlayerScripts; for (<>s__3 = 0; <>s__3 < <>s__2.Length; <>s__3++) { 5__4 = <>s__2[<>s__3]; if (5__4.isPlayerDead) { 5__1++; } 5__4 = null; } <>s__2 = null; if (StartOfRound.Instance.livingPlayers == 1 && 5__1 == 0) { PlayLine("CrewStatusSolo"); break; } PlayLine("GettingCrewStatus"); <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1;
5__5 = "CREW STATUS REPORT:"; 5__6 = StartOfRound.Instance.livingPlayers + " employees alive\n"; 5__7 = 5__1 + " deceased employees"; if (5__1 == 1) { 5__7 = "1 deceased employee\n"; } if (StartOfRound.Instance.livingPlayers == 1) { PlayLine("GoodLuck", 2.5f); 5__6 = "1 employee alive\n"; HUDManager.Instance.DisplayTip(
5__5, 5__6 + 5__7, true, false, "LC_Tip1"); } else { if (Plugin.vocalLevel.Value >= VocalLevels.High) { PlayRandomLine("ReportComplete", Random.Range(1, 4)); } HUDManager.Instance.DisplayTip(
5__5, 5__6 + 5__7, false, false, "LC_Tip1"); }
5__5 = null; 5__6 = null; 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 d__66 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public string message; public float delay; private int 5__1; private int 5__2; private int 5__3; private int 5__4; private string
5__5; private string 5__6; private string 5__7; private GrabbableObject[] 5__8; private GrabbableObject[] <>s__9; private int <>s__10; private GrabbableObject 5__11; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__66(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() {
5__5 = null; 5__6 = null; 5__7 = null; 5__8 = null; <>s__9 = null; 5__11 = null; <>1__state = -2; } private bool MoveNext() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0; 5__2 = 0; 5__3 = 0; 5__4 = 0; if (message.ToLower().Contains(((int)Plugin.commandLanguage.Value == 0) ? "item" : "objetos")) { PlayLine("PerformingItemScan"); } PlayLine("PerformingScrapScan"); <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1;
5__5 = "SCRAP SCAN RESULTS:"; 5__8 = Object.FindObjectsOfType(); <>s__9 = 5__8; for (<>s__10 = 0; <>s__10 < <>s__9.Length; <>s__10++) { 5__11 = <>s__9[<>s__10]; if (5__11.itemProperties.isScrap && !5__11.isHeld) { if (!5__11.isInShipRoom) { 5__1++; 5__3 += 5__11.scrapValue; } else { 5__2++; 5__4 += 5__11.scrapValue; } } 5__11 = null; } <>s__9 = null; if (5__1 == 0) { 5__6 = "There are no items outside the ship."; } else if (5__1 > 1) { 5__6 = "There are " + 5__1 + " items left, worth " + creditsChar + 5__3; } else { 5__6 = "There is 1 item left, worth " + creditsChar + 5__3; } if (5__2 == 0) { 5__7 = "There are no items inside the ship."; } else if (5__2 > 1) { 5__7 = "The ship currently has " + 5__2 + " items, worth " + creditsChar + 5__4; } else { 5__7 = "The ship currently has 1 item, worth " + creditsChar + 5__4; } if (Plugin.vocalLevel.Value >= VocalLevels.High) { PlayRandomLine("ScrapScanComplete", Random.Range(1, 4)); } HUDManager.Instance.DisplayTip(
5__5, "" + 5__6 + "\n" + 5__7 + "", 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 d__59 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public bool on; private ShipLights 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__59(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 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; 5__1 = Object.FindObjectOfType(); if (!((Object)(object)5__1 != (Object)null)) { break; } if (on) { if (5__1.areLightsOn) { PlayLine("LightsAlreadyOn"); } else { PlayLine("LightsOn"); } } else if (!5__1.areLightsOn) { PlayLine("LightsAlreadyOff"); } else { PlayLine("LightsOff"); } <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; case 1: <>1__state = -1; 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(); } } public static AudioSource audioSource; public static AudioSource sfxAudioSource; public static List audioClips; public static bool listening; 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 nameColorPairs; 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 bool malfunctionPowerTriggered; internal static bool malfunctionTeleporterTriggered; internal static bool malfunctionDistortionTriggered; internal static bool malfunctionDoorTriggered; public static string[] signals; public static Dictionary enemies = new Dictionary { { 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" }, { 26, "Sapsucker" }, { 27, "Gunkfish" }, { 28, "Feiopar" }, { 29, "Cadaver" } }; private static readonly string[] moonNames = new string[14] { "Experimentation", "Vow", "Assurance", "Ass", "March", "Adamance", "Offense", "Rend", "Dine", "Titan", "Tit", "Artifice", "Embrion", "Liquidation" }; 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"; 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 ((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[] 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[] 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(); List list = new List(); 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 list2 = new List(); 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 list = new List(); TerminalAccessibleObject[] array = Object.FindObjectsOfType(); TerminalAccessibleObject[] array2 = array; foreach (TerminalAccessibleObject val in array2) { if (Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent())) { list.Add(val); } } if (list.Count == 0) { noTurrets = true; return null; } TerminalAccessibleObject result = list[0]; List list2 = new List(); 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, -1)) { result = item; } else if (list2.Count > 0) { list2.Remove(num); } } if (list2.Count == 0) { noVisibleTurret = true; return null; } return result; } internal static void DisableVisibleTurrets() { //IL_0093: Unknown result type (might be due to invalid IL or missing references) List list = new List(); TerminalAccessibleObject[] array = Object.FindObjectsOfType(); TerminalAccessibleObject[] array2 = array; foreach (TerminalAccessibleObject val in array2) { if (Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent())) { list.Add(val); } } if (list.Count == 0) { noTurrets = true; return; } List list2 = new List(); foreach (TerminalAccessibleObject item in list) { if (StartOfRound.Instance.localPlayerController.HasLineOfSightToPosition(((Component)item).transform.position, 45f, 10000, -1f, -1)) { list2.Add(item); item.CallFunctionFromTerminal(); turretDisabled = true; } } if (list2.Count == 0) { noVisibleTurret = true; } } internal static void DisableTurret() { if (Plugin.enhancedHazardDisabling.Value) { DisableVisibleTurrets(); return; } TerminalAccessibleObject closestTurret = GetClosestTurret(); if ((Object)(object)closestTurret != (Object)null) { Plugin.LogToConsole("Disabling turret", "debug"); closestTurret.CallFunctionFromTerminal(); turretDisabled = true; } } internal static void PlayTurretAudio() { if (turretDisabled) { if (Plugin.vocalLevel.Value >= VocalLevels.High) { PlayRandomLine("TurretDisabled", Random.Range(1, 4), 0.7f); } } else if (noVisibleTurret) { PlayLine("NoVisibleTurret"); } else if (noTurrets) { PlayLine("NoTurrets"); } } internal static void DisableAllTurrets() { Plugin.LogToConsole("Disabling all turrets", "debug"); TerminalAccessibleObject[] array = Object.FindObjectsOfType(); TerminalAccessibleObject[] array2 = array; foreach (TerminalAccessibleObject val in array2) { if (Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent())) { val.CallFunctionFromTerminal(); turretsExist = true; } } if (turretsExist) { if (Plugin.vocalLevel.Value >= VocalLevels.High) { PlayRandomLine("AllTurretsDisabled", Random.Range(1, 4), 0.7f); } } else { PlayLine("NoTurrets"); } } internal static TerminalAccessibleObject? GetClosestMine() { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) Plugin.LogToConsole("Getting closest landmine", "debug"); TerminalAccessibleObject[] array = Object.FindObjectsOfType(); List list = new List(); TerminalAccessibleObject[] array2 = array; foreach (TerminalAccessibleObject val in array2) { if (Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent())) { list.Add(val); } } if (list.Count == 0) { PlayLine("NoMines"); return null; } TerminalAccessibleObject result = list[0]; List list2 = new List(); 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, -1)) { result = item; } else if (list2.Count > 0) { list2.Remove(num); } } if (list2.Count == 0) { PlayLine("NoVisibleMine"); return null; } return result; } internal static void DisableVisibleMines() { //IL_009f: Unknown result type (might be due to invalid IL or missing references) List list = new List(); TerminalAccessibleObject[] array = Object.FindObjectsOfType(); TerminalAccessibleObject[] array2 = array; foreach (TerminalAccessibleObject val in array2) { if (Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent())) { list.Add(val); } } if (list.Count == 0) { PlayLine("NoMines"); return; } List list2 = new List(); foreach (TerminalAccessibleObject item in list) { if (StartOfRound.Instance.localPlayerController.HasLineOfSightToPosition(((Component)item).transform.position, 45f, 10000, -1f, -1)) { list2.Add(item); item.CallFunctionFromTerminal(); } } if (list2.Count == 0) { PlayLine("NoVisibleMine"); } else if (Plugin.vocalLevel.Value >= VocalLevels.High) { PlayRandomLine("MineDisabled", Random.Range(1, 4)); } } internal static void DisableMine() { Plugin.LogToConsole("Disabling landmine", "debug"); if (Plugin.enhancedHazardDisabling.Value) { DisableVisibleMines(); return; } TerminalAccessibleObject closestMine = GetClosestMine(); if ((Object)(object)closestMine != (Object)null) { closestMine.CallFunctionFromTerminal(); if (Plugin.vocalLevel.Value >= VocalLevels.High) { PlayRandomLine("MineDisabled", Random.Range(1, 4)); } } } internal static void DisableAllMines() { bool flag = false; Plugin.LogToConsole("Disabling all landmines", "debug"); TerminalAccessibleObject[] array = Object.FindObjectsOfType(); TerminalAccessibleObject[] array2 = array; foreach (TerminalAccessibleObject val in array2) { if (Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent())) { val.CallFunctionFromTerminal(); flag = true; } } if (flag) { if (Plugin.vocalLevel.Value >= VocalLevels.Low) { PlayRandomLine("AllMinesDisabled", Random.Range(1, 4)); } } else { PlayLine("NoMines"); } } internal static TerminalAccessibleObject? GetClosestSpikeTrap() { //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) Plugin.LogToConsole("Getting closest spike trap", "debug"); TerminalAccessibleObject[] array = Object.FindObjectsOfType(); List list = new List(); TerminalAccessibleObject[] array2 = array; foreach (TerminalAccessibleObject val in array2) { if ((Object)(object)((Component)val).gameObject.transform.parent != (Object)null && ((Object)((Component)val).gameObject.transform.parent).name.Equals("Container")) { list.Add(val); } } if (list.Count == 0) { PlayLine("NoTraps"); return null; } TerminalAccessibleObject result = list[0]; List list2 = new List(); 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, -1)) { result = item; } else if (list2.Count > 0) { list2.Remove(num); } } if (list2.Count == 0) { PlayLine("NoVisibleTrap"); return null; } return result; } internal static void DisableVisibleSpikeTraps() { //IL_00cd: Unknown result type (might be due to invalid IL or missing references) List list = new List(); TerminalAccessibleObject[] array = Object.FindObjectsOfType(); TerminalAccessibleObject[] array2 = array; foreach (TerminalAccessibleObject val in array2) { if ((Object)(object)((Component)val).gameObject.transform.parent != (Object)null && ((Object)((Component)val).gameObject.transform.parent).name.Equals("Container")) { list.Add(val); } } if (list.Count == 0) { PlayLine("NoTraps"); return; } List list2 = new List(); foreach (TerminalAccessibleObject item in list) { if (StartOfRound.Instance.localPlayerController.HasLineOfSightToPosition(((Component)item).transform.position, 45f, 10000, -1f, -1)) { list2.Add(item); item.CallFunctionFromTerminal(); } } if (list2.Count == 0) { PlayLine("NoVisibleTrap"); } else if (Plugin.vocalLevel.Value >= VocalLevels.High) { PlayRandomLine("TrapDisabled", Random.Range(1, 4)); } } internal static void DisableSpikeTrap() { if (Plugin.enhancedHazardDisabling.Value) { DisableVisibleSpikeTraps(); return; } TerminalAccessibleObject closestSpikeTrap = GetClosestSpikeTrap(); if ((Object)(object)closestSpikeTrap != (Object)null) { Plugin.LogToConsole("Disabling spike trap", "debug"); closestSpikeTrap.CallFunctionFromTerminal(); if (Plugin.vocalLevel.Value >= VocalLevels.Low) { PlayRandomLine("TrapDisabled", Random.Range(1, 4)); } } } internal static void DisableAllSpikeTraps() { bool flag = false; Plugin.LogToConsole("Disabling all spike traps", "debug"); TerminalAccessibleObject[] array = Object.FindObjectsOfType(); TerminalAccessibleObject[] array2 = array; foreach (TerminalAccessibleObject val in array2) { if ((Object)(object)((Component)val).gameObject.transform.parent != (Object)null && ((Object)((Component)val).gameObject.transform.parent).name.Equals("Container")) { val.CallFunctionFromTerminal(); flag = true; } } if (flag) { if (Plugin.vocalLevel.Value >= VocalLevels.Low) { PlayRandomLine("AllTrapsDisabled", Random.Range(1, 4)); } } else { PlayLine("NoTraps"); } } [IteratorStateMachine(typeof(d__57))] internal static IEnumerator ActivateTeleporter() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__57(0); } internal static void SwitchRadar(bool checkMalfunctions = true, bool checkCurrentTarget = true) { if (checkCurrentTarget && (Object)(object)StartOfRound.Instance.mapScreen.targetedPlayer == (Object)(object)StartOfRound.Instance.localPlayerController) { PlayLine("RadarAlreadyFocused"); return; } int num = StartOfRound.Instance.mapScreen.radarTargets.FindIndex((TransformAndName target) => (Object)(object)target.transform == (Object)(object)((Component)StartOfRound.Instance.localPlayerController).transform); StartOfRound.Instance.mapScreen.SwitchRadarTargetAndSync(num); if (Plugin.sendRadarSwitchChatMessage.Value) { SendChatMessage("performed a radar switch"); } } [IteratorStateMachine(typeof(d__59))] internal static IEnumerator SwitchLights(bool on) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__59(0) { on = on }; } public static void PerformAdvancedScan() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (!advancedScannerActive) { return; } Vector3 position = ((Component)StartOfRound.Instance.localPlayerController).transform.position; int num = 0; int num2 = 0; float num3 = 0f; Collider[] array = Physics.OverlapSphere(position, scannerRange); Collider[] array2 = array; foreach (Collider val in array2) { GrabbableObject component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { if (component.itemProperties.isScrap && !component.isHeld) { num2++; num3 += (float)component.scrapValue; } continue; } ScanNodeProperties component2 = ((Component)val).GetComponent(); if ((Object)(object)component2 != (Object)null && component2.creatureScanID != -1) { if (component2.creatureScanID == 18) { num++; continue; } EnemyAI val2 = ((Component)((Component)component2).transform.parent).GetComponent(); if ((Object)(object)val2 == (Object)null) { val2 = ((Component)((Component)component2).transform.parent).GetComponent()?.mainScript; } if ((Object)(object)val2 != (Object)null && !val2.isEnemyDead && ((object)val2).GetType() != typeof(DocileLocustBeesAI) && ((object)val2).GetType() != typeof(DoublewingAI) && ((object)val2).GetType() != typeof(SandWormAI)) { num++; } } else if (Plugin.detectMasked.Value) { MaskedPlayerEnemy component3 = ((Component)val).GetComponent(); if (component3 != null && !((EnemyAI)component3).isEnemyDead) { num++; } } } switch (num) { case 0: ((TMP_Text)entitiesTextComponent).SetText(enemiesTopText + clearTextColor + "Clear", true); break; case 1: ((TMP_Text)entitiesTextComponent).SetText(enemiesTopText + enemiesTextColor + oneEntityText, true); break; default: ((TMP_Text)entitiesTextComponent).SetText(enemiesTopText + enemiesTextColor + num + entitiesText, true); break; } switch (num2) { case 0: ((TMP_Text)itemsTextComponent).SetText(itemsTopText + clearTextColor + "Clear", true); break; case 1: ((TMP_Text)itemsTextComponent).SetText(itemsTopText + itemsTextColor + oneItemText + creditsChar + num3 + "", true); break; default: ((TMP_Text)itemsTextComponent).SetText(itemsTopText + itemsTextColor + num2 + itemsText + creditsChar + num3 + "", true); break; } } internal static void GetDayMode() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected I4, but got Unknown DayMode dayMode = TimeOfDay.Instance.dayMode; DayMode val = dayMode; switch (val - -1) { case 0: PlayLine("None"); Plugin.LogToConsole("No day mode found", "warn"); break; case 1: PlayLine("Dawn"); break; case 2: PlayLine("Noon"); break; case 3: PlayLine("Sundown"); break; case 4: PlayLine("Midnight"); break; default: PlayLine("None"); Plugin.LogToConsole("No day mode found", "warn"); break; } } internal static RadarBoosterItem? GetClosestRadarBooster() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) RadarBoosterItem[] array = Object.FindObjectsOfType(); if (array.Count() == 0) { if (Plugin.vocalLevel.Value >= VocalLevels.Medium) { PlayLine("NoBoosters"); } PlayLine("NoBoostersLow"); return null; } RadarBoosterItem result = array[0]; List list = new List(); RadarBoosterItem[] array2 = array; foreach (RadarBoosterItem val in array2) { float num = Vector3.Distance(((Component)val).transform.position, ((Component)StartOfRound.Instance.localPlayerController).transform.position); list.Add(num); if (num <= list.Min()) { result = val; } } return result; } internal static void InteractWithBooster(bool ping) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) RadarBoosterItem closestBooster = GetClosestRadarBooster(); if (!((Object)(object)closestBooster != (Object)null) || !closestBooster.radarEnabled) { return; } if (Vector3.Distance(((Component)closestBooster).transform.position, ((Component)StartOfRound.Instance.localPlayerController).transform.position) < 16f) { int num = StartOfRound.Instance.mapScreen.radarTargets.FindIndex((TransformAndName target) => (Object)(object)target.transform == (Object)(object)((Component)closestBooster).transform); if (ping) { Plugin.LogToConsole("Pinging " + closestBooster.radarBoosterName); StartOfRound.Instance.mapScreen.PingRadarBooster(num); } else { Plugin.LogToConsole("Flashing " + closestBooster.radarBoosterName); StartOfRound.Instance.mapScreen.FlashRadarBooster(num); } } else { if (Plugin.vocalLevel.Value >= VocalLevels.Medium) { PlayLine("NoBoostersNearby"); } PlayLine("NoBoostersNearbyLow"); } } [IteratorStateMachine(typeof(d__64))] internal static IEnumerator GetCrewStatus(float delay = 5f) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__64(0) { delay = delay }; } [IteratorStateMachine(typeof(d__65))] internal static IEnumerator GetCrewInShip(float delay = 5f) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__65(0) { delay = delay }; } [IteratorStateMachine(typeof(d__66))] internal static IEnumerator GetScrapLeft(string message, float delay = 5f) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__66(0) { message = message, delay = delay }; } internal static void SetNameColors() { nameColorPairs = new Dictionary { { "JS", "#b51b3e" }, { "JS0", "#b51b3e" }, { "Dorimon Pls", "#ff0000" }, { "Mina", "#a11010" }, { "Nico", "#ffffff" }, { "xVenatoRx", "#ff8000" }, { "Jowyck", "#00ffff" } }; } internal static void AddNameColors() { string[] array = Plugin.playerNameColors.Value.Split(", ", StringSplitOptions.RemoveEmptyEntries); string[] array2 = array; foreach (string text in array2) { string[] array3 = text.Split(": "); string key = array3[0]; string value = array3[1]; nameColorPairs[key] = value; } } private static string GetNameColor(string name) { return nameColorPairs.GetValueOrDefault(name, ""); } public static void SendChatMessage(string message) { string playerUsername = StartOfRound.Instance.localPlayerController.playerUsername; string nameColor = GetNameColor(playerUsername); nameColor = (StringHasHexCode(nameColor) ? ("") : ""); string text = ((nameColor != "") ? "" : ""); HUDManager.Instance.AddTextToChatOnServer(nameColor + playerUsername + text + " " + message, -1); } private static bool StringHasHexCode(string color) { if (color.Length == 7 && color.Contains("#")) { return true; } return false; } public static void UpdateScannerDisplayMode() { oneEntityText = ((Plugin.infoDisplayMode.Value == DisplayModes.Default || Plugin.infoDisplayMode.Value == DisplayModes.OneLine) ? "1 entity nearby" : "1 nearby"); entitiesText = ((Plugin.infoDisplayMode.Value == DisplayModes.Default || Plugin.infoDisplayMode.Value == DisplayModes.OneLine) ? " entities nearby" : " nearby"); oneItemText = ((Plugin.infoDisplayMode.Value == DisplayModes.Default || Plugin.infoDisplayMode.Value == DisplayModes.OneLine) ? "1 item nearby, worth " : "1 nearby, "); itemsText = ((Plugin.infoDisplayMode.Value == DisplayModes.Default || Plugin.infoDisplayMode.Value == DisplayModes.OneLine) ? " items nearby, worth " : " nearby, "); enemiesTopText = ((Plugin.infoDisplayMode.Value == DisplayModes.OneLine || Plugin.infoDisplayMode.Value == DisplayModes.CompactOneLine) ? "Entities: " : "Entities:\n"); itemsTopText = ((Plugin.infoDisplayMode.Value == DisplayModes.OneLine || Plugin.infoDisplayMode.Value == DisplayModes.CompactOneLine) ? "Items: " : "Items:\n"); } public static void UpdateScannerColors() { clearTextColor = ""; enemiesTextColor = ""; itemsTextColor = ""; } internal static void InitializeScannerVariables() { advancedScannerActive = Plugin.enableAdvancedScannerAuto.Value; clearTextColor = ""; enemiesTopText = ((Plugin.infoDisplayMode.Value == DisplayModes.OneLine || Plugin.infoDisplayMode.Value == DisplayModes.CompactOneLine) ? "Entities: " : "Entities:\n"); oneEntityText = ((Plugin.infoDisplayMode.Value == DisplayModes.Default || Plugin.infoDisplayMode.Value == DisplayModes.OneLine) ? "1 entity nearby" : "1 nearby"); entitiesText = ((Plugin.infoDisplayMode.Value == DisplayModes.Default || Plugin.infoDisplayMode.Value == DisplayModes.OneLine) ? " entities nearby" : " nearby"); enemiesTextColor = ""; itemsTopText = ((Plugin.infoDisplayMode.Value == DisplayModes.OneLine || Plugin.infoDisplayMode.Value == DisplayModes.CompactOneLine) ? "Items: " : "Items:\n"); oneItemText = ((Plugin.infoDisplayMode.Value == DisplayModes.Default || Plugin.infoDisplayMode.Value == DisplayModes.OneLine) ? "1 item nearby, worth " : "1 nearby, "); itemsText = ((Plugin.infoDisplayMode.Value == DisplayModes.Default || Plugin.infoDisplayMode.Value == DisplayModes.OneLine) ? " items nearby, worth " : " nearby, "); itemsTextColor = ""; scannerRange = Plugin.scannerRange.Value; } public static void Initialize() { Plugin.LogToConsole("Initializing VEGA"); signals = Plugin.messages.Value.Split(", "); InitializeScannerVariables(); SetNameColors(); AddNameColors(); listening = false; if (!Plugin.useManualListening.Value || (Plugin.enableManualListeningAuto.Value && Plugin.useManualListening.Value)) { listening = true; } Plugin.LogToConsole("Is VEGA listening? -> " + listening, "debug"); RegisterAllCommands(); } private static void RegisterAllCommands() { Plugin.LogToConsole("Registering voice commands"); RegisterMiscCommands(); RegisterMoonsInfo(); RegisterEntityInfo(); RegisterDoorCommands(); RegisterHazardsCommands(); RegisterTeleportCommands(); RegisterAdvancedScannerCommands(); RegisterTimeOfDayCommands(); RegisterRadarBoosterCommands(); RegisterSignalTranslatorCommands(); RegisterWeatherCommands(); RegisterReportCommands(); RegisterActivationCommands(); } internal static void RegisterActivationCommands() { if (!Plugin.registerActivation.Value) { return; } string[] phrases = CreatePhrases(Plugin.startListeningCommands); Speech.RegisterPhrases(phrases); Speech.RegisterCustomHandler((EventHandler)delegate { if (Speech.IsAboveThreshold(phrases, (double)GetThreshold(Plugin.manualActivationConfidence.Value)) && Plugin.useManualListening.Value && listening && !((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead) { if (!listening) { listening = true; Plugin.LogToConsole("Is VEGA listening -> " + listening, "debug"); PlaySFX("Activate"); } else { PlayLine("AlreadyActive"); } } }); string[] phrases2 = CreatePhrases(Plugin.stopListeningCommands); Speech.RegisterPhrases(phrases2); Speech.RegisterCustomHandler((EventHandler)delegate { if (Speech.IsAboveThreshold(phrases2, (double)GetThreshold(Plugin.manualActivationConfidence.Value)) && Plugin.useManualListening.Value && listening && !((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead) { if (listening) { listening = false; Plugin.LogToConsole("Is VEGA listening -> " + listening, "debug"); PlaySFX("Deactivate"); } else { PlayLine("AlreadyInactive"); } } }); } internal static void RegisterMiscCommands() { if (Plugin.registerStop.Value) { string[] phrases = CreatePhrases(Plugin.stopCommands); Speech.RegisterPhrases(phrases); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && (Object)(object)audioSource != (Object)null && Speech.IsAboveThreshold(phrases, (double)GetThreshold(Plugin.stopConfidence.Value)) && listening) { audioSource.Stop(); } }); } if (Plugin.registerThanks.Value) { string[] phrases2 = CreatePhrases(Plugin.gratitudeCommands, oppositeOrder: true); Speech.RegisterPhrases(phrases2); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases2, (double)GetThreshold(Plugin.gratitudeConfidence.Value)) && listening) { PlayRandomLine("NoProblem", Random.Range(1, 5)); } }); } if (Plugin.registerInteractShipLights.Value) { string[] phrases3 = CreatePhrases(Plugin.lightsOnCommands); Speech.RegisterPhrases(phrases3); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases3, (double)GetThreshold(Plugin.shipConfidence.Value)) && listening) { CoroutineManager.StartCoroutine(SwitchLights(on: true)); } }); string[] phrases5 = CreatePhrases(Plugin.lightsOffCommands); Speech.RegisterPhrases(phrases5); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases5, (double)GetThreshold(Plugin.shipConfidence.Value)) && listening) { CoroutineManager.StartCoroutine(SwitchLights(on: false)); } }); } if (!Plugin.registerInteractShipMagnet.Value) { return; } string[] phrases4 = CreatePhrases(Plugin.magnetOnCommands); Speech.RegisterPhrases(phrases4); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases4, (double)GetThreshold(Plugin.shipConfidence.Value)) && listening) { if (StartOfRound.Instance.magnetOn) { PlayLine("MagnetAlreadyActive"); } else { StartOfRound.Instance.SetMagnetOnServerRpc(true); if (Plugin.vocalLevel.Value >= VocalLevels.Low && StartOfRound.Instance.magnetOn) { PlayRandomLine("ActivateMagnet", Random.Range(1, 3)); } } } }); string[] phrases6 = CreatePhrases(Plugin.magnetOffCommands); Speech.RegisterPhrases(phrases6); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases6, (double)GetThreshold(Plugin.shipConfidence.Value)) && listening) { if (!StartOfRound.Instance.magnetOn) { PlayLine("MagnetAlreadyInactive"); } else { StartOfRound.Instance.SetMagnetOnServerRpc(false); if (Plugin.vocalLevel.Value >= VocalLevels.Low && !StartOfRound.Instance.magnetOn) { PlayRandomLine("DeactivateMagnet", Random.Range(1, 3)); } } } }); } internal static void RegisterWeatherCommands() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) if (!Plugin.registerWeatherInfo.Value) { return; } string[] array = LanguageHelper.Weathers[Plugin.commandLanguage.Value]; foreach (string weatherCondition in array) { string[] phrases = CreatePhrases(Plugin.weatherInfoCommands); string[] array2 = phrases; foreach (string text in array2) { string text2 = (((int)Plugin.commandLanguage.Value == 0) ? (text + " " + weatherCondition + " weather") : (text + " " + weatherCondition)); phrases[Array.IndexOf(phrases, text)] = text2; } Speech.RegisterPhrases(phrases); Speech.RegisterCustomHandler((EventHandler)delegate { if (Speech.IsAboveThreshold(phrases, (double)GetThreshold(Plugin.infoConfidence.Value)) && listening) { PlayRandomLine(weatherCondition, 2); } }); } } internal static void RegisterAdvancedScannerCommands() { if (!Plugin.registerAdvancedScanner.Value) { return; } string[] phrases = CreatePhrases(Plugin.activateAdvancedScannerCommands); Speech.RegisterPhrases(phrases); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases, (double)GetThreshold(Plugin.miscConfidence.Value)) && listening) { if (advancedScannerActive) { PlayLine("ScannerAlreadyActive"); } else { Plugin.LogToConsole("Activating advanced scanner", "debug"); advancedScannerActive = true; if (Plugin.vocalLevel.Value >= VocalLevels.Low) { PlayRandomLine("AdvancedScannerEnabled", Random.Range(1, 4)); } } } }); string[] phrases2 = CreatePhrases(Plugin.deactivateAdvancedScannerCommands); Speech.RegisterPhrases(phrases2); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases2, (double)GetThreshold(Plugin.miscConfidence.Value)) && listening) { if (!advancedScannerActive) { PlayLine("ScannerAlreadyInactive"); } else { Plugin.LogToConsole("Deactivating advanced scanner", "debug"); advancedScannerActive = false; ((TMP_Text)HUDManagerPatch.entities.GetComponent()).SetText("", true); ((TMP_Text)HUDManagerPatch.items.GetComponent()).SetText("", true); if (Plugin.vocalLevel.Value >= VocalLevels.Low) { PlayRandomLine("AdvancedScannerDisabled", Random.Range(1, 4)); } } } }); } internal static void RegisterTimeOfDayCommands() { if (!Plugin.registerTime.Value) { return; } string[] phrases = CreatePhrases(Plugin.timeCommands); Speech.RegisterPhrases(phrases); Speech.RegisterCustomHandler((EventHandler)delegate { if (Speech.IsAboveThreshold(phrases, (double)GetThreshold(Plugin.infoConfidence.Value)) && listening) { GetDayMode(); } }); } internal static void RegisterReportCommands() { if (Plugin.registerCrewStatus.Value) { string[] phrases = CreatePhrases(Plugin.crewStatusCommands); Speech.RegisterPhrases(phrases); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases, (double)GetThreshold(Plugin.crewStatusConfidence.Value)) && listening) { CoroutineManager.StartCoroutine(GetCrewStatus()); } }); } if (Plugin.registerCrewInShip.Value) { string[] phrases2 = CreatePhrases(Plugin.crewInShipCommands); Speech.RegisterPhrases(phrases2); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases2, (double)GetThreshold(Plugin.crewInShipConfidence.Value)) && listening) { CoroutineManager.StartCoroutine(GetCrewInShip()); } }); } if (!Plugin.registerScrapLeft.Value) { return; } string[] phrases3 = CreatePhrases(Plugin.scrapLeftCommands); Speech.RegisterPhrases(phrases3); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases3, (double)GetThreshold(Plugin.scrapLeftConfidence.Value)) && listening) { CoroutineManager.StartCoroutine(GetScrapLeft(Speech.bestMatch)); } }); } internal static void RegisterTeleportCommands() { if (Plugin.registerTeleporter.Value) { string[] phrases = CreatePhrases(Plugin.teleporterCommands); Speech.RegisterPhrases(phrases); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases, (double)GetThreshold(Plugin.teleportConfidence.Value)) && listening) { CoroutineManager.StartCoroutine(ActivateTeleporter()); } }); } if (!Plugin.registerRadarSwitch.Value) { return; } string[] phrases2 = CreatePhrases(Plugin.radarSwitchCommands); Speech.RegisterPhrases(phrases2); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases2, (double)GetThreshold(Plugin.teleportConfidence.Value)) && listening) { SwitchRadar(); PlayRandomLine("RadarSwitch", Random.Range(1, 4)); } }); } internal static void RegisterDoorCommands() { if (Plugin.registerInteractSecureDoor.Value) { string[] phrases = CreatePhrases(Plugin.openSecureDoorCommands); Speech.RegisterPhrases(phrases); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases, (double)GetThreshold(Plugin.secureDoorsConfidence.Value)) && listening) { OpenSecureDoor(); } }); string[] phrases4 = CreatePhrases(Plugin.closeSecureDoorCommands); Speech.RegisterPhrases(phrases4); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases4, (double)GetThreshold(Plugin.secureDoorsConfidence.Value)) && listening) { CloseSecureDoor(); } }); } if (Plugin.registerInteractAllSecureDoors.Value) { string[] phrases2 = CreatePhrases(Plugin.openAllSecureDoorsCommands); Speech.RegisterPhrases(phrases2); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases2, (double)GetThreshold(Plugin.secureDoorsConfidence.Value)) && listening) { OpenAllDoors(); } }); string[] phrases5 = CreatePhrases(Plugin.closeAllSecureDoorsCommands); Speech.RegisterPhrases(phrases5); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases5, (double)GetThreshold(Plugin.secureDoorsConfidence.Value)) && listening) { CloseAllDoors(); } }); } if (!Plugin.registerInteractShipDoors.Value) { return; } string[] phrases3 = CreatePhrases(Plugin.openShipDoorsCommands); Speech.RegisterPhrases(phrases3); Speech.RegisterCustomHandler((EventHandler)delegate { //IL_00be: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases3, (double)GetThreshold(Plugin.shipConfidence.Value)) && listening) { HangarShipDoor val2 = Object.FindObjectOfType(); if ((Object)(object)val2 != (Object)null) { if (!val2.shipDoorsAnimator.GetBool("Closed")) { PlayLine("ShipDoorsAlreadyOpen"); } else { InteractTrigger component2 = ((Component)((Component)val2).transform.Find("HangarDoorButtonPanel/StartButton/Cube (2)")).GetComponent(); component2.Interact(((Component)StartOfRound.Instance.localPlayerController).transform); if (!val2.shipDoorsAnimator.GetBool("Closed") && Plugin.vocalLevel.Value >= VocalLevels.Low) { PlayLine("ShipDoorsOpened", 0.7f); } } } } }); string[] phrases6 = CreatePhrases(Plugin.closeShipDoorsCommands); Speech.RegisterPhrases(phrases6); Speech.RegisterCustomHandler((EventHandler)delegate { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases6, (double)GetThreshold(Plugin.shipConfidence.Value)) && listening) { HangarShipDoor val = Object.FindObjectOfType(); if ((Object)(object)val != (Object)null) { if (val.shipDoorsAnimator.GetBool("Closed")) { PlayLine("ShipDoorsAlreadyClosed"); } else { InteractTrigger component = ((Component)((Component)val).transform.Find("HangarDoorButtonPanel/StopButton/Cube (3)")).GetComponent(); component.Interact(((Component)StartOfRound.Instance.localPlayerController).transform); if (val.shipDoorsAnimator.GetBool("Closed") && Plugin.vocalLevel.Value >= VocalLevels.Low) { PlayLine("ShipDoorsClosed", 0.7f); } } } } }); } internal static void RegisterSignalTranslatorCommands() { if (!Plugin.registerSignalTranslator.Value) { return; } string[] array = signals; foreach (string signal in array) { string[] phrases = CreatePhrases(Plugin.transmitCommands); string[] array2 = phrases; foreach (string text in array2) { string text2 = text + " " + signal; phrases[Array.IndexOf(phrases, text)] = text2; } Speech.RegisterPhrases(phrases); Speech.RegisterCustomHandler((EventHandler)delegate { if (Speech.IsAboveThreshold(phrases, (double)GetThreshold(Plugin.signalsConfidence.Value)) && listening && !((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead) { SignalTranslator val = Object.FindObjectOfType(); if ((Object)(object)val == (Object)null) { if (Plugin.vocalLevel.Value >= VocalLevels.Medium) { PlayLine("NoSignalTranslator"); } PlayLine("NoSignalTranslatorLow"); } else { HUDManager.Instance.UseSignalTranslatorServerRpc(signal); if (Plugin.sendSignalTranslatorChatMessage.Value) { SendChatMessage("is transmitting a signal"); } } } }); } } internal static void RegisterRadarBoosterCommands() { if (!Plugin.registerRadarBoosters.Value) { return; } string[] phrases = CreatePhrases(Plugin.radarPingCommands); Speech.RegisterPhrases(phrases); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases, (double)GetThreshold(Plugin.miscConfidence.Value)) && listening) { InteractWithBooster(ping: true); } }); string[] phrases2 = CreatePhrases(Plugin.radarFlashCommands); Speech.RegisterPhrases(phrases2); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases2, (double)GetThreshold(Plugin.miscConfidence.Value)) && listening) { InteractWithBooster(ping: false); } }); } internal static void RegisterHazardsCommands() { if (Plugin.registerDisableTurret.Value) { string[] phrases = CreatePhrases(Plugin.disableTurretCommands); Speech.RegisterPhrases(phrases); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases, (double)GetThreshold(Plugin.turretsConfidence.Value)) && listening) { turretDisabled = false; noVisibleTurret = false; noTurrets = false; DisableTurret(); PlayTurretAudio(); } }); } if (Plugin.registerDisableAllTurrets.Value) { string[] phrases2 = CreatePhrases(Plugin.disableAllTurretsCommands); Speech.RegisterPhrases(phrases2); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases2, (double)GetThreshold(Plugin.turretsConfidence.Value)) && listening) { turretsExist = false; DisableAllTurrets(); } }); } if (Plugin.registerDisableMine.Value) { string[] phrases3 = CreatePhrases(Plugin.disableMineCommands); Speech.RegisterPhrases(phrases3); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases3, (double)GetThreshold(Plugin.landminesConfidence.Value)) && listening) { DisableMine(); } }); } if (Plugin.registerDisableAllMines.Value) { string[] phrases4 = CreatePhrases(Plugin.disableAllMinesCommands); Speech.RegisterPhrases(phrases4); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases4, (double)GetThreshold(Plugin.landminesConfidence.Value)) && listening) { DisableAllMines(); } }); } if (Plugin.registerDisableSpikeTrap.Value) { string[] phrases5 = CreatePhrases(Plugin.disableSpikeTrapCommands); Speech.RegisterPhrases(phrases5); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases5, (double)GetThreshold(Plugin.trapsConfidence.Value)) && listening) { DisableSpikeTrap(); } }); } if (!Plugin.registerDisableAllSpikeTraps.Value) { return; } string[] phrases6 = CreatePhrases(Plugin.disableAllSpikeTrapsCommands); Speech.RegisterPhrases(phrases6); Speech.RegisterCustomHandler((EventHandler)delegate { if (!((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) && !StartOfRound.Instance.localPlayerController.isPlayerDead && Speech.IsAboveThreshold(phrases6, (double)GetThreshold(Plugin.trapsConfidence.Value)) && listening) { DisableAllSpikeTraps(); } }); } internal static void RegisterMoonsInfo() { if (!Plugin.registerMoonsInfo.Value) { return; } string[] array = moonNames; foreach (string name in array) { string[] phrases = CreatePhrases(Plugin.moonsInfoCommands); string[] array2 = phrases; foreach (string text in array2) { string text2 = text + " " + name; phrases[Array.IndexOf(phrases, text)] = text2; } Speech.RegisterPhrases(phrases); Speech.RegisterCustomHandler((EventHandler)delegate { if (Speech.IsAboveThreshold(phrases, (double)GetThreshold(Plugin.infoConfidence.Value)) && listening) { PlayLine(GetMoonAudioClipName(name)); } }); } } internal static void RegisterEntityInfo() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) if (!Plugin.registerCreatureInfo.Value) { return; } string[] array = LanguageHelper.VanillaEntityNames[Plugin.commandLanguage.Value]; foreach (string name in array) { string[] phrases = CreatePhrases(Plugin.creatureInfoCommands); string[] array2 = phrases; foreach (string text in array2) { string text2 = text + " " + name; phrases[Array.IndexOf(phrases, text)] = text2; } Speech.RegisterPhrases(phrases); Speech.RegisterCustomHandler((EventHandler)delegate { //IL_008d: Unknown result type (might be due to invalid IL or missing references) if (Speech.IsAboveThreshold(phrases, (double)GetThreshold(Plugin.infoConfidence.Value)) && listening) { if (TerminalPatch.scannedEnemyIDs.Contains(enemies.First>((KeyValuePair key) => key.Value == LanguageHelper.GetEntityAudioClipName(name, Plugin.commandLanguage.Value)).Key)) { PlayLine(LanguageHelper.GetEntityAudioClipName(name, Plugin.commandLanguage.Value) + "Short"); } else { PlayRandomLine("NoEntityData", Random.Range(2, 5)); } } }); } } private static float GetThreshold(float threshold) { return (threshold <= 0f) ? Plugin.globalConfidence.Value : threshold; } private static string[] CreatePhrases(ConfigEntry entry, bool oppositeOrder = false) { string[] array = entry.Value.Split("/", StringSplitOptions.RemoveEmptyEntries); if (string.IsNullOrEmpty(Plugin.name.Value)) { return array; } string[] array2 = array; foreach (string text in array2) { string text2 = (oppositeOrder ? (text + " " + Plugin.name.Value) : (Plugin.name.Value + " " + text)); array[Array.IndexOf(array, text)] = text2; Plugin.LogToConsole("Created command with name: " + text2, "debug"); } return array; } } } namespace LC_VEGA.Patches { internal class ApparatusPatch { [HarmonyPatch(typeof(LungProp), "EquipItem")] [HarmonyPrefix] private static void PlayApparatusPulledLine(LungProp __instance) { if (!Plugin.giveApparatusWarnings.Value || !__instance.isLungDocked) { return; } VEGA.facilityHasPower = false; try { if (StartOfRound.Instance.localPlayerController.ItemSlots.All((GrabbableObject item) => ((object)item).GetType() != typeof(LungProp))) { VEGA.PlayRandomLine("RadiationSpike", Random.Range(1, 3), 7.5f); } else { VEGA.PlayRandomLine("ApparatusPulled", Random.Range(1, 4), 7.5f); } } catch (Exception) { VEGA.PlayRandomLine("RadiationSpike", Random.Range(1, 3), 7.5f); } } } internal class GeneralPatches { internal static bool rainyWeatherWarned; internal static bool stormyWeatherWarned; internal static bool foggyWeatherWarned; internal static bool floodedWeatherWarned; internal static bool eclipsedWeatherWarned; internal static bool roundStart; [HarmonyPatch(typeof(GameNetworkManager), "Disconnect")] [HarmonyPostfix] private static void SaveValues() { Plugin.LogToConsole("Saving...", "debug"); SaveManager.SaveToFile(); } [HarmonyPatch(typeof(RoundManager), "Update")] [HarmonyPostfix] private static void AdvancedScanner() { if (VEGA.advancedScannerActive) { VEGA.PerformAdvancedScan(); } } [HarmonyPatch(typeof(RoundManager), "TurnOnAllLights")] [HarmonyPostfix] private static void AllLights(bool on) { Plugin.LogToConsole("POWER -> " + on, "debug"); VEGA.facilityHasPower = on; } [HarmonyPatch(typeof(ShipTeleporter), "Update")] [HarmonyPostfix] private static void GetTeleporterCooldownTime(ShipTeleporter __instance, ref float ___cooldownTime) { if (!__instance.isInverseTeleporter) { VEGA.teleporterCooldownTime = ___cooldownTime; } } [HarmonyPatch(typeof(PlayerControllerB), "KillPlayerClientRpc")] [HarmonyPostfix] private static void DisableVEGAOnDeath() { VEGA.audioSource.Stop(); VEGA.sfxAudioSource.Stop(); } [HarmonyPatch(typeof(RoundManager), "FinishGeneratingLevel")] [HarmonyPostfix] private static void GiveWeatherInfo() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected I4, but got Unknown if (HUDManager.Instance.localPlayerXP > 150 || !Plugin.giveWeatherInfo.Value) { return; } float delay = 8f; LevelWeatherType currentLevelWeather = TimeOfDay.Instance.currentLevelWeather; LevelWeatherType val = currentLevelWeather; switch (val - 1) { case 0: if (!rainyWeatherWarned) { VEGA.PlayRandomLine("Rainy", 1, delay); rainyWeatherWarned = true; } break; case 1: if (!stormyWeatherWarned) { VEGA.PlayRandomLine("Stormy", 1, delay); stormyWeatherWarned = true; } break; case 2: if (!foggyWeatherWarned) { VEGA.PlayRandomLine("Foggy", 1, delay); foggyWeatherWarned = true; } break; case 3: if (!floodedWeatherWarned) { VEGA.PlayRandomLine("Flooded", 1, delay); floodedWeatherWarned = true; } break; case 4: if (!eclipsedWeatherWarned) { VEGA.PlayRandomLine("Eclipsed", 1, delay); eclipsedWeatherWarned = true; } break; } } } internal class ReadInputPatch { [HarmonyPatch(typeof(RoundManager), "Update")] [HarmonyPostfix] public static void ReadInput() { if (!StartOfRound.Instance.localPlayerController.inTerminalMenu && !StartOfRound.Instance.localPlayerController.isTypingChat && ((!((Object)VEGA.sfxAudioSource.clip).name.Equals("Activate") && !((Object)VEGA.sfxAudioSource.clip).name.Equals("Deactivate")) || !VEGA.sfxAudioSource.isPlaying) && Plugin.registerActivation.Value && Plugin.useManualListening.Value && Plugin.PlayerInputInstance.Activation.triggered) { if (!VEGA.listening) { VEGA.PlaySFX("Activate"); } else { VEGA.PlaySFX("Deactivate"); } VEGA.listening = !VEGA.listening; Plugin.LogToConsole("Is VEGA listening -> " + VEGA.listening, "debug"); } } } [HarmonyPatch(typeof(HUDManager))] internal class HUDManagerPatch { public static GameObject? entities; public static GameObject? items; private static bool localPlayerScanned; private static int timesExecuted; public static void UpdateScannerPosAndScale() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)entities == (Object)null || (Object)(object)items == (Object)null) { return; } GameObject val = GameObject.Find("Systems/UI/Canvas/IngamePlayerHUD/TopLeftCorner"); if (!((Object)(object)val == (Object)null)) { Plugin.LogToConsole($"{Plugin.scale.Value}", "debug"); Vector3 val2 = val.transform.localScale * Plugin.scale.Value; if (ModChecker.hasEladsHUD) { val2 = GameObject.Find("PlayerInfo(Clone)").transform.localScale * Plugin.scale.Value; } float num = ((!ModChecker.hasEladsHUD) ? Plugin.horizontalPosition.Value : (Plugin.horizontalPosition.Value - 12f)); float num2 = ((!ModChecker.hasEladsHUD) ? Plugin.verticalPosition.Value : (Plugin.verticalPosition.Value - 40f)); float num3 = num2 + Plugin.verticalGap.Value * val2.y; entities.GetComponent().anchoredPosition = new Vector2(num, 0f - num2); entities.transform.localScale = (ModChecker.hasEladsHUD ? (val2 * 1.15f) : val2); items.GetComponent().anchoredPosition = new Vector2(num + Plugin.horizontalGap.Value, 0f - num3); items.transform.localScale = (ModChecker.hasEladsHUD ? (val2 * 1.15f) : val2); Plugin.LogToConsole("Position and scale values of the Advanced Scanner updated", "debug"); } } [HarmonyPatch("AttemptScanNewCreature")] [HarmonyPrefix] private static void PlayNewEnemyLine(int enemyID, ref Terminal ___terminalScript) { Plugin.LogToConsole($"Enemy ID: {enemyID}", "debug"); if (!___terminalScript.scannedEnemyIDs.Contains(enemyID)) { if (Plugin.vocalLevel.Value >= VocalLevels.High && VEGA.enemies.ContainsKey(enemyID) && enemyID != 20) { VEGA.PlayLine(VEGA.enemies[enemyID] + "Scan", 0.7f); } localPlayerScanned = true; } if (((NetworkBehaviour)StartOfRound.Instance.localPlayerController).IsHost) { timesExecuted = 0; } } [HarmonyPatch("ScanNewCreatureClientRpc")] [HarmonyPrefix] private static void PlayNewEnemyID(int enemyID, ref Terminal ___terminalScript) { if (timesExecuted > 0 && ((NetworkBehaviour)StartOfRound.Instance.localPlayerController).IsHost) { timesExecuted = 0; return; } Plugin.LogToConsole($"Did the local player scan? -> {localPlayerScanned}", "debug"); if (Plugin.remoteEntityID.Value && !localPlayerScanned && VEGA.enemies.ContainsKey(enemyID)) { VEGA.PlayLine(VEGA.enemies[enemyID] + "ID", 0.7f); } localPlayerScanned = false; if (((NetworkBehaviour)StartOfRound.Instance.localPlayerController).IsHost) { timesExecuted++; } } } [HarmonyPatch(typeof(StartOfRound))] internal class StartOfRoundPatch { [HarmonyPatch("Start")] [HarmonyPostfix] private static void Start(StartOfRound __instance) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown Plugin.LogToConsole("Creating the VEGA audio sources"); GameObject val = new GameObject("VEGA"); VEGA.audioSource = val.AddComponent(); if ((Object)(object)VEGA.audioSource != (Object)null) { Plugin.LogToConsole("VEGA audio source created successfully"); VEGA.audioSource.volume = Plugin.volume.Value; VEGA.audioSource.ignoreListenerVolume = Plugin.ignoreMasterVolume.Value; VEGA.audioSource.playOnAwake = false; VEGA.audioSource.bypassEffects = true; VEGA.audioSource.bypassListenerEffects = true; VEGA.audioSource.bypassReverbZones = true; } else { Plugin.LogToConsole("Unable to create VEGA audio source", "error"); } GameObject val2 = new GameObject("VEGA-SFXs"); VEGA.sfxAudioSource = val2.AddComponent(); if ((Object)(object)VEGA.sfxAudioSource != (Object)null) { Plugin.LogToConsole("VEGA-SFXs audio source created successfully"); VEGA.sfxAudioSource.volume = Plugin.volume.Value; VEGA.sfxAudioSource.ignoreListenerVolume = Plugin.ignoreMasterVolume.Value; VEGA.sfxAudioSource.playOnAwake = false; VEGA.sfxAudioSource.bypassEffects = true; VEGA.sfxAudioSource.bypassListenerEffects = true; VEGA.sfxAudioSource.bypassReverbZones = true; VEGA.sfxAudioSource.clip = VEGA.audioClips.Find((AudioClip clip) => ((Object)clip).name == "Deactivate"); } else { Plugin.LogToConsole("Unable to create VEGA SFXs audio source", "error"); } if (Plugin.useManualListening.Value && VEGA.listening) { VEGA.PlaySFX("Activate", 3.5f, checkPlayerStatus: false); } if (Plugin.playIntro.Value && !SaveManager.playedIntro && Plugin.vocalLevel.Value >= VocalLevels.Low) { VEGA.PlayLine("Intro", 5.5f, checkPlayerStatus: false); SaveManager.playedIntro = true; } VEGA.creditsChar = ((TMP_Text)HUDManager.Instance.totalValueText).text.ToCharArray()[0]; InstantiateAdvancedScannerItems(); } internal static GameObject? ConfigureScannerObjs(HUDManager hudManager, GameObject parent, Vector2 pos, TextAlignmentOptions alignment, float yPos = -25f, string defaultText = "") { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)parent == (Object)null) { Plugin.LogToConsole("Parent object not found", "error"); return null; } GameObject val = new GameObject("VEGAScannerTextObject"); val.transform.SetParent(parent.transform, false); TextMeshProUGUI val2 = val.AddComponent(); TextMeshProUGUI weightCounter = hudManager.weightCounter; ((TMP_Text)val2).font = ((TMP_Text)weightCounter).font; ((TMP_Text)val2).fontSize = ((TMP_Text)weightCounter).fontSize; ((Graphic)val2).color = Color.white; ((TMP_Text)val2).alignment = (TextAlignmentOptions)513; ((TMP_Text)val2).enableAutoSizing = ((TMP_Text)weightCounter).enableAutoSizing; ((TMP_Text)val2).fontSizeMin = ((TMP_Text)weightCounter).fontSizeMin; ((TMP_Text)val2).fontSizeMax = ((TMP_Text)weightCounter).fontSizeMax; if ((Object)(object)((TMP_Text)weightCounter).fontMaterial != (Object)null) { ((TMP_Text)val2).fontSharedMaterial = new Material(((TMP_Text)weightCounter).fontMaterial); } if ((Object)(object)((TMP_Text)weightCounter).transform.parent != (Object)null) { RectTransform component = ((Component)((TMP_Text)weightCounter).transform.parent).GetComponent(); if ((Object)(object)component != (Object)null) { RectTransform component2 = ((Component)val2).GetComponent(); ((Transform)component2).localRotation = Quaternion.Euler(((Transform)component).localRotation.x, yPos, ((Transform)component).localRotation.z); } } RectTransform component3 = val.GetComponent(); component3.anchorMin = new Vector2(0f, 1f); component3.anchorMax = new Vector2(0f, 1f); component3.pivot = new Vector2(0f, 1f); component3.anchoredPosition = pos; ((TMP_Text)val2).SetText(defaultText, true); ((TMP_Text)val2).alignment = alignment; return val; } internal static void InstantiateAdvancedScannerItems() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) HUDManager instance = HUDManager.Instance; GameObject val = GameObject.Find("Systems/UI/Canvas/IngamePlayerHUD/TopLeftCorner"); float value = Plugin.scale.Value; Vector3 val2 = val.transform.localScale * value; float num = Plugin.horizontalPosition.Value; float num2 = Plugin.verticalPosition.Value; float num3 = Plugin.entitiesTilt.Value; float num4 = Plugin.itemsTilt.Value; if (ModChecker.hasEladsHUD) { val2 = GameObject.Find("PlayerInfo(Clone)").transform.localScale * value; val = ((Component)GameObject.Find("CinematicGraphics").transform.parent).gameObject; num = Plugin.horizontalPosition.Value - 12f; num3 = Plugin.entitiesTilt.Value - 17f; num4 = Plugin.itemsTilt.Value - 17f; num2 = Plugin.verticalPosition.Value - 40f; } float num5 = num2 + Plugin.verticalGap.Value * val2.y; HUDManagerPatch.entities = ConfigureScannerObjs(instance, val, new Vector2(num, 0f - num2), Plugin.entitiesAlignment.Value, 0f - num3); HUDManagerPatch.entities.transform.localScale = (ModChecker.hasEladsHUD ? (val2 * 1.15f) : val2); HUDManagerPatch.items = ConfigureScannerObjs(instance, val, new Vector2(num + Plugin.horizontalGap.Value, 0f - num5), Plugin.itemsAlignment.Value, 0f - num4); HUDManagerPatch.items.transform.localScale = (ModChecker.hasEladsHUD ? (val2 * 1.15f) : val2); float num6 = (ModChecker.hasEladsHUD ? (Plugin.entitiesTextLength.Value + 100f) : Plugin.entitiesTextLength.Value); HUDManagerPatch.entities.GetComponent().sizeDelta = new Vector2(num6, HUDManagerPatch.entities.GetComponent().sizeDelta.y); float num7 = (ModChecker.hasEladsHUD ? (Plugin.itemsTextLength.Value + 100f) : Plugin.itemsTextLength.Value); HUDManagerPatch.items.GetComponent().sizeDelta = new Vector2(num7, HUDManagerPatch.items.GetComponent().sizeDelta.y); VEGA.entitiesTextComponent = HUDManagerPatch.entities.GetComponent(); VEGA.itemsTextComponent = HUDManagerPatch.items.GetComponent(); } } [HarmonyPatch(typeof(Terminal))] internal class TerminalPatch { public static List scannedEnemyIDs; [HarmonyPatch("Start")] [HarmonyPostfix] private static void GetLists(ref List ___scannedEnemyIDs) { scannedEnemyIDs = ___scannedEnemyIDs; } } [HarmonyPatch(typeof(TimeOfDay))] internal class TimeOfDayPatch { [HarmonyPatch("MoveTimeOfDay")] [HarmonyPostfix] private static void Give8pmWarning(ref int ___hour) { if (Plugin.vocalLevel.Value < VocalLevels.Low) { return; } if (___hour == 14 || ___hour == 15) { if (VEGA.warningGiven) { return; } if (GameNetworkManager.Instance.localPlayerController.isInsideFactory) { if (!VEGA.audioSource.isPlaying) { VEGA.warningGiven = true; } VEGA.PlayRandomLine("GettingLate", Random.Range(1, 4)); } else { VEGA.warningGiven = true; } } else { VEGA.warningGiven = false; } } [HarmonyPatch("SetShipLeaveEarlyClientRpc")] [HarmonyPostfix] private static void GiveVoteWarning() { if (Plugin.vocalLevel.Value >= VocalLevels.Low && !StartOfRound.Instance.localPlayerController.isInHangarShipRoom) { VEGA.PlayLine("VoteCast"); } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }