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 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+492b7f578f0b56c7ee59e093c14280402cbdcbef")]
[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<CoroutineManagerBehaviour>();
}
return _instance;
}
}
public static Coroutine StartCoroutine(IEnumerator routine)
{
return instance.StartCoroutine(routine);
}
}
public enum VocalLevels
{
None,
Low,
Medium,
High
}
public enum DisplayModes
{
Default,
Compact,
OneLine,
CompactOneLine
}
public enum Layouts
{
Custom,
TopLeft,
TopRight,
TopCentered,
AboveHotbar,
BottomCentered
}
public enum Colors
{
Custom,
Red,
LightRed,
DarkRed,
OperaRed,
Blood,
Crimson,
Blue,
LightBlue,
DarkBlue,
LunxaraBlue,
Cyan,
SuachiTeal,
Green,
LightGreen,
DarkGreen,
LyraGreen,
Lime,
Yellow,
LightYellow,
DarkYellow,
Gold,
Orange,
LightOrange,
DarkOrange,
PapayaOrange,
Pink,
LightPink,
DarkPink,
LunxaraPink,
Purple,
LightPurple,
DarkPurple,
LunxaraPurple,
Magenta,
White,
Gray,
LightGray,
DarkGray,
Black
}
public class LanguageHelper
{
internal static readonly Dictionary<Languages, Dictionary<string, string>> Commands = new Dictionary<Languages, Dictionary<string, string>>
{
[(Languages)0] = new Dictionary<string, string>
{
["startListening"] = "activate",
["stopListening"] = "deactivate",
["moonInfo"] = "info about",
["bestiaryEntries"] = "read",
["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<string, string>
{
["startListening"] = "activate",
["stopListening"] = "desactivate",
["moonInfo"] = "info sobre/informacion sobre",
["bestiaryEntries"] = "lee la entrada llamada/leeme la entrada llamada/lee el registro llamado/leeme el registro llamado",
["creatureInfo"] = "info sobre los/informacion sobre los",
["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<Languages, string[]> Weathers = new Dictionary<Languages, string[]>
{
[(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<Languages, string> Messages = new Dictionary<Languages, string>
{
[(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 class ModChecker
{
public static bool hasEladsHUD;
public static bool CheckForMod(string modGUID)
{
Dictionary<string, PluginInfo> pluginInfos = Chainloader.PluginInfos;
foreach (PluginInfo value in pluginInfos.Values)
{
if (value.Metadata.GUID.Equals(modGUID))
{
Plugin.LogToConsole("Found mod: " + value.Metadata.Name);
return true;
}
}
return false;
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static void RegisterPlugin(string modGUID, string modVersion)
{
PluginHelper.RegisterPlugin(modGUID, Version.Parse(modVersion), (CompatibilityLevel)0, (VersionStrictness)0);
}
}
internal class PlayerInput : LcInputActions
{
[InputAction(/*Could not decode attribute arguments.*/)]
public InputAction Activation { get; set; }
}
[BepInPlugin("JS03.LC-VEGA", "LC-VEGA", "4.1.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.*/)]
public class Plugin : BaseUnityPlugin
{
private const string modGUID = "JS03.LC-VEGA";
private const string modName = "LC-VEGA";
private const string modVersion = "4.1.0";
internal static AssetBundle assetBundle;
internal static PlayerInput PlayerInputInstance;
public static ConfigEntry<float> globalConfidence;
public static ConfigEntry<float> gratitudeConfidence;
public static ConfigEntry<float> stopConfidence;
public static ConfigEntry<float> infoConfidence;
public static ConfigEntry<float> manualActivationConfidence;
public static ConfigEntry<float> secureDoorsConfidence;
public static ConfigEntry<float> turretsConfidence;
public static ConfigEntry<float> landminesConfidence;
public static ConfigEntry<float> trapsConfidence;
public static ConfigEntry<float> signalsConfidence;
public static ConfigEntry<float> teleportConfidence;
public static ConfigEntry<float> shipConfidence;
public static ConfigEntry<float> miscConfidence;
public static ConfigEntry<float> upgradesConfidence;
public static ConfigEntry<float> crewStatusConfidence;
public static ConfigEntry<float> crewInShipConfidence;
public static ConfigEntry<float> scrapLeftConfidence;
public static ConfigEntry<Languages> language;
public static ConfigEntry<VocalLevels> vocalLevel;
public static ConfigEntry<bool> playIntro;
public static ConfigEntry<bool> readBestiaryEntries;
public static ConfigEntry<bool> remoteEntityID;
public static ConfigEntry<bool> giveWeatherInfo;
public static ConfigEntry<bool> giveApparatusWarnings;
public static ConfigEntry<string> messages;
public static ConfigEntry<bool> malfunctionWarnings;
public static ConfigEntry<bool> diversitySpeaker;
public static ConfigEntry<int> diversitySpeakerReplyChance;
public static ConfigEntry<bool> meltdownTimer;
public static ConfigEntry<string> playerNameColors;
public static ConfigEntry<bool> sendRadarSwitchChatMessage;
public static ConfigEntry<bool> sendSignalTranslatorChatMessage;
public static ConfigEntry<bool> sendTeleporterChatMessage;
public static ConfigEntry<bool> sendDiscombobulatorChatMessage;
public static ConfigEntry<float> volume;
public static ConfigEntry<bool> ignoreMasterVolume;
public static ConfigEntry<DisplayModes> infoDisplayMode;
public static ConfigEntry<float> scannerRange;
public static ConfigEntry<bool> enableAdvancedScannerAuto;
public static ConfigEntry<bool> detectMasked;
public static ConfigEntry<float> scale;
public static ConfigEntry<float> horizontalPosition;
public static ConfigEntry<float> verticalPosition;
public static ConfigEntry<float> horizontalGap;
public static ConfigEntry<float> verticalGap;
public static ConfigEntry<float> entitiesTextLength;
public static ConfigEntry<float> itemsTextLength;
public static ConfigEntry<float> entitiesTilt;
public static ConfigEntry<float> itemsTilt;
public static ConfigEntry<TextAlignmentOptions> entitiesAlignment;
public static ConfigEntry<TextAlignmentOptions> itemsAlignment;
public static ConfigEntry<Colors> clearTextColor;
public static ConfigEntry<Colors> entitiesNearbyTextColor;
public static ConfigEntry<Colors> itemsNearbyTextColor;
public static ConfigEntry<Colors> dataUnavailableTextColor;
public static ConfigEntry<string> customColorCodes;
public static ConfigEntry<bool> useManualListening;
public static ConfigEntry<bool> enableManualListeningAuto;
public static ConfigEntry<bool> patchReadInput;
public static ConfigEntry<string> name;
public static ConfigEntry<bool> enhancedTeleportCommands;
public static ConfigEntry<bool> enhancedHazardDisabling;
public static ConfigEntry<bool> registerActivation;
public static ConfigEntry<string> startListeningCommands;
public static ConfigEntry<string> stopListeningCommands;
public static ConfigEntry<bool> registerMoonsInfo;
public static ConfigEntry<string> moonsInfoCommands;
public static ConfigEntry<bool> registerBestiaryEntries;
public static ConfigEntry<string> bestiaryEntriesCommands;
public static ConfigEntry<bool> registerCreatureInfo;
public static ConfigEntry<string> creatureInfoCommands;
public static ConfigEntry<bool> registerAdvancedScanner;
public static ConfigEntry<string> activateAdvancedScannerCommands;
public static ConfigEntry<string> deactivateAdvancedScannerCommands;
public static ConfigEntry<bool> registerInteractSecureDoor;
public static ConfigEntry<string> openSecureDoorCommands;
public static ConfigEntry<string> closeSecureDoorCommands;
public static ConfigEntry<bool> registerInteractAllSecureDoors;
public static ConfigEntry<string> openAllSecureDoorsCommands;
public static ConfigEntry<string> closeAllSecureDoorsCommands;
public static ConfigEntry<bool> registerDisableTurret;
public static ConfigEntry<string> disableTurretCommands;
public static ConfigEntry<bool> registerDisableAllTurrets;
public static ConfigEntry<string> disableAllTurretsCommands;
public static ConfigEntry<bool> registerDisableMine;
public static ConfigEntry<string> disableMineCommands;
public static ConfigEntry<bool> registerDisableAllMines;
public static ConfigEntry<string> disableAllMinesCommands;
public static ConfigEntry<bool> registerDisableSpikeTrap;
public static ConfigEntry<string> disableSpikeTrapCommands;
public static ConfigEntry<bool> registerDisableAllSpikeTraps;
public static ConfigEntry<string> disableAllSpikeTrapsCommands;
public static ConfigEntry<bool> registerTeleporter;
public static ConfigEntry<string> teleporterCommands;
public static ConfigEntry<bool> registerRadarSwitch;
public static ConfigEntry<string> radarSwitchCommands;
public static ConfigEntry<bool> registerDiscombobulator;
public static ConfigEntry<string> discombobulatorCommands;
public static ConfigEntry<bool> registerCrewStatus;
public static ConfigEntry<string> crewStatusCommands;
public static ConfigEntry<bool> registerCrewInShip;
public static ConfigEntry<string> crewInShipCommands;
public static ConfigEntry<bool> registerScrapLeft;
public static ConfigEntry<string> scrapLeftCommands;
public static ConfigEntry<bool> registerRadarBoosters;
public static ConfigEntry<string> radarPingCommands;
public static ConfigEntry<string> radarFlashCommands;
public static ConfigEntry<bool> registerSignalTranslator;
public static ConfigEntry<string> transmitCommands;
public static ConfigEntry<bool> registerTime;
public static ConfigEntry<string> timeCommands;
public static ConfigEntry<bool> registerInteractShipDoors;
public static ConfigEntry<string> openShipDoorsCommands;
public static ConfigEntry<string> closeShipDoorsCommands;
public static ConfigEntry<bool> registerInteractShipLights;
public static ConfigEntry<string> lightsOnCommands;
public static ConfigEntry<string> lightsOffCommands;
public static ConfigEntry<bool> registerInteractShipMagnet;
public static ConfigEntry<string> magnetOnCommands;
public static ConfigEntry<string> magnetOffCommands;
public static ConfigEntry<bool> registerInteractShipShutters;
public static ConfigEntry<string> openShuttersCommands;
public static ConfigEntry<string> closeShuttersCommands;
public static ConfigEntry<bool> registerWeatherInfo;
public static ConfigEntry<string> weatherInfoCommands;
public static ConfigEntry<bool> registerStop;
public static ConfigEntry<string> stopCommands;
public static ConfigEntry<bool> registerThanks;
public static ConfigEntry<string> gratitudeCommands;
private readonly Harmony harmony = new Harmony("JS03.LC-VEGA");
public static Plugin Instance;
internal static ManualLogSource mls;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
mls = Logger.CreateLogSource("JS03.LC-VEGA");
mls.LogInfo((object)"The installation of VEGA has begun");
PlayerInputInstance = new PlayerInput();
LoadAssets();
GenerateConfigValues();
CheckInstalledMods();
ManageSaveValues();
VEGA.Initialize();
PatchStuff();
}
internal void LoadAssets()
{
mls.LogInfo((object)"Loading assets");
VEGA.audioClips = new List<AudioClip>();
string location = ((BaseUnityPlugin)Instance).Info.Location;
location = location.TrimEnd("LC-VEGA.dll".ToCharArray());
assetBundle = AssetBundle.LoadFromFile(location + "lcvegavoicelines");
if ((Object)(object)assetBundle != (Object)null)
{
VEGA.audioClips = assetBundle.LoadAllAssets<AudioClip>().ToList();
mls.LogInfo((object)"Assets loaded successfully");
}
else
{
mls.LogWarning((object)"Unable to load assets");
}
}
internal void PatchStuff()
{
mls.LogInfo((object)"Patching things");
harmony.PatchAll(typeof(Plugin));
harmony.PatchAll(typeof(StartOfRoundPatch));
harmony.PatchAll(typeof(TerminalPatch));
harmony.PatchAll(typeof(TimeOfDayPatch));
harmony.PatchAll(typeof(HUDManagerPatch));
harmony.PatchAll(typeof(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", "4.1.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_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_0159: Unknown result type (might be due to invalid IL or missing references)
//IL_0163: Expected O, but got Unknown
//IL_0196: Unknown result type (might be due to invalid IL or missing references)
//IL_01a0: Expected O, but got Unknown
//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
//IL_01dd: Expected O, but got Unknown
//IL_0210: Unknown result type (might be due to invalid IL or missing references)
//IL_021a: Expected O, but got Unknown
//IL_024d: Unknown result type (might be due to invalid IL or missing references)
//IL_0257: Expected O, but got Unknown
//IL_028a: Unknown result type (might be due to invalid IL or missing references)
//IL_0294: Expected O, but got Unknown
//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
//IL_02d1: Expected O, but got Unknown
//IL_0304: Unknown result type (might be due to invalid IL or missing references)
//IL_030e: Expected O, but got Unknown
//IL_0341: Unknown result type (might be due to invalid IL or missing references)
//IL_034b: Expected O, but got Unknown
//IL_037e: Unknown result type (might be due to invalid IL or missing references)
//IL_0388: Expected O, but got Unknown
//IL_03bb: Unknown result type (might be due to invalid IL or missing references)
//IL_03c5: Expected O, but got Unknown
//IL_03f8: Unknown result type (might be due to invalid IL or missing references)
//IL_0402: Expected O, but got Unknown
//IL_0435: Unknown result type (might be due to invalid IL or missing references)
//IL_043f: Expected O, but got Unknown
//IL_0472: Unknown result type (might be due to invalid IL or missing references)
//IL_047c: Expected O, but got Unknown
//IL_04af: Unknown result type (might be due to invalid IL or missing references)
//IL_04b9: Expected O, but got Unknown
//IL_04ec: Unknown result type (might be due to invalid IL or missing references)
//IL_04f6: Expected O, but got Unknown
//IL_0529: Unknown result type (might be due to invalid IL or missing references)
//IL_0533: Expected O, but got Unknown
//IL_0644: Unknown result type (might be due to invalid IL or missing references)
//IL_064e: Expected O, but got Unknown
//IL_0d6f: Unknown result type (might be due to invalid IL or missing references)
//IL_0dac: Unknown result type (might be due to invalid IL or missing references)
//IL_0e09: Unknown result type (might be due to invalid IL or missing references)
//IL_0e66: Unknown result type (might be due to invalid IL or missing references)
//IL_0ec3: Unknown result type (might be due to invalid IL or missing references)
//IL_0f20: Unknown result type (might be due to invalid IL or missing references)
//IL_0f5d: Unknown result type (might be due to invalid IL or missing references)
//IL_0fba: Unknown result type (might be due to invalid IL or missing references)
//IL_0ff7: Unknown result type (might be due to invalid IL or missing references)
//IL_1054: Unknown result type (might be due to invalid IL or missing references)
//IL_1091: Unknown result type (might be due to invalid IL or missing references)
//IL_10ee: Unknown result type (might be due to invalid IL or missing references)
//IL_114b: Unknown result type (might be due to invalid IL or missing references)
//IL_11a8: Unknown result type (might be due to invalid IL or missing references)
//IL_1205: Unknown result type (might be due to invalid IL or missing references)
//IL_1262: Unknown result type (might be due to invalid IL or missing references)
//IL_12bf: Unknown result type (might be due to invalid IL or missing references)
//IL_131c: Unknown result type (might be due to invalid IL or missing references)
//IL_1379: Unknown result type (might be due to invalid IL or missing references)
//IL_13d6: Unknown result type (might be due to invalid IL or missing references)
//IL_1433: Unknown result type (might be due to invalid IL or missing references)
//IL_1490: Unknown result type (might be due to invalid IL or missing references)
//IL_14ed: Unknown result type (might be due to invalid IL or missing references)
//IL_152a: Unknown result type (might be due to invalid IL or missing references)
//IL_1587: Unknown result type (might be due to invalid IL or missing references)
//IL_15e4: Unknown result type (might be due to invalid IL or missing references)
//IL_1641: Unknown result type (might be due to invalid IL or missing references)
//IL_167e: Unknown result type (might be due to invalid IL or missing references)
//IL_16db: Unknown result type (might be due to invalid IL or missing references)
//IL_1718: Unknown result type (might be due to invalid IL or missing references)
//IL_1775: Unknown result type (might be due to invalid IL or missing references)
//IL_17b2: Unknown result type (might be due to invalid IL or missing references)
//IL_180f: Unknown result type (might be due to invalid IL or missing references)
//IL_186c: Unknown result type (might be due to invalid IL or missing references)
//IL_18c9: Unknown result type (might be due to invalid IL or missing references)
language = ((BaseUnityPlugin)this).Config.Bind<Languages>("Dialogue & Interactions", "Language", (Languages)0, "As of now, this only changes the voice commands to the language you choose, it does not change any of the voice lines.\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.");
language.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 = language.Value;
UpdateVoiceCommands();
messages.Value = LanguageHelper.Messages[language.Value];
};
vocalLevel = ((BaseUnityPlugin)this).Config.Bind<VocalLevels>("Dialogue & Interactions", "Vocal Level", VocalLevels.High, "Changes how often VEGA speaks and the length of his answers. Interactions that have their own toggle will not be affected by this.\nHigh: The default value. Will speak on every interaction. Recommended for inexperienced players.\nMedium: Gives you useful info, doesn't speak on every interaction. Recommended for experienced players.\nLow: Speaks as often as the Medium option, but gives you shorter answers. Recommended for players who already have experience with VEGA.\nNone: Will only speak when asked to.");
playIntro = ((BaseUnityPlugin)this).Config.Bind<bool>("Dialogue & Interactions", "Play intro", true, "If set to true, VEGA will give you its introduction speech the first time you use the mod.");
readBestiaryEntries = ((BaseUnityPlugin)this).Config.Bind<bool>("Dialogue & Interactions", "Read Bestiary entries", true, "If set to true, VEGA will read every bestiary entry you open in the terminal.");
remoteEntityID = ((BaseUnityPlugin)this).Config.Bind<bool>("Dialogue & Interactions", "Remote Entity Identification", true, "If set to true, VEGA will give you the name of every new entity your crew scans.");
giveApparatusWarnings = ((BaseUnityPlugin)this).Config.Bind<bool>("Dialogue & Interactions", "Give Apparatus warnings", true, "If set to true, VEGA will give you brief and informative warnings when the Apparatus is pulled.");
giveWeatherInfo = ((BaseUnityPlugin)this).Config.Bind<bool>("Dialogue & Interactions", "Give weather info", true, "If set to true, VEGA will give you information on a moon's current weather upon landing if you have little to no experience.");
messages = ((BaseUnityPlugin)this).Config.Bind<string>("Dialogue & Interactions", "Signal Translator messages", LanguageHelper.Messages[language.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.");
globalConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
gratitudeConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
stopConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
secureDoorsConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
turretsConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
landminesConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
trapsConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
signalsConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
teleportConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
shipConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
miscConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
crewStatusConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
crewInShipConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
scrapLeftConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
infoConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
manualActivationConfidence = ((BaseUnityPlugin)this).Config.Bind<float>("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<float>(0f, 1f), Array.Empty<object>()));
volume = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Settings", "Volume", 1f, new ConfigDescription("Changes how loud VEGA is.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
volume.SettingChanged += delegate
{
if ((Object)(object)VEGA.audioSource != (Object)null)
{
VEGA.audioSource.volume = volume.Value;
}
if ((Object)(object)VEGA.sfxAudioSource != (Object)null)
{
VEGA.sfxAudioSource.volume = volume.Value;
}
};
ignoreMasterVolume = ((BaseUnityPlugin)this).Config.Bind<bool>("Sound Settings", "Ignore Master Volume setting", false, "If set to true, VEGA will ignore the game's master volume setting and always play at the same volume level.\nThis setting only applies before joining a game.");
ignoreMasterVolume.SettingChanged += delegate
{
if ((Object)(object)VEGA.audioSource != (Object)null)
{
VEGA.audioSource.ignoreListenerVolume = ignoreMasterVolume.Value;
}
if ((Object)(object)VEGA.sfxAudioSource != (Object)null)
{
VEGA.sfxAudioSource.ignoreListenerVolume = ignoreMasterVolume.Value;
}
};
useManualListening = ((BaseUnityPlugin)this).Config.Bind<bool>("Manual Listening", "Enabled", false, "Manual Listening determines if VEGA should only be able to hear you when you ask him to.");
enableManualListeningAuto = ((BaseUnityPlugin)this).Config.Bind<bool>("Manual Listening", "Enable VEGA listening automatically", false, "Makes VEGA listen automatically when joining a game. Only works if Manual Listening is set to true.");
enableManualListeningAuto.SettingChanged += delegate
{
if (!VEGA.listening)
{
VEGA.PlaySFX("Activate");
}
else
{
VEGA.PlaySFX("Deactivate");
}
VEGA.listening = enableManualListeningAuto.Value;
};
scannerRange = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Range", 29f, new ConfigDescription("Changes how far the Advanced Scanner can reach (in meters).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 29f), Array.Empty<object>()));
scannerRange.SettingChanged += delegate
{
VEGA.scannerRange = scannerRange.Value;
};
enableAdvancedScannerAuto = ((BaseUnityPlugin)this).Config.Bind<bool>("Advanced Scanner", "Enable the Advanced Scanner automatically", false, "Enables VEGA's Advanced Scanner automatically when joining a game. Useful if you always want to have it on and don't want to repeat the voice command often.");
enableAdvancedScannerAuto.SettingChanged += delegate
{
VEGA.advancedScannerActive = enableAdvancedScannerAuto.Value;
if (!VEGA.advancedScannerActive)
{
if ((Object)(object)HUDManagerPatch.entities != (Object)null)
{
((TMP_Text)HUDManagerPatch.entities.GetComponent<TextMeshProUGUI>()).SetText("", true);
}
if ((Object)(object)HUDManagerPatch.items != (Object)null)
{
((TMP_Text)HUDManagerPatch.items.GetComponent<TextMeshProUGUI>()).SetText("", true);
}
}
};
detectMasked = ((BaseUnityPlugin)this).Config.Bind<bool>("Advanced Scanner", "Detect Masked employees", false, "Determines if the Advanced Scanner should be able to count Masked employees as entities.");
infoDisplayMode = ((BaseUnityPlugin)this).Config.Bind<DisplayModes>("Advanced Scanner", "Info display mode", DisplayModes.Default, "Changes how the Advanced Scanner displays information.");
infoDisplayMode.SettingChanged += delegate
{
VEGA.UpdateScannerDisplayMode();
};
scale = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Scale", 1f, "The size of the Advanced Scanner on the screen.");
scale.SettingChanged += delegate
{
HUDManagerPatch.UpdateScannerPosAndScale();
};
horizontalPosition = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Horizontal position", 45f, "The horizontal position of the Advanced Scanner on the screen.");
horizontalPosition.SettingChanged += delegate
{
HUDManagerPatch.UpdateScannerPosAndScale();
};
verticalPosition = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Vertical position", 180f, "The vertical position of the Advanced Scanner on the screen.");
verticalPosition.SettingChanged += delegate
{
HUDManagerPatch.UpdateScannerPosAndScale();
};
horizontalGap = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Horizontal gap", 0f, "The horizontal gap between the nearby Entities and Items on the screen.");
horizontalGap.SettingChanged += delegate
{
HUDManagerPatch.UpdateScannerPosAndScale();
};
verticalGap = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Vertical gap", 50f, "The vertical gap between the nearby Entities and Items on the screen.");
verticalGap.SettingChanged += delegate
{
HUDManagerPatch.UpdateScannerPosAndScale();
};
entitiesTextLength = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Entities text length", 200f, "Determines how much text fits in a single line in the Entities section of the scanner.");
entitiesTextLength.SettingChanged += delegate
{
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
float num4 = (ModChecker.hasEladsHUD ? (entitiesTextLength.Value + 100f) : entitiesTextLength.Value);
if ((Object)(object)HUDManagerPatch.entities != (Object)null)
{
HUDManagerPatch.entities.GetComponent<RectTransform>().sizeDelta = new Vector2(num4, HUDManagerPatch.entities.GetComponent<RectTransform>().sizeDelta.y);
}
};
itemsTextLength = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Items text length", 200f, "Determines how much text fits in a single line in the Items section of the scanner.");
itemsTextLength.SettingChanged += delegate
{
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
float num3 = (ModChecker.hasEladsHUD ? (itemsTextLength.Value + 100f) : itemsTextLength.Value);
if ((Object)(object)HUDManagerPatch.items != (Object)null)
{
HUDManagerPatch.items.GetComponent<RectTransform>().sizeDelta = new Vector2(num3, HUDManagerPatch.items.GetComponent<RectTransform>().sizeDelta.y);
}
};
entitiesAlignment = ((BaseUnityPlugin)this).Config.Bind<TextAlignmentOptions>("Advanced Scanner", "Entities text alignment", (TextAlignmentOptions)513, "The alignment of the Entities section of the scanner.");
entitiesAlignment.SettingChanged += delegate
{
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)VEGA.entitiesTextComponent != (Object)null)
{
((TMP_Text)VEGA.entitiesTextComponent).alignment = entitiesAlignment.Value;
}
};
itemsAlignment = ((BaseUnityPlugin)this).Config.Bind<TextAlignmentOptions>("Advanced Scanner", "Items text alignment", (TextAlignmentOptions)513, "The alignment of the Advanced Scanner on the screen.");
itemsAlignment.SettingChanged += delegate
{
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)VEGA.itemsTextComponent != (Object)null)
{
((TMP_Text)VEGA.itemsTextComponent).alignment = itemsAlignment.Value;
}
};
entitiesTilt = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Entities tilt", 22f, "The inclination of the Entities component on the screen.");
entitiesTilt.SettingChanged += delegate
{
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)VEGA.entitiesTextComponent != (Object)null)
{
RectTransform component2 = ((Component)VEGA.entitiesTextComponent).GetComponent<RectTransform>();
float num2 = (ModChecker.hasEladsHUD ? (entitiesTilt.Value - 17f) : entitiesTilt.Value);
((Transform)component2).localRotation = Quaternion.Euler(((Transform)component2).localRotation.x, 0f - num2, ((Transform)component2).localRotation.z);
}
};
itemsTilt = ((BaseUnityPlugin)this).Config.Bind<float>("Advanced Scanner", "Items tilt", 22f, "The inclination of the Items component on the screen.");
itemsTilt.SettingChanged += delegate
{
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)VEGA.itemsTextComponent != (Object)null)
{
RectTransform component = ((Component)VEGA.itemsTextComponent).GetComponent<RectTransform>();
float num = (ModChecker.hasEladsHUD ? (itemsTilt.Value - 17f) : itemsTilt.Value);
((Transform)component).localRotation = Quaternion.Euler(((Transform)component).localRotation.x, 0f - num, ((Transform)component).localRotation.z);
}
};
clearTextColor = ((BaseUnityPlugin)this).Config.Bind<Colors>("Advanced Scanner", "Clear color", Colors.Blue, "Changes the color of the text under both sections of the scanner when no entities or items are within its range.");
clearTextColor.SettingChanged += delegate
{
VEGA.UpdateScannerColors();
};
entitiesNearbyTextColor = ((BaseUnityPlugin)this).Config.Bind<Colors>("Advanced Scanner", "Entities nearby color", Colors.Red, "Changes the color of the text under the Entities section of the scanner when entities are within the scanner's range.");
entitiesNearbyTextColor.SettingChanged += delegate
{
VEGA.UpdateScannerColors();
};
itemsNearbyTextColor = ((BaseUnityPlugin)this).Config.Bind<Colors>("Advanced Scanner", "Items nearby color", Colors.Green, "Changes the color of the text under the Items section of the scanner when items are within the scanner's range.");
itemsNearbyTextColor.SettingChanged += delegate
{
VEGA.UpdateScannerColors();
};
dataUnavailableTextColor = ((BaseUnityPlugin)this).Config.Bind<Colors>("Advanced Scanner", "Data unavailable color", Colors.Yellow, "Changes the color of the text under both sections of the scanner when a Communications or Power malfunction happen.");
dataUnavailableTextColor.SettingChanged += delegate
{
VEGA.UpdateScannerColors();
};
customColorCodes = ((BaseUnityPlugin)this).Config.Bind<string>("Advanced Scanner", "Custom color codes", "#0000ff, #ff0000, #008000, #ffff00", "Allows you to introduce your own custom color codes for the Clear, Entities, Items and Data unavailable color options.\nMake sure you separate the different values with a comma and a blank space.");
customColorCodes.SettingChanged += delegate
{
VEGA.UpdateScannerColors();
};
playerNameColors = ((BaseUnityPlugin)this).Config.Bind<string>("Text Chat", "Player name colors", "", "Allows you to change the color of people's usernames in VEGA's chat messages using hex codes. The format is:\n'username: hex code, otherusername: hex code'");
playerNameColors.SettingChanged += delegate
{
VEGA.RestoreNameColors();
VEGA.AddNameColors();
};
sendRadarSwitchChatMessage = ((BaseUnityPlugin)this).Config.Bind<bool>("Text Chat", "Send Radar Switch chat message", true, "If set to true, VEGA will send a message in the text chat that lets everyone know you used the Radar Switch command.");
sendSignalTranslatorChatMessage = ((BaseUnityPlugin)this).Config.Bind<bool>("Text Chat", "Send Signal Translator chat message", true, "If set to true, VEGA will send a message in the text chat that lets everyone know you used VEGA to transmit a signal.");
sendTeleporterChatMessage = ((BaseUnityPlugin)this).Config.Bind<bool>("Text Chat", "Send Teleporter chat message", true, "If set to true, VEGA will send a message in the text chat that lets everyone know you asked VEGA to activate the teleporter.");
patchReadInput = ((BaseUnityPlugin)this).Config.Bind<bool>("Patches", "Patch ReadInput", true, "Enables / disables the code that checks for player input and allows you to make VEGA listen / stop listening by pressing a key.");
name = ((BaseUnityPlugin)this).Config.Bind<string>("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.");
enhancedTeleportCommands = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Enhanced Teleport commands", true, "Makes VEGA perform the radar switch before activating the teleporter.");
enhancedHazardDisabling = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Enhanced Hazard Disabling commands", true, "Makes VEGA disable all visible turrets / landmines / spike traps when using their respective commands.");
registerActivation = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Manual Listening commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
startListeningCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Start listening commands", LanguageHelper.Commands[language.Value]["startListening"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
stopListeningCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Stop listening commands", LanguageHelper.Commands[language.Value]["stopListening"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerMoonsInfo = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Moon info commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
moonsInfoCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Moon info commands", LanguageHelper.Commands[language.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!");
registerBestiaryEntries = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Bestiary entries commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
bestiaryEntriesCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Bestiary entries commands", LanguageHelper.Commands[language.Value]["bestiaryEntries"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.\nIMPORTANT: Bestiary entries commands will always end with the name of the creature + entry, like so:\nVEGA, read Bracken entry");
registerCreatureInfo = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Creature info commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
creatureInfoCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Creature info commands", LanguageHelper.Commands[language.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!");
registerAdvancedScanner = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Advanced Scanner commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
activateAdvancedScannerCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Activate Advanced Scanner commands", LanguageHelper.Commands[language.Value]["activateScanner"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
deactivateAdvancedScannerCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Deactivate Advanced Scanner commands", LanguageHelper.Commands[language.Value]["deactivateScanner"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerInteractSecureDoor = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Open / Close Secure Door commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
openSecureDoorCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Open secure door commands", LanguageHelper.Commands[language.Value]["openDoor"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
closeSecureDoorCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Close secure door commands", LanguageHelper.Commands[language.Value]["closeDoor"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerInteractAllSecureDoors = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Open / Close All Secure Doors command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
openAllSecureDoorsCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Open all secure door commands", LanguageHelper.Commands[language.Value]["openAllDoors"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
closeAllSecureDoorsCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Close all secure door commands", LanguageHelper.Commands[language.Value]["closeAllDoors"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerDisableTurret = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Disable Turret command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
disableTurretCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Disable turret commands", LanguageHelper.Commands[language.Value]["disableTurret"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerDisableAllTurrets = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Disable All Turrets command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
disableAllTurretsCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Disable all turrets commands", LanguageHelper.Commands[language.Value]["disableAllTurrets"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerDisableMine = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Disable Mine command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
disableMineCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Disable landmine commands", LanguageHelper.Commands[language.Value]["disableMine"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerDisableAllMines = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Disable All Mines command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
disableAllMinesCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Disable all landmines commands", LanguageHelper.Commands[language.Value]["disableAllMines"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerDisableSpikeTrap = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Disable Spike Trap command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
disableSpikeTrapCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Disable spike trap commands", LanguageHelper.Commands[language.Value]["disableTrap"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerDisableAllSpikeTraps = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Disable All Spike Traps command", true, "Disable this if you don't want this voice command to be registered. Will apply after restarting the game.");
disableAllSpikeTrapsCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Disable all spike traps commands", LanguageHelper.Commands[language.Value]["disableAllTraps"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerTeleporter = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Teleporter commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
teleporterCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Teleporter commands", LanguageHelper.Commands[language.Value]["teleporter"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerRadarSwitch = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Radar Switch commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
radarSwitchCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Radar Switch commands", LanguageHelper.Commands[language.Value]["mapSwitch"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerCrewStatus = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Crew Status commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
crewStatusCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Crew Status commands", LanguageHelper.Commands[language.Value]["crewStatus"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerCrewInShip = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Crew in ship commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
crewInShipCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Crew in ship commands", LanguageHelper.Commands[language.Value]["shipCrew"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerScrapLeft = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Scrap / items left commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
scrapLeftCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Scrap / items left commands", LanguageHelper.Commands[language.Value]["scrap"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerRadarBoosters = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Radar Booster commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
radarPingCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Radar Booster ping commands", LanguageHelper.Commands[language.Value]["radarBooster"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
radarFlashCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Radar Booster flash commands", LanguageHelper.Commands[language.Value]["radarFlash"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerSignalTranslator = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Signal Translator commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
transmitCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Transmit / send commands", LanguageHelper.Commands[language.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!");
registerTime = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Current time of day commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
timeCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Current time commands", LanguageHelper.Commands[language.Value]["time"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerInteractShipDoors = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Ship Door commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
openShipDoorsCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Open ship doors commands", LanguageHelper.Commands[language.Value]["openShip"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
closeShipDoorsCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Close ship doors commands", LanguageHelper.Commands[language.Value]["closeShip"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerInteractShipLights = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Ship Lights commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
lightsOnCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Ship Lights on commands", LanguageHelper.Commands[language.Value]["lightsOn"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
lightsOffCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Ship Lights off commands", LanguageHelper.Commands[language.Value]["lightsOff"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerInteractShipMagnet = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Ship Magnet commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
magnetOnCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Activate Magnet commands", LanguageHelper.Commands[language.Value]["magnetOn"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
magnetOffCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Deactivate Magnet commands", LanguageHelper.Commands[language.Value]["magnetOff"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerWeatherInfo = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Weather info commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
weatherInfoCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Weather info commands", LanguageHelper.Commands[language.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!");
registerStop = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register Stop Talking commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
stopCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Stop talking commands", LanguageHelper.Commands[language.Value]["stopTalking"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
registerThanks = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice Commands", "Register gratitude commands", true, "Disable this if you don't want these voice commands to be registered. Will apply after restarting the game.");
gratitudeCommands = ((BaseUnityPlugin)this).Config.Bind<string>("Voice Commands", "Gratitude commands", LanguageHelper.Commands[language.Value]["gratitude"], "The voice commands that you want to get registered and picked up by VEGA. Make sure to separate different commands with a '/'.");
}
public static void LogToConsole(string message, string logType = "")
{
switch (logType.ToLower())
{
case "warn":
mls.LogWarning((object)message);
break;
case "error":
mls.LogError((object)message);
break;
case "debug":
mls.LogDebug((object)message);
break;
default:
mls.LogInfo((object)message);
break;
}
}
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)
//IL_0582: Unknown result type (might be due to invalid IL or missing references)
startListeningCommands.Value = LanguageHelper.Commands[language.Value]["startListening"];
stopListeningCommands.Value = LanguageHelper.Commands[language.Value]["stopListening"];
moonsInfoCommands.Value = LanguageHelper.Commands[language.Value]["moonInfo"];
bestiaryEntriesCommands.Value = LanguageHelper.Commands[language.Value]["bestiaryEntries"];
creatureInfoCommands.Value = LanguageHelper.Commands[language.Value]["creatureInfo"];
activateAdvancedScannerCommands.Value = LanguageHelper.Commands[language.Value]["activateScanner"];
deactivateAdvancedScannerCommands.Value = LanguageHelper.Commands[language.Value]["deactivateScanner"];
openSecureDoorCommands.Value = LanguageHelper.Commands[language.Value]["openDoor"];
closeSecureDoorCommands.Value = LanguageHelper.Commands[language.Value]["closeDoor"];
openAllSecureDoorsCommands.Value = LanguageHelper.Commands[language.Value]["openAllDoors"];
closeAllSecureDoorsCommands.Value = LanguageHelper.Commands[language.Value]["closeAllDoors"];
disableTurretCommands.Value = LanguageHelper.Commands[language.Value]["disableTurret"];
disableAllTurretsCommands.Value = LanguageHelper.Commands[language.Value]["disableAllTurrets"];
disableMineCommands.Value = LanguageHelper.Commands[language.Value]["disableMine"];
disableAllMinesCommands.Value = LanguageHelper.Commands[language.Value]["disableAllMines"];
disableSpikeTrapCommands.Value = LanguageHelper.Commands[language.Value]["disableTrap"];
disableAllSpikeTrapsCommands.Value = LanguageHelper.Commands[language.Value]["disableAllTraps"];
teleporterCommands.Value = LanguageHelper.Commands[language.Value]["teleporter"];
radarSwitchCommands.Value = LanguageHelper.Commands[language.Value]["mapSwitch"];
crewStatusCommands.Value = LanguageHelper.Commands[language.Value]["crewStatus"];
crewInShipCommands.Value = LanguageHelper.Commands[language.Value]["shipCrew"];
scrapLeftCommands.Value = LanguageHelper.Commands[language.Value]["scrap"];
radarPingCommands.Value = LanguageHelper.Commands[language.Value]["radarBooster"];
radarFlashCommands.Value = LanguageHelper.Commands[language.Value]["radarFlash"];
transmitCommands.Value = LanguageHelper.Commands[language.Value]["signalTranslator"];
timeCommands.Value = LanguageHelper.Commands[language.Value]["time"];
openShipDoorsCommands.Value = LanguageHelper.Commands[language.Value]["openShip"];
closeShipDoorsCommands.Value = LanguageHelper.Commands[language.Value]["closeShip"];
lightsOnCommands.Value = LanguageHelper.Commands[language.Value]["lightsOn"];
lightsOffCommands.Value = LanguageHelper.Commands[language.Value]["lightsOff"];
magnetOnCommands.Value = LanguageHelper.Commands[language.Value]["magnetOn"];
magnetOffCommands.Value = LanguageHelper.Commands[language.Value]["magnetOff"];
weatherInfoCommands.Value = LanguageHelper.Commands[language.Value]["weatherInfo"];
stopCommands.Value = LanguageHelper.Commands[language.Value]["stopTalking"];
gratitudeCommands.Value = LanguageHelper.Commands[language.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<bool> ReadFromFile()
{
List<bool> list = new List<bool>();
using (FileStream fileStream = new FileStream(Application.persistentDataPath + fileName, FileMode.Open, FileAccess.Read))
{
using BinaryReader binaryReader = new BinaryReader(fileStream);
while (fileStream.Position < fileStream.Length)
{
list.Add(binaryReader.ReadBoolean());
}
}
return list;
}
public static bool GetValueFromIndex(int index)
{
List<bool> list = ReadFromFile();
if (list.Count > index)
{
return list[index];
}
return false;
}
}
internal class VEGA
{
[CompilerGenerated]
private sealed class <ActivateTeleporter>d__63 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
private ShipTeleporter <teleporter>5__1;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <ActivateTeleporter>d__63(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<teleporter>5__1 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
//IL_00e1: Expected O, but got Unknown
int num = <>1__state;
if (num != 0)
{
if (num != 1)
{
return false;
}
<>1__state = -1;
}
else
{
<>1__state = -1;
if (!Object.op_Implicit((Object)(object)GameObject.Find("Teleporter(Clone)")))
{
PlayRandomLine("NoTeleporter", Random.Range(1, 4));
goto IL_0165;
}
<teleporter>5__1 = GameObject.Find("Teleporter(Clone)").GetComponent<ShipTeleporter>();
if (!(teleporterCooldownTime <= 0f))
{
PlayLine("TeleporterOnCooldown");
Plugin.LogToConsole("The teleporter is on cooldown!", "warn");
goto IL_0140;
}
if (Plugin.vocalLevel.Value >= VocalLevels.High)
{
PlayRandomLine("Teleport", Random.Range(1, 4));
}
if (Plugin.enhancedTeleportCommands.Value && (Object)(object)StartOfRound.Instance.mapScreen.targetedPlayer != (Object)(object)StartOfRound.Instance.localPlayerController)
{
SwitchRadar(checkMalfunctions: false, checkCurrentTarget: false);
<>2__current = (object)new WaitForSeconds(1f);
<>1__state = 1;
return true;
}
}
<teleporter>5__1.PressTeleportButtonServerRpc();
if (Plugin.sendTeleporterChatMessage.Value)
{
SendChatMessage("has activated the teleporter");
}
goto IL_0140;
IL_0165:
return false;
IL_0140:
<teleporter>5__1 = null;
goto IL_0165;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <GetCrewInShip>d__71 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public float delay;
private int <deadPlayers>5__1;
private List<string> <playersInShip>5__2;
private PlayerControllerB[] <>s__3;
private int <>s__4;
private PlayerControllerB <player>5__5;
private string <header>5__6;
private string <body>5__7;
private List<string>.Enumerator <>s__8;
private string <playerName>5__9;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <GetCrewInShip>d__71(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<playersInShip>5__2 = null;
<>s__3 = null;
<player>5__5 = null;
<header>5__6 = null;
<body>5__7 = null;
<>s__8 = default(List<string>.Enumerator);
<playerName>5__9 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_015a: Unknown result type (might be due to invalid IL or missing references)
//IL_0164: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<deadPlayers>5__1 = 0;
<playersInShip>5__2 = new List<string>();
<>s__3 = StartOfRound.Instance.allPlayerScripts;
for (<>s__4 = 0; <>s__4 < <>s__3.Length; <>s__4++)
{
<player>5__5 = <>s__3[<>s__4];
if (<player>5__5.isInHangarShipRoom)
{
<playersInShip>5__2.Add(<player>5__5.playerUsername);
}
if (<player>5__5.isPlayerDead)
{
<deadPlayers>5__1++;
}
<player>5__5 = null;
}
<>s__3 = null;
if (StartOfRound.Instance.livingPlayers == 1 && <deadPlayers>5__1 == 0)
{
if (<playersInShip>5__2.Count > 0)
{
PlayLine("CrewInShipSolo");
}
else
{
PlayLine("CrewOutsideShipSolo");
}
break;
}
PlayLine("GettingCrewInShip");
<>2__current = (object)new WaitForSeconds(delay);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<header>5__6 = "CREWMATES IN THE SHIP:";
<body>5__7 = "";
if (<playersInShip>5__2.Count == 0)
{
<body>5__7 = "No one is in the ship.";
}
else
{
<>s__8 = <playersInShip>5__2.GetEnumerator();
try
{
while (<>s__8.MoveNext())
{
<playerName>5__9 = <>s__8.Current;
if (<playersInShip>5__2.Last() == <playerName>5__9)
{
<body>5__7 += <playerName>5__9;
}
else
{
<body>5__7 = <body>5__7 + <playerName>5__9 + ", ";
}
<playerName>5__9 = null;
}
}
finally
{
((IDisposable)<>s__8).Dispose();
}
<>s__8 = default(List<string>.Enumerator);
}
if (Plugin.vocalLevel.Value >= VocalLevels.High)
{
PlayRandomLine("ReportComplete", Random.Range(2, 4));
}
HUDManager.Instance.DisplayTip(<header>5__6, "<size=15>" + <body>5__7 + "</size>", false, false, "LC_Tip1");
<header>5__6 = null;
<body>5__7 = null;
break;
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <GetCrewStatus>d__70 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public float delay;
private int <deadPlayers>5__1;
private PlayerControllerB[] <>s__2;
private int <>s__3;
private PlayerControllerB <player>5__4;
private string <header>5__5;
private string <livingPlayers>5__6;
private string <deceasedPlayers>5__7;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <GetCrewStatus>d__70(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>s__2 = null;
<player>5__4 = null;
<header>5__5 = null;
<livingPlayers>5__6 = null;
<deceasedPlayers>5__7 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0100: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<deadPlayers>5__1 = 0;
<>s__2 = StartOfRound.Instance.allPlayerScripts;
for (<>s__3 = 0; <>s__3 < <>s__2.Length; <>s__3++)
{
<player>5__4 = <>s__2[<>s__3];
if (<player>5__4.isPlayerDead)
{
<deadPlayers>5__1++;
}
<player>5__4 = null;
}
<>s__2 = null;
if (StartOfRound.Instance.livingPlayers == 1 && <deadPlayers>5__1 == 0)
{
PlayLine("CrewStatusSolo");
break;
}
PlayLine("GettingCrewStatus");
<>2__current = (object)new WaitForSeconds(delay);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<header>5__5 = "CREW STATUS REPORT:";
<livingPlayers>5__6 = StartOfRound.Instance.livingPlayers + " employees alive\n";
<deceasedPlayers>5__7 = <deadPlayers>5__1 + " deceased employees";
if (<deadPlayers>5__1 == 1)
{
<deceasedPlayers>5__7 = "1 deceased employee\n";
}
if (StartOfRound.Instance.livingPlayers == 1)
{
PlayLine("GoodLuck", 2.5f);
<livingPlayers>5__6 = "1 employee alive\n";
HUDManager.Instance.DisplayTip(<header>5__5, <livingPlayers>5__6 + <deceasedPlayers>5__7, true, false, "LC_Tip1");
}
else
{
if (Plugin.vocalLevel.Value >= VocalLevels.High)
{
PlayRandomLine("ReportComplete", Random.Range(1, 4));
}
HUDManager.Instance.DisplayTip(<header>5__5, <livingPlayers>5__6 + <deceasedPlayers>5__7, false, false, "LC_Tip1");
}
<header>5__5 = null;
<livingPlayers>5__6 = null;
<deceasedPlayers>5__7 = null;
break;
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <GetScrapLeft>d__72 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public string message;
public float delay;
private int <scrapLeft>5__1;
private int <scrapInShip>5__2;
private int <creditsLeft>5__3;
private int <creditsInShip>5__4;
private string <header>5__5;
private string <scrapOutsideStr>5__6;
private string <scrapInShipStr>5__7;
private GrabbableObject[] <items>5__8;
private GrabbableObject[] <>s__9;
private int <>s__10;
private GrabbableObject <item>5__11;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <GetScrapLeft>d__72(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<header>5__5 = null;
<scrapOutsideStr>5__6 = null;
<scrapInShipStr>5__7 = null;
<items>5__8 = null;
<>s__9 = null;
<item>5__11 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<scrapLeft>5__1 = 0;
<scrapInShip>5__2 = 0;
<creditsLeft>5__3 = 0;
<creditsInShip>5__4 = 0;
if (message.ToLower().Contains("item"))
{
PlayLine("PerformingItemScan");
}
PlayLine("PerformingScrapScan");
<>2__current = (object)new WaitForSeconds(delay);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<header>5__5 = "SCRAP SCAN RESULTS:";
<items>5__8 = Object.FindObjectsOfType<GrabbableObject>();
<>s__9 = <items>5__8;
for (<>s__10 = 0; <>s__10 < <>s__9.Length; <>s__10++)
{
<item>5__11 = <>s__9[<>s__10];
if (<item>5__11.itemProperties.isScrap && !<item>5__11.isHeld)
{
if (!<item>5__11.isInShipRoom)
{
<scrapLeft>5__1++;
<creditsLeft>5__3 += <item>5__11.scrapValue;
}
else
{
<scrapInShip>5__2++;
<creditsInShip>5__4 += <item>5__11.scrapValue;
}
}
<item>5__11 = null;
}
<>s__9 = null;
if (<scrapLeft>5__1 == 0)
{
<scrapOutsideStr>5__6 = "There are no items outside the ship.";
}
else if (<scrapLeft>5__1 > 1)
{
<scrapOutsideStr>5__6 = "There are " + <scrapLeft>5__1 + " items left, worth " + creditsChar + <creditsLeft>5__3;
}
else
{
<scrapOutsideStr>5__6 = "There is 1 item left, worth " + creditsChar + <creditsLeft>5__3;
}
if (<scrapInShip>5__2 == 0)
{
<scrapInShipStr>5__7 = "There are no items inside the ship.";
}
else if (<scrapInShip>5__2 > 1)
{
<scrapInShipStr>5__7 = "The ship currently has " + <scrapInShip>5__2 + " items, worth " + creditsChar + <creditsInShip>5__4;
}
else
{
<scrapInShipStr>5__7 = "The ship currently has 1 item, worth " + creditsChar + <creditsInShip>5__4;
}
if (Plugin.vocalLevel.Value >= VocalLevels.High)
{
PlayRandomLine("ScrapScanComplete", Random.Range(1, 4));
}
HUDManager.Instance.DisplayTip(<header>5__5, "<size=15>" + <scrapOutsideStr>5__6 + "\n" + <scrapInShipStr>5__7 + "</size>", false, false, "LC_Tip1");
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <SwitchLights>d__65 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public bool on;
private ShipLights <shipLights>5__1;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <SwitchLights>d__65(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<shipLights>5__1 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00d9: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<shipLights>5__1 = Object.FindObjectOfType<ShipLights>();
if (!((Object)(object)<shipLights>5__1 != (Object)null))
{
break;
}
if (on)
{
if (<shipLights>5__1.areLightsOn)
{
PlayLine("LightsAlreadyOn");
}
else
{
PlayLine("LightsOn");
}
}
else if (!<shipLights>5__1.areLightsOn)
{
PlayLine("LightsAlreadyOff");
}
else
{
PlayLine("LightsOff");
}
<>2__current = (object)new WaitForSeconds(2f);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<shipLights>5__1.SetShipLightsServerRpc(on);
break;
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
public static AudioSource audioSource;
public static AudioSource sfxAudioSource;
public static List<AudioClip> audioClips;
public static bool listening;
public static bool shouldBeInterrupted;
public static bool warningGiven;
public static bool facilityHasPower;
public static float teleporterCooldownTime;
public static TextMeshProUGUI entitiesTextComponent;
public static TextMeshProUGUI itemsTextComponent;
public static char creditsChar;
private static Dictionary<string, string> nameColorPairs = new Dictionary<string, string>
{
{ "JS0", "#b51b3e" },
{ "Dorimon Pls", "#ff0000" },
{ "Lunxara", "#6700bd" },
{ "Mina", "#a11010" },
{ "Sua", "#79e5cb" },
{ "Nico", "#ffffff" },
{ "xVenatoRx", "#ff8000" },
{ "Jowyck", "#00ffff" }
};
internal static string[] htmlColors = new string[40]
{
"", "<color=red>", "<color=#ff4d4d>", "<color=#b30000>", "<color=#b51b3e>", "<color=#a11010>", "<color=#dc143c>", "<color=blue>", "<color=#6666ff>", "<color=#0000b3>",
"<color=#0848ad>", "<color=#00ffff>", "<color=#79e5cb>", "<color=green>", "<color=#00cc00>", "<color=#004d00>", "<color=#02F296>", "<color=#00ff00>", "<color=yellow>", "<color=#ffff66>",
"<color=#cccc00>", "<color=#ffd700>", "<color=#ffa500>", "<color=#ffc966>", "<color=#cc8500>", "<color=#ff8000>", "<color=#ffc0cb>", "<color=#ffe6ea>", "<color=#ff8095>", "<color=#e20c96>",
"<color=#800080>", "<color=#b300b3>", "<color=#4d004d>", "<color=#6700BD>", "<color=#ff00ff>", "<color=#ffffff>", "<color=#808080>", "<color=#b3b3b3>", "<color=#4d4d4d>", "<color=#000000>"
};
public static bool advancedScannerActive;
internal static string enemiesTopText;
internal static string enemiesTextColor;
internal static string itemsTopText;
internal static string itemsTextColor;
internal static string clearTextColor;
internal static string dataUnavailableTextColor;
internal static float scannerRange;
private static string oneEntityText;
private static string entitiesText;
private static string oneItemText;
private static string itemsText;
internal static bool turretsExist;
internal static bool turretDisabled;
internal static bool noVisibleTurret;
internal static bool noTurrets;
internal static float distanceToTurret;
internal static bool malfunctionPowerTriggered;
internal static bool malfunctionTeleporterTriggered;
internal static bool malfunctionDistortionTriggered;
internal static bool malfunctionDoorTriggered;
public static string[] signals;
public static Dictionary<int, string> enemies = new Dictionary<int, string>
{
{ 0, "SnareFlea" },
{ 1, "Bracken" },
{ 2, "Thumper" },
{ 3, "EyelessDog" },
{ 4, "YippeeBug" },
{ 5, "Slime" },
{ 6, "ForestKeeper" },
{ 7, "Coil-Head" },
{ 9, "Sandworm" },
{ 10, "Jester" },
{ 11, "SporeLizard" },
{ 12, "BunkerSpider" },
{ 13, "Manticoil" },
{ 14, "RedBees" },
{ 15, "Locusts" },
{ 16, "BaboonHawk" },
{ 17, "Nutcracker" },
{ 18, "OldBird" },
{ 19, "Butler" },
{ 20, "Hornets" },
{ 21, "Snakes" },
{ 22, "VainShroud" },
{ 23, "KidnapperFox" },
{ 24, "Barber" },
{ 25, "Maneater" }
};
private static readonly string[] vanillaEntityNames = new string[55]
{
"Baboon Hawk", "Baboon", "Hawk", "Bunker Spider", "Spider", "Hoarding Bug", "Loot Bug", "Yippee Bug", "Barber", "Bracken",
"Butler", "Coil Head", "Coil", "Forest Keeper", "Giant", "Keeper", "Eyeless Dog", "Dog", "Earth Leviathan", "Leviathan",
"Worm", "Jester", "Roaming Locusts", "Locusts", "Manticoil", "Nutcracker", "Old Bird", "Bird", "Mech", "Circuit Bees",
"Red Bees", "Bees", "Hygrodere", "Slime", "Blob", "Tulip Snake", "Tulip", "Snake", "Snare Flea", "Flea",
"Centipede", "Spore Lizard", "Spore Doggy", "Lizard", "Thumper", "Crawler", "Halve", "Vain Shroud", "Vain", "Shroud",
"Kidnapper Fox", "Kidnapper", "Fox", "Maneater", "Baby"
};
private static readonly string[] moddedEntityNames = new string[22]
{
"Redwood Giant", "Redwood", "Driftwood Giant", "Driftwood", "Faceless Stalker", "Slenderman", "Slender", "Football", "Shy Guy", "SCP 096",
"Locker", "Siren Head", "Rolling Giant", "Peepers", "Peeper", "Shockwave Drone", "Cleaning Drone", "Moving Turret", "Mobile Turret", "The Lost",
"Maggie", "Shrimp"
};
private static readonly string[] moonNames = new string[15]
{
"Experimentation", "Vow", "Assurance", "Ass", "March", "Adamance", "Offense", "Rend", "Dine", "Titan",
"Tit", "Artifice", "Embrion", "Mars", "Liquidation"
};
internal static string GetEntityAudioClipName(string entityName)
{
switch (entityName)
{
case "Baboon Hawk":
case "Baboon":
case "Hawk":
return "BaboonHawk";
case "Bunker Spider":
case "Spider":
return "BunkerSpider";
case "Hoarding Bug":
case "Loot Bug":
case "Yippee Bug":
return "YippeeBug";
case "Coil Head":
case "Coil":
return "Coil-Head";
case "Forest Keeper":
case "Giant":
case "Keeper":
return "ForestKeeper";
case "Eyeless Dog":
case "Dog":
return "EyelessDog";
case "Earth Leviathan":
case "Leviathan":
case "Worm":
return "Sandworm";
case "Roaming Locusts":
return "Locusts";
case "Old Bird":
case "Bird":
case "Mech":
return "OldBird";
case "Circuit Bees":
case "Red Bees":
case "Bees":
return "RedBees";
case "Hygrodere":
case "Blob":
return "Slime";
case "Tulip Snake":
case "Tulip":
case "Snake":
return "Snakes";
case "Snare Flea":
case "Flea":
case "Centipede":
return "SnareFlea";
case "Spore Lizard":
case "Spore Doggy":
case "Lizard":
return "SporeLizard";
case "Crawler":
case "Halve":
return "Thumper";
case "Vain Shroud":
case "Vain":
case "Shroud":
return "VainShroud";
case "Kidnapper Fox":
case "Kidnapper":
case "Fox":
return "KidnapperFox";
case "Baby":
return "Maneater";
case "Redwood Giant":
case "Redwood":
return "RedWood Giant";
case "Driftwood Giant":
case "Driftwood":
return "DriftWood Giant";
case "Faceless Stalker":
case "Slenderman":
case "Slender":
return "Stalker";
case "Shy Guy":
case "SCP 096":
return "Shy guy";
case "Peeper":
return "Peepers";
case "Mobile Turret":
return "Moving Turret";
case "The Lost":
return "Maggie";
default:
return entityName;
}
}
internal static string GetMoonAudioClipName(string moonName)
{
switch (moonName)
{
case "Experimentation":
return "41-EXP";
case "Vow":
return "56-VOW";
case "Ass":
case "Assurance":
return "220-ASS";
case "March":
return "61-MAR";
case "Adamance":
return "20-ADA";
case "Offense":
return "21-OFF";
case "Rend":
return "85-REN";
case "Dine":
return "7-DIN";
case "Tit":
case "Titan":
return "8-TIT";
case "Artifice":
return "68-ART";
case "Embrion":
return "5-EMB";
case "Liquidation":
return "44-LIQ";
case "Mars":
return "4-MARS";
default:
return moonName;
}
}
public static void PlayLine(string clipName, float delay = 0.25f, bool checkPlayerStatus = true, bool skip = false)
{
if ((Object)(object)audioSource != (Object)null)
{
if ((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 >= Vocal