using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using BepInEx; using BepInEx.Configuration; using EntityStates.Croco; using Microsoft.CodeAnalysis; using RoR2; using RoR2.CharacterAI; using RoR2.Projectile; using UnityEngine; using UnityEngine.Networking; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("Silent55ModMenu")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Silent55ModMenu")] [assembly: AssemblyTitle("Silent55ModMenu")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 Silent55ModMenu { [BepInPlugin("com.silent55.modmenu", "Silent55 ModMenu", "4.5.4")] public sealed class Plugin : BaseUnityPlugin { private class MenuPreset { public bool god; public bool noCd; public bool maxHp; public bool lockOn; public bool projectiles; public bool rapid; public bool reload; public bool secondary; public bool special; public bool markers; public bool teleporter; public bool chests; public bool shrines; public bool drops; public bool shops; public bool converters; public bool drones; public bool misc; public bool portals; public bool guaranteed; public bool summons; public bool acridTargets; public bool acridRange; public float attack; public float move; public float damage; public float difficulty; public float tp; public float lockDistance; public float lockAngle; public float tracking; public float rapidInterval; public int jumps; } private class LoadoutEntry { public PickupIndex pickup; public int count; } public class RunControlRequest : MessageBase { public int action; public float value; public string requester; public string version; public override void Serialize(NetworkWriter w) { w.Write(action); w.Write(value); w.Write(requester ?? ""); w.Write(version ?? ""); } public override void Deserialize(NetworkReader r) { action = r.ReadInt32(); value = r.ReadSingle(); requester = r.ReadString(); version = r.ReadString(); } } public class RunControlResponse : MessageBase { public bool approved; public string message; public override void Serialize(NetworkWriter w) { w.Write(approved); w.Write(message ?? ""); } public override void Deserialize(NetworkReader r) { approved = r.ReadBoolean(); message = r.ReadString(); } } private bool visible = true; private bool practiceFreeze; private bool practiceDisableAI; private bool practiceFullPause; private bool showMarkerDistance = true; private bool godMode; private bool noCooldown; private bool empoweredSummons; private bool guaranteedShrineChance; private bool acridUnlimitedTargets; private bool acridUnlimitedRange; private bool rapidFire; private bool rapidFireReload = true; private bool rapidFireSecondary = true; private bool rapidFireSpecial; private bool lockOn; private bool projectileTracking = true; private bool markers; private bool showChests = true; private bool showTeleporter = true; private bool showShrines = true; private bool showDrops = true; private bool maxPersonal; private bool showShops = true; private bool showConverters = true; private bool showDrones = true; private bool showMisc = true; private bool showPortals = true; private float markerMaxDistance = 1000f; private float jumpHeightMultiplier = 1f; private float attackMultiplier = 1f; private float moveMultiplier = 1f; private float damageMultiplier = 1f; private float difficultyRate = 1f; private float teleporterRate = 1f; private float lockDistance = 60f; private float lockAngle = 35f; private float trackingStrength = 75f; private float rapidFireInterval = 0.08f; private string itemSearch = ""; private int spawnQuantity = 1; private int spawnPressureMode; private PickupIndex selectedPickup = PickupIndex.none; private int extraJumps; private string status = "Ready"; private float saveQuitConfirmUntil; private float cleanupConfirmUntil; private int tab; private string loadoutSearch = ""; private int loadoutQuantity = 1; private Vector2 loadoutScroll; private string presetName = "Custom Slot 1"; private int customPresetSlot = 1; private int presetLoadedSlot = -1; private float presetOverwriteConfirmUntil; private int selectedRecoveryPlayer; private Vector2 recoveryScroll; private int spawnerMode; private int selectedEnemyMaster; private int enemyQuantity = 1; private float enemySpawnDistance = 15f; private string enemySearch = ""; private Vector2 enemyScroll; private readonly List enemyMasterPrefabs = new List(); private readonly List silent55SpawnedMasters = new List(); private Rect window = new Rect(20f, 20f, 720f, 820f); private int centeredScreenW; private int centeredScreenH; private CharacterBody tracked; private HealthComponent trackedHealth; private float oldAttack; private float oldDamage; private float oldMove; private float oldHealth; private float oldRegen; private float oldJumpPower; private int originalDiseaseBounces; private float originalDiseaseBounceRange; private float originalDiseaseOrbRange; private bool diseaseDefaultsCaptured; private int oldJumps; private Vector3 savedPosition; private bool hasSavedPosition; private float nextScan; private float nextSpawnPressureApply; private float unlockConfirmUntil; private float nextPracticeUpdate; private float nextSafetyScan; private int cachedBodies; private int cachedProjectiles; private int cachedPickups; private bool lastPracticeFreeze; private bool lastPracticeDisableAI; private bool lastPracticeFullPause; private float nextPracticeCache; private readonly List practiceBodies = new List(); private readonly List practiceAIs = new List(); private PickupIndex lastGivenPickup = PickupIndex.none; private int lastGivenCount; private float nextPrimaryFire; private float nextSecondaryFire; private float nextSpecialFire; private readonly List chests = new List(); private readonly List shrines = new List(); private readonly List drops = new List(); private readonly List groundPickups = new List(); private readonly List interactables = new List(); private readonly List shops = new List(); private readonly List repairables = new List(); private GUIStyle titleStyle; private GUIStyle sectionStyle; private GUIStyle onStyle; private GUIStyle offStyle; private GUIStyle tabStyle; private GUIStyle tabOnStyle; private GUIStyle cyanButtonStyle; private GUIStyle dangerButtonStyle; private Texture2D silent55Logo; private const short RequestMessageId = 28550; private const short ResponseMessageId = 28551; private const string NetworkVersion = "4.5.4"; private NetworkClient registeredClient; private bool serverHandlerRegistered; private bool autoApproveRequests; private NetworkConnection pendingConnection; private RunControlRequest pendingRequest; private readonly HashSet hookedZones = new HashSet(); private Run trackedRun; private float lastRunTime; private float realSessionTime; private float nextDifficultyRecalc; private int trackedStageClearCount = -1; private readonly Dictionary> opLoadouts = new Dictionary>(); private readonly Dictionary> grantedLoadouts = new Dictionary>(); private string loadedLoadoutCharacter = ""; private readonly HashSet loadoutAppliedThisRun = new HashSet(); private Run appliedRun; private float nextSummonScan; private readonly HashSet empoweredMinions = new HashSet(); private HuntressTracker silentTracker; private CharacterBody trackerBody; private readonly HashSet trackedProjectiles = new HashSet(); private MenuPreset CapturePreset() { return new MenuPreset { god = godMode, noCd = noCooldown, maxHp = maxPersonal, lockOn = lockOn, projectiles = projectileTracking, rapid = rapidFire, reload = rapidFireReload, secondary = rapidFireSecondary, special = rapidFireSpecial, markers = markers, teleporter = showTeleporter, chests = showChests, shrines = showShrines, drops = showDrops, shops = showShops, converters = showConverters, drones = showDrones, misc = showMisc, portals = showPortals, guaranteed = guaranteedShrineChance, summons = empoweredSummons, acridTargets = acridUnlimitedTargets, acridRange = acridUnlimitedRange, attack = attackMultiplier, move = moveMultiplier, damage = damageMultiplier, difficulty = difficultyRate, tp = teleporterRate, lockDistance = lockDistance, lockAngle = lockAngle, tracking = trackingStrength, rapidInterval = rapidFireInterval, jumps = extraJumps }; } private void ApplyPreset(MenuPreset p, string name) { if (p != null) { godMode = p.god; noCooldown = p.noCd; maxPersonal = p.maxHp; lockOn = p.lockOn; projectileTracking = p.projectiles; rapidFire = p.rapid; rapidFireReload = p.reload; rapidFireSecondary = p.secondary; rapidFireSpecial = p.special; markers = p.markers; showTeleporter = p.teleporter; showChests = p.chests; showShrines = p.shrines; showDrops = p.drops; showShops = p.shops; showConverters = p.converters; showDrones = p.drones; showMisc = p.misc; showPortals = p.portals; guaranteedShrineChance = p.guaranteed; empoweredSummons = p.summons; acridUnlimitedTargets = p.acridTargets; acridUnlimitedRange = p.acridRange; attackMultiplier = p.attack; moveMultiplier = p.move; damageMultiplier = p.damage; difficultyRate = p.difficulty; teleporterRate = p.tp; lockDistance = p.lockDistance; lockAngle = p.lockAngle; trackingStrength = p.tracking; rapidFireInterval = p.rapidInterval; extraJumps = p.jumps; if (NetworkServer.active) { ApplyRunAction(1, difficultyRate); ApplyRunAction(2, teleporterRate); ApplyRunAction(6, guaranteedShrineChance ? 1f : 0f); } status = "Applied preset: " + name; } } private string SerializePreset(MenuPreset p) { return string.Join("|", new bool[23] { p.god, p.noCd, p.maxHp, p.lockOn, p.projectiles, p.rapid, p.reload, p.secondary, p.special, p.markers, p.teleporter, p.chests, p.shrines, p.drops, p.shops, p.converters, p.drones, p.misc, p.portals, p.guaranteed, p.summons, p.acridTargets, p.acridRange }.Select((bool x) => (!x) ? "0" : "1").Concat(new string[10] { p.attack.ToString(CultureInfo.InvariantCulture), p.move.ToString(CultureInfo.InvariantCulture), p.damage.ToString(CultureInfo.InvariantCulture), p.difficulty.ToString(CultureInfo.InvariantCulture), p.tp.ToString(CultureInfo.InvariantCulture), p.lockDistance.ToString(CultureInfo.InvariantCulture), p.lockAngle.ToString(CultureInfo.InvariantCulture), p.tracking.ToString(CultureInfo.InvariantCulture), p.rapidInterval.ToString(CultureInfo.InvariantCulture), p.jumps.ToString() }).ToArray()); } private MenuPreset DeserializePreset(string raw) { if (string.IsNullOrEmpty(raw)) { return null; } string[] a = raw.Split('|'); if (a.Length < 33) { return null; } int i = 0; Func func = () => a[i++] == "1"; Func func2 = () => float.Parse(a[i++], CultureInfo.InvariantCulture); return new MenuPreset { god = func(), noCd = func(), maxHp = func(), lockOn = func(), projectiles = func(), rapid = func(), reload = func(), secondary = func(), special = func(), markers = func(), teleporter = func(), chests = func(), shrines = func(), drops = func(), shops = func(), converters = func(), drones = func(), misc = func(), portals = func(), guaranteed = func(), summons = func(), acridTargets = func(), acridRange = func(), attack = func2(), move = func2(), damage = func2(), difficulty = func2(), tp = func2(), lockDistance = func2(), lockAngle = func2(), tracking = func2(), rapidInterval = func2(), jumps = int.Parse(a[i++]) }; } private bool CustomPresetExists(int slot) { return !string.IsNullOrWhiteSpace(((BaseUnityPlugin)this).Config.Bind("Presets", "Slot" + slot + "Data", "", (ConfigDescription)null).Value); } private void SaveCustomPreset(int slot) { string text = (string.IsNullOrWhiteSpace(presetName) ? ("Custom Slot " + slot) : presetName.Trim()); string value = SerializePreset(CapturePreset()); ConfigEntry val = ((BaseUnityPlugin)this).Config.Bind("Presets", "Slot" + slot + "Name", "Custom Slot " + slot, (ConfigDescription)null); ConfigEntry obj = ((BaseUnityPlugin)this).Config.Bind("Presets", "Slot" + slot + "Data", "", (ConfigDescription)null); val.Value = text; obj.Value = value; ((BaseUnityPlugin)this).Config.Save(); presetName = text; presetLoadedSlot = slot; presetOverwriteConfirmUntil = 0f; status = "Saved preset: " + text; } private void ApplyCustomPreset(int slot) { string value = ((BaseUnityPlugin)this).Config.Bind("Presets", "Slot" + slot + "Name", "Custom Slot " + slot, (ConfigDescription)null).Value; MenuPreset menuPreset = DeserializePreset(((BaseUnityPlugin)this).Config.Bind("Presets", "Slot" + slot + "Data", "", (ConfigDescription)null).Value); if (menuPreset == null) { status = "Custom slot " + slot + " is empty"; } else { ApplyPreset(menuPreset, value); } } private void ResetCustomPreset(int slot) { presetOverwriteConfirmUntil = 0f; presetLoadedSlot = slot; ((BaseUnityPlugin)this).Config.Bind("Presets", "Slot" + slot + "Name", "Custom Slot " + slot, (ConfigDescription)null).Value = "Custom Slot " + slot; ((BaseUnityPlugin)this).Config.Bind("Presets", "Slot" + slot + "Data", "", (ConfigDescription)null).Value = ""; ((BaseUnityPlugin)this).Config.Save(); presetName = "Custom Slot " + slot; status = "Reset custom slot " + slot; } private MenuPreset BuiltInPreset(string name) { MenuPreset menuPreset = CapturePreset(); menuPreset.god = false; menuPreset.noCd = false; menuPreset.maxHp = false; menuPreset.lockOn = false; menuPreset.projectiles = true; menuPreset.rapid = false; menuPreset.markers = true; menuPreset.guaranteed = false; menuPreset.summons = false; menuPreset.acridTargets = false; menuPreset.acridRange = false; menuPreset.attack = 1f; menuPreset.move = 1f; menuPreset.damage = 1f; menuPreset.difficulty = 1f; menuPreset.tp = 1f; menuPreset.jumps = 0; switch (name) { case "Practice": menuPreset.god = true; menuPreset.noCd = true; menuPreset.maxHp = true; menuPreset.lockOn = true; menuPreset.damage = 5f; menuPreset.move = 2f; menuPreset.jumps = 3; break; case "OP Showcase": menuPreset.god = true; menuPreset.noCd = true; menuPreset.maxHp = true; menuPreset.lockOn = true; menuPreset.rapid = true; menuPreset.reload = true; menuPreset.secondary = true; menuPreset.special = true; menuPreset.attack = 5f; menuPreset.move = 3f; menuPreset.damage = 100f; menuPreset.jumps = 5; menuPreset.guaranteed = true; break; case "Extreme Challenge": menuPreset.difficulty = 25f; menuPreset.tp = 1f; menuPreset.markers = false; break; case "Drone Commander": menuPreset.summons = true; menuPreset.guaranteed = true; menuPreset.move = 1.5f; break; } return menuPreset; } private void SafeUpdate(string n, Action a) { try { a(); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)("Silent55 " + n + ": " + ex)); status = n + " error; see log"; } } private void Update() { SafeUpdate("network", InitRequestNetwork); SafeUpdate("run", UpdateRunControls); SafeUpdate("enemy limit", UpdateEnemyLimit); if ((Object)(object)Run.instance != (Object)(object)appliedRun) { appliedRun = Run.instance; loadoutAppliedThisRun.Clear(); grantedLoadouts.Clear(); } SafeUpdate("loadouts", EnsureCharacterLoadout); SafeUpdate("shrines", UpdateGuaranteedShrines); SafeUpdate("acrid", UpdateAcridEpidemic); SafeUpdate("rapid", UpdateRapidFire); SafeUpdate("lock", UpdateLockOn); if (NetworkServer.active && empoweredSummons && Time.unscaledTime >= nextSummonScan) { EmpowerOwnedMinions(((Object)(object)GetBody() != (Object)null) ? GetBody().master : null); nextSummonScan = Time.unscaledTime + 1f; } if (Input.GetKeyDown((KeyCode)288)) { visible = !visible; } if (Input.GetKeyDown((KeyCode)287)) { godMode = !godMode; status = "God Mode " + (godMode ? "enabled" : "disabled"); } if (Input.GetKeyDown((KeyCode)286)) { noCooldown = !noCooldown; } CharacterBody body = GetBody(); if ((Object)(object)body != (Object)(object)tracked) { RestoreStats(); Track(body); } SafeUpdate("practice", UpdatePracticeState); if (tab == 9 && visible) { SafeUpdate("safety counters", UpdateSafetyCounters); } ApplyGodMode(); if (noCooldown && (Object)(object)body != (Object)null) { ResetSkills(body); } ApplyStats(body); } private string SaveKey() { LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); if (firstLocalUser == null || firstLocalUser.userProfile == null) { return "Default"; } return firstLocalUser.userProfile.name; } private string EncodeText(string v) { return Convert.ToBase64String(Encoding.UTF8.GetBytes(v ?? "")); } private string DecodeText(string v) { try { return Encoding.UTF8.GetString(Convert.FromBase64String(v ?? "")); } catch { return ""; } } private string CaptureItems(Inventory inv) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Invalid comparison between Unknown and I4 //IL_0037: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)inv == (Object)null) { return ""; } List list = new List(); foreach (PickupDef allPickup in PickupCatalog.allPickups) { if (allPickup != null && (int)allPickup.itemIndex != -1) { int itemCount = inv.GetItemCount(allPickup.itemIndex); if (itemCount > 0) { list.Add(allPickup.internalName + ":" + itemCount); } } } return string.Join(",", list.ToArray()); } private string CaptureCheckpoint() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Invalid comparison between Unknown and I4 //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) CharacterBody body = GetBody(); Run instance = Run.instance; if ((Object)(object)body == (Object)null || (Object)(object)body.inventory == (Object)null || (Object)(object)instance == (Object)null) { return ""; } EquipmentIndex currentEquipmentIndex = body.inventory.currentEquipmentIndex; string v = (((int)currentEquipmentIndex != -1) ? ((Object)EquipmentCatalog.GetEquipmentDef(currentEquipmentIndex)).name : ""); string[] obj = new string[14] { EncodeText(CurrentCharacterKey()), null, null, null, null, null, null, null, null, null, null, null, null, null }; Scene activeScene = SceneManager.GetActiveScene(); obj[1] = EncodeText(((Scene)(ref activeScene)).name); obj[2] = EncodeText(v); obj[3] = EncodeText(CaptureItems(body.inventory)); obj[4] = body.master.money.ToString(); obj[5] = instance.GetRunStopwatch().ToString(CultureInfo.InvariantCulture); obj[6] = difficultyRate.ToString(CultureInfo.InvariantCulture); obj[7] = teleporterRate.ToString(CultureInfo.InvariantCulture); obj[8] = jumpHeightMultiplier.ToString(CultureInfo.InvariantCulture); obj[9] = moveMultiplier.ToString(CultureInfo.InvariantCulture); obj[10] = attackMultiplier.ToString(CultureInfo.InvariantCulture); obj[11] = damageMultiplier.ToString(CultureInfo.InvariantCulture); obj[12] = extraJumps.ToString(); obj[13] = (((Object)(object)TeamManager.instance != (Object)null) ? TeamManager.instance.GetTeamLevel((TeamIndex)1).ToString() : "1"); return string.Join("|", obj); } private void CreateCheckpoint() { if (!NetworkServer.active || (Object)(object)Run.instance == (Object)null) { status = "Start a host or solo run first"; return; } string value = CaptureCheckpoint(); if (string.IsNullOrEmpty(value)) { status = "Checkpoint capture failed"; return; } string text = SaveKey(); string value2 = ((BaseUnityPlugin)this).Config.Bind("Run Saves", text + "_Primary", "", (ConfigDescription)null).Value; if (!string.IsNullOrEmpty(value2)) { ((BaseUnityPlugin)this).Config.Bind("Run Saves", text + "_Backup", "", (ConfigDescription)null).Value = value2; } ((BaseUnityPlugin)this).Config.Bind("Run Saves", text + "_Primary", "", (ConfigDescription)null).Value = value; ((BaseUnityPlugin)this).Config.Save(); status = "Checkpoint saved at current stage start state"; } private bool RestoreCheckpoint(string raw) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Invalid comparison between Unknown and I4 //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Invalid comparison between Unknown and I4 //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) if (string.IsNullOrEmpty(raw)) { return false; } string[] array = raw.Split('|'); if (array.Length < 14) { return false; } CharacterBody body = GetBody(); if ((Object)(object)body == (Object)null || (Object)(object)body.inventory == (Object)null || (Object)(object)Run.instance == (Object)null) { return false; } foreach (PickupDef allPickup in PickupCatalog.allPickups) { if (allPickup != null && (int)allPickup.itemIndex != -1) { int itemCount = body.inventory.GetItemCount(allPickup.itemIndex); if (itemCount > 0) { body.inventory.RemoveItemPermanent(allPickup.itemIndex, itemCount); } } } string[] array2 = DecodeText(array[3]).Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (string text in array2) { string[] bits = text.Split(':'); if (bits.Length == 2 && int.TryParse(bits[1], out var result)) { PickupDef val = PickupCatalog.allPickups.FirstOrDefault((Func)((PickupDef x) => x != null && x.internalName == bits[0])); if (val != null && (int)val.itemIndex != -1) { body.inventory.GiveItemPermanent(val.itemIndex, result); } } } string text2 = DecodeText(array[2]); EquipmentDef val2 = null; for (int num = 0; num < EquipmentCatalog.equipmentCount; num++) { EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef((EquipmentIndex)num); if ((Object)(object)equipmentDef != (Object)null && ((Object)equipmentDef).name == text2) { val2 = equipmentDef; break; } } if ((Object)(object)val2 != (Object)null) { body.inventory.SetEquipmentIndex(val2.equipmentIndex); } if (uint.TryParse(array[4], out var result2) && (Object)(object)body.master != (Object)null) { body.master.money = result2; } if (float.TryParse(array[5], NumberStyles.Float, CultureInfo.InvariantCulture, out var result3)) { Run.instance.SetRunStopwatch(result3); } if (float.TryParse(array[6], NumberStyles.Float, CultureInfo.InvariantCulture, out result3)) { difficultyRate = result3; } if (float.TryParse(array[7], NumberStyles.Float, CultureInfo.InvariantCulture, out result3)) { teleporterRate = result3; } if (float.TryParse(array[8], NumberStyles.Float, CultureInfo.InvariantCulture, out result3)) { jumpHeightMultiplier = result3; } if (float.TryParse(array[9], NumberStyles.Float, CultureInfo.InvariantCulture, out result3)) { moveMultiplier = result3; } if (float.TryParse(array[10], NumberStyles.Float, CultureInfo.InvariantCulture, out result3)) { attackMultiplier = result3; } if (float.TryParse(array[11], NumberStyles.Float, CultureInfo.InvariantCulture, out result3)) { damageMultiplier = result3; } if (int.TryParse(array[12], out var result4)) { extraJumps = result4; } if (int.TryParse(array[13], out result4) && (Object)(object)TeamManager.instance != (Object)null) { TeamManager.instance.SetTeamLevel((TeamIndex)1, (uint)Mathf.Max(1, result4)); } status = "Checkpoint restored into current run"; return true; } private void LoadCheckpoint() { if (!NetworkServer.active || (Object)(object)Run.instance == (Object)null) { status = "Start the matching survivor and stage first"; return; } string value = ((BaseUnityPlugin)this).Config.Bind("Run Saves", SaveKey() + "_Primary", "", (ConfigDescription)null).Value; if (!RestoreCheckpoint(value)) { value = ((BaseUnityPlugin)this).Config.Bind("Run Saves", SaveKey() + "_Backup", "", (ConfigDescription)null).Value; if (!RestoreCheckpoint(value)) { status = "No usable checkpoint found"; } else { status = "Primary failed; backup restored"; } } } private void DeleteCheckpoint() { string text = SaveKey(); ((BaseUnityPlugin)this).Config.Bind("Run Saves", text + "_Primary", "", (ConfigDescription)null).Value = ""; ((BaseUnityPlugin)this).Config.Bind("Run Saves", text + "_Backup", "", (ConfigDescription)null).Value = ""; ((BaseUnityPlugin)this).Config.Save(); status = "Saved checkpoints deleted"; } private void SaveAndQuit() { if (Time.unscaledTime > saveQuitConfirmUntil) { saveQuitConfirmUntil = Time.unscaledTime + 5f; status = "Press Save and Quit again within 5 seconds"; return; } CreateCheckpoint(); if (!status.StartsWith("Checkpoint saved")) { return; } saveQuitConfirmUntil = 0f; status = "Saved; returning to main menu"; Console instance = Console.instance; if (!((Object)(object)instance != (Object)null)) { return; } MethodInfo methodInfo = ((object)instance).GetType().GetMethods().FirstOrDefault((MethodInfo x) => x.Name == "SubmitCmd" && x.GetParameters().Length >= 2); if (methodInfo != null) { ParameterInfo[] parameters = methodInfo.GetParameters(); object[] array = new object[parameters.Length]; for (int num = 0; num < array.Length; num++) { array[num] = ((parameters[num].ParameterType == typeof(string)) ? "disconnect" : null); } methodInfo.Invoke(instance, array); } } private float SpawnPressureMultiplier() { if (spawnPressureMode != 0) { if (spawnPressureMode != 1) { if (spawnPressureMode != 2) { return 8f; } return 4f; } return 2f; } return 1f; } private void UpdateEnemyLimit() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Invalid comparison between Unknown and I4 if (!NetworkServer.active || Time.unscaledTime < nextSpawnPressureApply) { return; } nextSpawnPressureApply = Time.unscaledTime + 0.5f; if (spawnPressureMode == 0) { return; } float num = SpawnPressureMultiplier(); foreach (CombatDirector instances in CombatDirector.instancesList) { if (!((Object)(object)instances == (Object)null) && ((Behaviour)instances).enabled && (int)instances.teamIndex == 2) { instances.monsterCredit += Time.deltaTime * instances.creditMultiplier * (num - 1f); instances.monsterSpawnTimer = Mathf.Min(instances.monsterSpawnTimer, Mathf.Max(0.1f, 1f / num)); } } } private void InitRequestNetwork() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown if (NetworkServer.active && !serverHandlerRegistered) { NetworkServer.RegisterHandler((short)28550, new NetworkMessageDelegate(OnServerRequest)); serverHandlerRegistered = true; } NetworkClient val = (((Object)(object)NetworkManager.singleton != (Object)null) ? NetworkManager.singleton.client : null); if (val != null && val.isConnected && val != registeredClient) { val.RegisterHandler((short)28551, new NetworkMessageDelegate(OnClientResponse)); registeredClient = val; } } private string FormatClock(float seconds) { seconds = Mathf.Max(0f, seconds); int num = Mathf.FloorToInt(seconds); return (num / 60).ToString("00") + ":" + (num % 60).ToString("00"); } private void UpdateRunControls() { //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Expected O, but got Unknown if (!NetworkServer.active) { return; } Run instance = Run.instance; if ((Object)(object)instance != (Object)(object)trackedRun) { trackedRun = instance; lastRunTime = (((Object)(object)instance != (Object)null) ? instance.GetRunStopwatch() : 0f); realSessionTime = lastRunTime; trackedStageClearCount = (((Object)(object)instance != (Object)null) ? instance.stageClearCount : (-1)); nextDifficultyRecalc = 0f; } if ((Object)(object)instance != (Object)null) { float runStopwatch = instance.GetRunStopwatch(); float num = Mathf.Clamp(runStopwatch - lastRunTime, 0f, 0.25f); if (instance.stageClearCount != trackedStageClearCount) { trackedStageClearCount = instance.stageClearCount; lastRunTime = runStopwatch; num = 0f; nextDifficultyRecalc = 0f; } if (num > 0f) { realSessionTime += num; float num2 = runStopwatch + num * (Mathf.Clamp(difficultyRate, 0f, 50f) - 1f); instance.SetRunStopwatch(Mathf.Max(0f, num2)); } lastRunTime = instance.GetRunStopwatch(); if (Time.unscaledTime >= nextDifficultyRecalc) { nextDifficultyRecalc = Time.unscaledTime + 0.25f; instance.RecalculateDifficultyCoefficent(); } } else { realSessionTime = 0f; trackedStageClearCount = -1; } foreach (HoldoutZoneController instances in InstanceTracker.GetInstancesList()) { if ((Object)(object)instances != (Object)null && hookedZones.Add(instances)) { instances.calcChargeRate += new CalcChargeRateDelegate(ScaleChargeRate); } } hookedZones.RemoveWhere((HoldoutZoneController z) => (Object)(object)z == (Object)null); } private void SyncCombatDirectors(Run run, float extraDelta) { } private void UpdateGuaranteedShrines() { if (!NetworkServer.active) { return; } ShrineChanceBehavior[] array = Object.FindObjectsOfType(); foreach (ShrineChanceBehavior val in array) { if (!((Object)(object)val == (Object)null) && guaranteedShrineChance) { val.failureChance = 0f; val.failureWeight = 0f; } } } private void ToggleOrRequestShrineChance() { if (NetworkServer.active) { guaranteedShrineChance = !guaranteedShrineChance; ApplyRunAction(6, guaranteedShrineChance ? 1f : 0f); } else { RequestOrApply(6, guaranteedShrineChance ? 0f : 1f); } } private void ScaleChargeRate(ref float rate) { if (rate > 0f) { rate *= teleporterRate; } } private string ActionName(int action, float value) { return action switch { 1 => "Difficulty time scaling " + value.ToString("0.00") + "x", 2 => "Teleporter rate " + value.ToString("0.00") + "x", 3 => "Instant teleporter charge", 4 => "Default OP loadout", 5 => "Empowered Summons", _ => "Shrine of Chance " + ((value >= 0.5f) ? "GUARANTEED" : "NORMAL"), }; } private void RequestOrApply(int action, float value) { if (NetworkServer.active) { ApplyRunAction(action, value); return; } NetworkClient val = (((Object)(object)NetworkManager.singleton != (Object)null) ? NetworkManager.singleton.client : null); if (val == null || !val.isConnected) { status = "Not connected to a compatible host"; return; } LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); string requester = ((firstLocalUser != null && (Object)(object)firstLocalUser.currentNetworkUser != (Object)null) ? firstLocalUser.currentNetworkUser.userName : "Client"); val.Send((short)28550, (MessageBase)(object)new RunControlRequest { action = action, value = value, requester = requester, version = "4.5.4" }); status = "Request sent to host: " + ActionName(action, value); } private void ApplyRunAction(int action, float value) { if (!NetworkServer.active) { status = "Host or single-player required"; return; } switch (action) { case 1: difficultyRate = Mathf.Clamp(value, 0f, 50f); if ((Object)(object)Run.instance != (Object)null) { lastRunTime = Run.instance.GetRunStopwatch(); } nextDifficultyRecalc = 0f; status = "Difficulty rate set to " + difficultyRate.ToString("0.00") + "x"; break; case 2: teleporterRate = Mathf.Clamp(value, 0.25f, 10f); status = "Teleporter rate set to " + teleporterRate.ToString("0.00") + "x"; break; case 6: guaranteedShrineChance = value >= 0.5f; UpdateGuaranteedShrines(); status = "Shrine of Chance " + (guaranteedShrineChance ? "guaranteed" : "normal"); break; case 3: { TeleporterInteraction instance = TeleporterInteraction.instance; if ((Object)(object)instance == (Object)null || (Object)(object)instance.holdoutZoneController == (Object)null) { status = "No active teleporter found"; break; } instance.holdoutZoneController.FullyChargeHoldoutZone(); status = "Teleporter fully charged"; break; } } } private void OnServerRequest(NetworkMessage netMsg) { RunControlRequest runControlRequest = netMsg.ReadMessage(); if (runControlRequest.version != "4.5.4") { netMsg.conn.Send((short)28551, (MessageBase)(object)new RunControlResponse { approved = false, message = "Silent55 version mismatch. Both players need v4.5.4" }); } else if (autoApproveRequests) { bool flag = ((runControlRequest.action == 4) ? ApplyRequestedLoadout(netMsg.conn) : ((runControlRequest.action == 5) ? ApplyRequestedSummons(netMsg.conn) : ApplyApprovedRunAction(runControlRequest.action, runControlRequest.value))); netMsg.conn.Send((short)28551, (MessageBase)(object)new RunControlResponse { approved = flag, message = (flag ? ("Host approved: " + ActionName(runControlRequest.action, runControlRequest.value)) : "Request could not be applied") }); } else if (pendingRequest != null) { netMsg.conn.Send((short)28551, (MessageBase)(object)new RunControlResponse { approved = false, message = "Host is reviewing another request" }); } else { pendingConnection = netMsg.conn; pendingRequest = runControlRequest; status = runControlRequest.requester + " requested " + ActionName(runControlRequest.action, runControlRequest.value); } } private bool ApplyApprovedRunAction(int action, float value) { ApplyRunAction(action, value); return true; } private void ResolvePending(bool approve) { if (pendingRequest != null) { string text = ActionName(pendingRequest.action, pendingRequest.value); bool flag = false; if (approve) { flag = ((pendingRequest.action == 4) ? ApplyRequestedLoadout(pendingConnection) : ((pendingRequest.action == 5) ? ApplyRequestedSummons(pendingConnection) : ApplyApprovedRunAction(pendingRequest.action, pendingRequest.value))); } if (pendingConnection != null) { pendingConnection.Send((short)28551, (MessageBase)(object)new RunControlResponse { approved = (approve && flag), message = ((approve && flag) ? ("Host approved: " + text) : (approve ? "Request could not be applied" : ("Host rejected: " + text))) }); } pendingConnection = null; pendingRequest = null; if (!approve) { status = "Request rejected"; } } } private void OnClientResponse(NetworkMessage netMsg) { RunControlResponse runControlResponse = netMsg.ReadMessage(); status = runControlResponse.message; } private string CurrentCharacterKey() { CharacterBody body = GetBody(); if (!((Object)(object)body != (Object)null)) { return "NO_CHARACTER"; } return body.baseNameToken; } private string CurrentCharacterName() { CharacterBody body = GetBody(); if ((Object)(object)body == (Object)null) { return "No active character"; } string displayName = body.GetDisplayName(); if (!string.IsNullOrEmpty(displayName)) { return displayName; } return ((Object)((Component)body).gameObject).name; } private void EnsureCharacterLoadout() { string text = CurrentCharacterKey(); if (!(text == "NO_CHARACTER") && !(text == loadedLoadoutCharacter)) { loadedLoadoutCharacter = text; if (!opLoadouts.ContainsKey(text)) { LoadCharacterLoadout(text); } } } private string LoadoutConfigKey(string key) { return "Loadout_" + key.Replace(".", "_").Replace(" ", "_"); } private void AddDefaultItem(List list, int count, params string[] names) { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) PickupDef def = null; foreach (string text in names) { string q = text.ToLowerInvariant(); def = PickupCatalog.allPickups.FirstOrDefault((Func)((PickupDef x) => x != null && (int)x.itemIndex != -1 && ((x.internalName ?? "").ToLowerInvariant().Contains(q) || PickupName(x).ToLowerInvariant().Contains(q)))); if (def != null) { break; } } if (def != null) { LoadoutEntry loadoutEntry = list.Find((LoadoutEntry e) => e.pickup == def.pickupIndex); if (loadoutEntry != null) { loadoutEntry.count += count; return; } list.Add(new LoadoutEntry { pickup = def.pickupIndex, count = count }); } } private void AddDefaultEquipment(List list, params string[] names) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) PickupDef val = null; foreach (string text in names) { string q = text.ToLowerInvariant(); val = PickupCatalog.allPickups.FirstOrDefault((Func)((PickupDef x) => x != null && (int)x.equipmentIndex != -1 && ((x.internalName ?? "").ToLowerInvariant().Contains(q) || PickupName(x).ToLowerInvariant().Contains(q)))); if (val != null) { break; } } if (val != null) { list.Add(new LoadoutEntry { pickup = val.pickupIndex, count = 1 }); } } private List BuildSilent55Default(string key) { List list = new List(); AddDefaultItem(list, 10, "syringe", "soldier's syringe"); AddDefaultItem(list, 10, "critglasses", "lens-maker"); AddDefaultItem(list, 10, "hoof", "paul's goat"); AddDefaultItem(list, 5, "feather", "hopoo feather"); AddDefaultItem(list, 10, "bear", "tougher times"); AddDefaultItem(list, 5, "missile", "atg missile"); AddDefaultItem(list, 3, "clover", "57 leaf"); AddDefaultItem(list, 3, "alienhead", "alien head"); AddDefaultItem(list, 2, "behemoth", "brilliant behemoth"); AddDefaultItem(list, 1, "extrALife", "dio's best friend"); AddDefaultItem(list, 5, "scythe", "harvester"); string text = key.ToLowerInvariant(); if (text.Contains("huntress")) { AddDefaultItem(list, 8, "ukulele"); AddDefaultItem(list, 8, "predatory"); AddDefaultItem(list, 6, "backupmag", "backup magazine"); } else if (text.Contains("loader")) { AddDefaultItem(list, 10, "crowbar"); AddDefaultItem(list, 10, "focuscrystal", "focus crystal"); AddDefaultItem(list, 5, "iceRing", "runald"); AddDefaultItem(list, 5, "fireRing", "kjaro"); } else if (text.Contains("engineer")) { AddDefaultItem(list, 20, "mushroom", "bustling fungus"); AddDefaultItem(list, 5, "nkuhana", "n'kuhana"); AddDefaultItem(list, 5, "aegis"); } else if (text.Contains("railgunner")) { AddDefaultItem(list, 20, "crowbar"); AddDefaultItem(list, 5, "laserScope", "laser scope"); AddDefaultItem(list, 8, "armorplate", "repulsion armor"); } else if (text.Contains("bandit")) { AddDefaultItem(list, 8, "crowbar"); AddDefaultItem(list, 8, "guillotine"); AddDefaultItem(list, 5, "brainstalk", "brainstalks"); } else if (text.Contains("merc")) { AddDefaultItem(list, 8, "predatory"); AddDefaultItem(list, 8, "scythe"); AddDefaultItem(list, 8, "focuscrystal", "focus crystal"); } else if (text.Contains("acrid") || text.Contains("croco")) { AddDefaultEquipment(list, "dronebackup", "the back-up"); AddDefaultItem(list, 1, "autocastequipment", "gesture of the drowned"); AddDefaultItem(list, 10, "fuelcell", "fuel cell"); AddDefaultItem(list, 10, "gasoline"); AddDefaultItem(list, 10, "wisp", "will-o"); AddDefaultItem(list, 8, "guillotine"); AddDefaultItem(list, 10, "bleedonhit", "tri-tip"); AddDefaultItem(list, 10, "missile", "atg missile"); AddDefaultItem(list, 5, "clover", "57 leaf"); AddDefaultItem(list, 3, "behemoth", "brilliant behemoth"); AddDefaultItem(list, 10, "bossdamage", "armor-piercing rounds"); AddDefaultItem(list, 3, "talisman", "soulbound catalyst"); } else if (text.Contains("captain")) { AddDefaultItem(list, 10, "bleedOnHit", "tri-tip"); AddDefaultItem(list, 8, "missile", "atg missile"); AddDefaultItem(list, 5, "clover"); } else if (text.Contains("treebot") || text.Contains("rex")) { AddDefaultItem(list, 10, "medkit"); AddDefaultItem(list, 8, "seed", "leeching seed"); AddDefaultItem(list, 5, "rejuvenation", "rejuvenation rack"); } else if (text.Contains("mage") || text.Contains("artificer")) { AddDefaultItem(list, 10, "crowbar"); AddDefaultItem(list, 8, "ignition", "ignition tank"); AddDefaultItem(list, 6, "backupmag", "backup magazine"); } else if (text.Contains("toolbot") || text.Contains("mul-t")) { AddDefaultItem(list, 10, "syringe"); AddDefaultItem(list, 8, "missile"); AddDefaultItem(list, 6, "fuelcell", "fuel cell"); } else if (text.Contains("void")) { AddDefaultItem(list, 10, "hoof"); AddDefaultItem(list, 8, "armorplate"); AddDefaultItem(list, 5, "rejuvenation"); } return list; } private void LoadCharacterLoadout(string key) { //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) ConfigEntry val = ((BaseUnityPlugin)this).Config.Bind("OP Loadouts", LoadoutConfigKey(key), "", "Internal pickup names and quantities for this character."); ConfigEntry val2 = ((BaseUnityPlugin)this).Config.Bind("OP Loadouts", LoadoutConfigKey(key) + "_Initialized", false, "Whether this character loadout has been initialized."); List list = new List(); if (!val2.Value) { list = BuildSilent55Default(key); opLoadouts[key] = list; val2.Value = true; SaveCharacterLoadout(); status = "Loaded Silent55 default for " + CurrentCharacterName(); return; } string value = val.Value; if (!string.IsNullOrEmpty(value)) { string[] array = value.Split(new char[1] { ';' }, StringSplitOptions.RemoveEmptyEntries); foreach (string text in array) { string[] bits = text.Split('|'); if (bits.Length == 2) { PickupDef val3 = PickupCatalog.allPickups.FirstOrDefault((Func)((PickupDef x) => x != null && x.internalName == bits[0])); if (val3 != null && int.TryParse(bits[1], out var result)) { list.Add(new LoadoutEntry { pickup = val3.pickupIndex, count = Mathf.Clamp(result, 1, 999) }); } } } } opLoadouts[key] = list; } private void SaveCharacterLoadout() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) string text = CurrentCharacterKey(); if (text == "NO_CHARACTER") { return; } EnsureCharacterLoadout(); List list = new List(); foreach (LoadoutEntry item in opLoadouts[text]) { PickupDef pickupDef = PickupCatalog.GetPickupDef(item.pickup); if (pickupDef != null) { list.Add(pickupDef.internalName + "|" + item.count); } } ((BaseUnityPlugin)this).Config.Bind("OP Loadouts", LoadoutConfigKey(text), "", "Internal pickup names and quantities for this character.").Value = string.Join(";", list.ToArray()); ((BaseUnityPlugin)this).Config.Bind("OP Loadouts", LoadoutConfigKey(text) + "_Initialized", true, "Whether this character loadout has been initialized.").Value = true; ((BaseUnityPlugin)this).Config.Save(); status = "Saved OP loadout for " + CurrentCharacterName(); } private void RestoreDefaultLoadout() { string text = CurrentCharacterKey(); if (text == "NO_CHARACTER") { status = "Start a run first"; return; } opLoadouts[text] = BuildSilent55Default(text); SaveCharacterLoadout(); status = "Restored Silent55 default for " + CurrentCharacterName(); } private void AddSelectedToLoadout() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) PickupDef pickupDef = PickupCatalog.GetPickupDef(selectedPickup); if (!IsSpawnablePickup(pickupDef)) { status = "Select an item in Spawner or OP Loadout first"; return; } string text = CurrentCharacterKey(); if (text == "NO_CHARACTER") { status = "Start a run first"; return; } EnsureCharacterLoadout(); LoadoutEntry loadoutEntry = opLoadouts[text].Find((LoadoutEntry e) => e.pickup == selectedPickup); if (loadoutEntry != null) { loadoutEntry.count = Mathf.Clamp(loadoutEntry.count + loadoutQuantity, 1, 999); } else { opLoadouts[text].Add(new LoadoutEntry { pickup = selectedPickup, count = Mathf.Clamp(loadoutQuantity, 1, 999) }); } SaveCharacterLoadout(); } private void RemoveLoadoutEntry(int index) { string key = CurrentCharacterKey(); EnsureCharacterLoadout(); if (opLoadouts.ContainsKey(key) && index >= 0 && index < opLoadouts[key].Count) { opLoadouts[key].RemoveAt(index); SaveCharacterLoadout(); } } private void ClearCharacterLoadout() { string key = CurrentCharacterKey(); EnsureCharacterLoadout(); if (opLoadouts.ContainsKey(key)) { opLoadouts[key].Clear(); SaveCharacterLoadout(); status = "Cleared OP loadout for " + CurrentCharacterName(); } } private bool ApplyLoadoutToBody(CharacterBody body, string key, string playerKey) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Invalid comparison between Unknown and I4 //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Invalid comparison between Unknown and I4 //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: 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) if ((Object)(object)body == (Object)null || (Object)(object)body.inventory == (Object)null) { return false; } if (loadoutAppliedThisRun.Contains(playerKey)) { status = "OP loadout already applied to this player this run"; return false; } if (!opLoadouts.ContainsKey(key)) { LoadCharacterLoadout(key); } if (!opLoadouts.ContainsKey(key) || opLoadouts[key].Count == 0) { return false; } int num = 0; List list = new List(); foreach (LoadoutEntry item in opLoadouts[key]) { PickupDef pickupDef = PickupCatalog.GetPickupDef(item.pickup); if (pickupDef != null) { if ((int)pickupDef.itemIndex != -1) { body.inventory.GiveItemPermanent(pickupDef.itemIndex, item.count); list.Add(new LoadoutEntry { pickup = item.pickup, count = item.count }); num += item.count; } else if ((int)pickupDef.equipmentIndex != -1) { body.inventory.SetEquipmentIndex(pickupDef.equipmentIndex); } } } grantedLoadouts[playerKey] = list; loadoutAppliedThisRun.Add(playerKey); status = "Applied OP loadout (" + num + " stacks)"; return true; } private void RemoveSilent55Loadout() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Invalid comparison between Unknown and I4 //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { status = "Host or single-player required"; return; } CharacterBody body = GetBody(); if ((Object)(object)body == (Object)null || (Object)(object)body.inventory == (Object)null) { status = "Start a run first"; return; } if (!grantedLoadouts.TryGetValue("local", out var value) || value.Count == 0) { status = "No recorded Silent55 loadout to remove"; return; } int num = 0; foreach (LoadoutEntry item in value) { PickupDef pickupDef = PickupCatalog.GetPickupDef(item.pickup); if (pickupDef != null && (int)pickupDef.itemIndex != -1) { int num2 = Mathf.Min(body.inventory.GetItemCount(pickupDef.itemIndex), item.count); if (num2 > 0) { body.inventory.RemoveItemPermanent(pickupDef.itemIndex, num2); num += num2; } } } grantedLoadouts.Remove("local"); loadoutAppliedThisRun.Remove("local"); status = "Removed " + num + " Silent55 item stacks"; } private void ApplyOrRequestCharacterLoadout() { if (NetworkServer.active) { CharacterBody body = GetBody(); if ((Object)(object)body == (Object)null) { status = "Start a run first"; } else { ApplyLoadoutToBody(body, CurrentCharacterKey(), "local"); } } else { RequestOrApply(4, 0f); } } private CharacterBody BodyForConnection(NetworkConnection conn) { if (conn == null) { return null; } foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (!((Object)(object)instance == (Object)null) && !((Object)(object)instance.networkUser == (Object)null) && ((NetworkBehaviour)instance.networkUser).connectionToClient == conn && (Object)(object)instance.master != (Object)null) { return instance.master.GetBody(); } } return null; } private bool ApplyRequestedLoadout(NetworkConnection conn) { CharacterBody val = BodyForConnection(conn); if ((Object)(object)val == (Object)null) { status = "Requesting player body not found"; return false; } string baseNameToken = val.baseNameToken; if (!opLoadouts.ContainsKey(baseNameToken)) { LoadCharacterLoadout(baseNameToken); } return ApplyLoadoutToBody(val, baseNameToken, "conn:" + conn.connectionId); } private void GiveMinionItem(Inventory inv, int count, params string[] names) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)inv == (Object)null) { return; } foreach (string text in names) { string q = text.ToLowerInvariant(); PickupDef val = PickupCatalog.allPickups.FirstOrDefault((Func)((PickupDef x) => x != null && (int)x.itemIndex != -1 && ((x.internalName ?? "").ToLowerInvariant().Contains(q) || PickupName(x).ToLowerInvariant().Contains(q)))); if (val != null) { inv.GiveItemPermanent(val.itemIndex, count); break; } } } private bool IsOwnedMinion(CharacterMaster minion, CharacterMaster owner) { if ((Object)(object)minion != (Object)null && (Object)(object)owner != (Object)null && (Object)(object)minion.minionOwnership != (Object)null) { return (Object)(object)minion.minionOwnership.ownerMaster == (Object)(object)owner; } return false; } private int EmpowerOwnedMinions(CharacterMaster owner) { if (!NetworkServer.active || (Object)(object)owner == (Object)null) { return 0; } int num = 0; CharacterMaster[] array = Object.FindObjectsOfType(); foreach (CharacterMaster val in array) { if (IsOwnedMinion(val, owner) && !((Object)(object)val.inventory == (Object)null) && !empoweredMinions.Contains(val)) { GiveMinionItem(val.inventory, 10, "syringe", "soldier's syringe"); GiveMinionItem(val.inventory, 10, "critglasses", "lens-maker"); GiveMinionItem(val.inventory, 10, "bleedonhit", "tri-tip"); GiveMinionItem(val.inventory, 8, "missile", "atg missile"); GiveMinionItem(val.inventory, 5, "clover", "57 leaf"); GiveMinionItem(val.inventory, 3, "behemoth", "brilliant behemoth"); GiveMinionItem(val.inventory, 10, "bossdamage", "armor-piercing rounds"); GiveMinionItem(val.inventory, 10, "bear", "tougher times"); empoweredMinions.Add(val); num++; } } if (num > 0) { status = "Empowered " + num + " owned summon(s)"; } return num; } private void ToggleOrRequestEmpoweredSummons() { if (NetworkServer.active) { empoweredSummons = !empoweredSummons; if (empoweredSummons) { EmpowerOwnedMinions(((Object)(object)GetBody() != (Object)null) ? GetBody().master : null); } status = "Empowered Summons " + (empoweredSummons ? "enabled" : "disabled"); } else { RequestOrApply(5, 1f); } } private bool ApplyRequestedSummons(NetworkConnection conn) { CharacterBody val = BodyForConnection(conn); if ((Object)(object)val == (Object)null || (Object)(object)val.master == (Object)null) { return false; } EmpowerOwnedMinions(val.master); return true; } private bool IsCurrentCharacterBandit() { return CurrentCharacterKey().ToLowerInvariant().Contains("bandit"); } private bool SupportsRapidFire() { if (!IsCurrentCharacterBandit()) { return IsCurrentCharacterAcrid(); } return true; } private void PrepareRapidSkill(GenericSkill skill, bool refill) { if (!((Object)(object)skill == (Object)null) && refill) { skill.stock = skill.maxStock; skill.rechargeStopwatch = 0f; skill.SetBlockedCooldownSkillState(false); } } private void TryRapidSkill(GenericSkill skill, ref float nextTime, bool held, bool refill) { if (held && !((Object)(object)skill == (Object)null) && !(Time.unscaledTime < nextTime)) { PrepareRapidSkill(skill, refill); if (skill.ExecuteIfReady()) { nextTime = Time.unscaledTime + rapidFireInterval; } else { nextTime = Time.unscaledTime + Mathf.Min(0.03f, rapidFireInterval); } } } private void UpdateRapidFire() { if (!rapidFire || !SupportsRapidFire()) { return; } CharacterBody body = GetBody(); if (!((Object)(object)body == (Object)null) && !((Object)(object)body.inputBank == (Object)null) && !((Object)(object)body.skillLocator == (Object)null)) { InputBankTest inputBank = body.inputBank; SkillLocator skillLocator = body.skillLocator; TryRapidSkill(skillLocator.primary, ref nextPrimaryFire, inputBank.skill1.down, rapidFireReload); if (rapidFireSecondary) { TryRapidSkill(skillLocator.secondary, ref nextSecondaryFire, inputBank.skill2.down, refill: true); } if (rapidFireSpecial) { TryRapidSkill(skillLocator.special, ref nextSpecialFire, inputBank.skill4.down, refill: true); } } } private bool IsCurrentCharacterAcrid() { CharacterBody body = GetBody(); if ((Object)(object)body == (Object)null) { return false; } string text = (CurrentCharacterKey() + " " + ((Object)((Component)body).gameObject).name + " " + CurrentCharacterName()).ToLowerInvariant(); if (!text.Contains("acrid")) { return text.Contains("croco"); } return true; } private void CaptureDiseaseDefaults() { if (!diseaseDefaultsCaptured) { originalDiseaseBounces = Disease.maxBounces; originalDiseaseBounceRange = Disease.bounceRange; originalDiseaseOrbRange = Disease.orbRange; diseaseDefaultsCaptured = true; } } private void UpdateAcridEpidemic() { CaptureDiseaseDefaults(); bool num = IsCurrentCharacterAcrid(); Disease.maxBounces = ((num && acridUnlimitedTargets) ? 1000 : originalDiseaseBounces); Disease.bounceRange = ((num && acridUnlimitedRange) ? 10000f : originalDiseaseBounceRange); Disease.orbRange = ((num && acridUnlimitedRange) ? 10000f : originalDiseaseOrbRange); } private void RestoreAcridEpidemic() { if (diseaseDefaultsCaptured) { Disease.maxBounces = originalDiseaseBounces; Disease.bounceRange = originalDiseaseBounceRange; Disease.orbRange = originalDiseaseOrbRange; } } private void UpdateLockOn() { //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) CharacterBody body = GetBody(); if (!lockOn || (Object)(object)body == (Object)null) { DisableLockTracker(); return; } if ((Object)(object)trackerBody != (Object)(object)body || (Object)(object)silentTracker == (Object)null) { DisableLockTracker(); trackerBody = body; silentTracker = ((Component)body).GetComponent(); if ((Object)(object)silentTracker == (Object)null) { silentTracker = ((Component)body).gameObject.AddComponent(); } ((Behaviour)silentTracker).enabled = true; } silentTracker.maxTrackingDistance = lockDistance; silentTracker.maxTrackingAngle = lockAngle; HurtBox trackingTarget = silentTracker.GetTrackingTarget(); if ((Object)(object)trackingTarget != (Object)null && (Object)(object)trackingTarget.healthComponent != (Object)null && trackingTarget.healthComponent.alive) { InputBankTest inputBank = body.inputBank; if ((Object)(object)inputBank != (Object)null) { Vector3 val = ((Component)trackingTarget).transform.position - inputBank.aimOrigin; Vector3 normalized = ((Vector3)(ref val)).normalized; inputBank.aimDirection = normalized; } if (projectileTracking) { SteerOwnedProjectiles(((Component)body).gameObject, ((Component)trackingTarget).transform); } } trackedProjectiles.RemoveWhere((ProjectileController x) => (Object)(object)x == (Object)null); } private void DisableLockTracker() { if ((Object)(object)silentTracker != (Object)null) { scientificDisableTracker(); } trackerBody = null; trackedProjectiles.Clear(); } private void scientificDisableTracker() { ((Behaviour)silentTracker).enabled = false; silentTracker = null; } private void SteerOwnedProjectiles(GameObject owner, Transform target) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)owner == (Object)null || (Object)(object)target == (Object)null) { return; } foreach (ProjectileController instances in InstanceTracker.GetInstancesList()) { if (!((Object)(object)instances == (Object)null) && !((Object)(object)instances.owner != (Object)(object)owner)) { Vector3 val = target.position - ((Component)instances).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; if (!(((Vector3)(ref normalized)).sqrMagnitude < 0.001f)) { float num = Mathf.Clamp01(trackingStrength * 0.01f * Time.deltaTime * 10f); ((Component)instances).transform.rotation = Quaternion.Slerp(((Component)instances).transform.rotation, Quaternion.LookRotation(normalized), num); trackedProjectiles.Add(instances); } } } } private CharacterBody GetBody() { LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); if (firstLocalUser == null) { return null; } return firstLocalUser.cachedBody; } private void Track(CharacterBody body) { tracked = body; if (!((Object)(object)body == (Object)null)) { oldAttack = body.baseAttackSpeed; oldDamage = body.baseDamage; oldMove = body.baseMoveSpeed; oldHealth = body.baseMaxHealth; oldRegen = body.baseRegen; oldJumpPower = body.baseJumpPower; oldJumps = body.baseJumpCount; trackedHealth = body.healthComponent; } } private void ApplyGodMode() { CharacterBody body = GetBody(); if (!((Object)(object)body == (Object)null) && !((Object)(object)body.healthComponent == (Object)null)) { body.healthComponent.godMode = godMode; trackedHealth = body.healthComponent; if (godMode) { body.healthComponent.Networkhealth = body.healthComponent.fullHealth; } } } private void ResetSkills(CharacterBody body) { GenericSkill[] components = ((Component)body).GetComponents(); foreach (GenericSkill val in components) { if (!((Object)(object)val == (Object)null) && !((Object)(object)val.skillDef == (Object)null)) { val.stock = val.maxStock; val.rechargeStopwatch = 0f; val.SetBlockedCooldownSkillState(false); } } } private void ApplyStats(CharacterBody body) { if (!((Object)(object)body == (Object)null)) { float num = oldAttack * attackMultiplier; float num2 = oldDamage * damageMultiplier; float num3 = oldMove * moveMultiplier; float num4 = oldJumpPower * jumpHeightMultiplier; float num5 = (maxPersonal ? (oldHealth * 20f) : oldHealth); float num6 = (maxPersonal ? (oldRegen * 20f + 20f) : oldRegen); int num7 = ((extraJumps >= 11) ? 999 : (oldJumps + extraJumps)); bool flag = false; if (!Mathf.Approximately(body.baseAttackSpeed, num)) { body.baseAttackSpeed = num; flag = true; } if (!Mathf.Approximately(body.baseDamage, num2)) { body.baseDamage = num2; flag = true; } if (!Mathf.Approximately(body.baseMoveSpeed, num3)) { body.baseMoveSpeed = num3; flag = true; } if (!Mathf.Approximately(body.baseJumpPower, num4)) { body.baseJumpPower = num4; flag = true; } if (!Mathf.Approximately(body.baseMaxHealth, num5)) { body.baseMaxHealth = num5; flag = true; } if (!Mathf.Approximately(body.baseRegen, num6)) { body.baseRegen = num6; flag = true; } if (body.baseJumpCount != num7) { body.baseJumpCount = num7; flag = true; } if (flag) { body.MarkAllStatsDirty(); body.RecalculateStats(); } } } private void RestoreStats() { if (!((Object)(object)tracked == (Object)null)) { tracked.baseAttackSpeed = oldAttack; tracked.baseDamage = oldDamage; tracked.baseMoveSpeed = oldMove; tracked.baseJumpPower = oldJumpPower; tracked.baseMaxHealth = oldHealth; tracked.baseRegen = oldRegen; tracked.baseJumpCount = oldJumps; tracked.MarkAllStatsDirty(); tracked.RecalculateStats(); tracked = null; } } private string PickupName(PickupDef def) { if (def == null) { return "Unknown"; } string text = Language.GetString(def.nameToken); if (!string.IsNullOrEmpty(text) && !(text == def.nameToken)) { return text; } return def.internalName; } private bool IsSpawnablePickup(PickupDef def) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Invalid comparison between Unknown and I4 //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Invalid comparison between Unknown and I4 if (def != null) { if ((int)def.itemIndex == -1) { return (int)def.equipmentIndex != -1; } return true; } return false; } private void UpdateSafetyCounters() { if (!(Time.unscaledTime < nextSafetyScan)) { nextSafetyScan = Time.unscaledTime + 2f; cachedBodies = CharacterBody.readOnlyInstancesList.Count; cachedProjectiles = InstanceTracker.GetInstancesList().Count; cachedPickups = InstanceTracker.GetInstancesList().Count; } } private bool IsMonsterBody(CharacterBody b) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Invalid comparison between Unknown and I4 if ((Object)(object)b != (Object)null && (Object)(object)b.teamComponent != (Object)null) { return (int)b.teamComponent.teamIndex == 2; } return false; } private void RefreshPracticeCache() { practiceBodies.Clear(); practiceAIs.Clear(); foreach (CharacterBody readOnlyInstances in CharacterBody.readOnlyInstancesList) { if (IsMonsterBody(readOnlyInstances)) { practiceBodies.Add(readOnlyInstances); } } foreach (CharacterMaster readOnlyInstances2 in CharacterMaster.readOnlyInstancesList) { if ((Object)(object)readOnlyInstances2 == (Object)null) { continue; } CharacterBody body = readOnlyInstances2.GetBody(); if (!IsMonsterBody(body)) { continue; } BaseAI[] components = ((Component)readOnlyInstances2).GetComponents(); foreach (BaseAI val in components) { if ((Object)(object)val != (Object)null && !practiceAIs.Contains(val)) { practiceAIs.Add(val); } } } nextPracticeCache = Time.unscaledTime + 2f; } private void ApplyPracticeState(bool force = false) { //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) bool flag = practiceFreeze || practiceFullPause; bool flag2 = practiceDisableAI || practiceFullPause; int num = 0; int num2 = 0; int num3 = 0; foreach (CharacterBody practiceBody in practiceBodies) { if ((Object)(object)practiceBody == (Object)null) { continue; } if ((Object)(object)practiceBody.healthComponent != (Object)null) { if (force || practiceBody.healthComponent.isInFrozenState != flag) { practiceBody.healthComponent.isInFrozenState = flag; } num++; } if ((flag || practiceFullPause) && (Object)(object)practiceBody.inputBank != (Object)null) { practiceBody.inputBank.moveVector = Vector3.zero; practiceBody.inputBank.skill1.down = false; practiceBody.inputBank.skill2.down = false; practiceBody.inputBank.skill3.down = false; practiceBody.inputBank.skill4.down = false; practiceBody.inputBank.sprint.down = false; num2++; } } foreach (BaseAI practiceAI in practiceAIs) { if (!((Object)(object)practiceAI == (Object)null)) { bool flag3 = !flag2; if (force || ((Behaviour)practiceAI).enabled != flag3) { ((Behaviour)practiceAI).enabled = flag3; } num3++; } } status = "Practice: " + num2 + " movement inputs stopped, " + num + " frozen, " + num3 + " AI controllers"; } private void UpdatePracticeState() { if (!NetworkServer.active) { return; } bool flag = practiceFreeze || practiceDisableAI || practiceFullPause; bool flag2 = practiceFreeze != lastPracticeFreeze || practiceDisableAI != lastPracticeDisableAI || practiceFullPause != lastPracticeFullPause; if (flag || flag2) { if (Time.unscaledTime >= nextPracticeCache || practiceBodies.RemoveAll((CharacterBody x) => (Object)(object)x == (Object)null) > 0 || practiceAIs.RemoveAll((BaseAI x) => (Object)(object)x == (Object)null) > 0) { RefreshPracticeCache(); } if (flag2) { ApplyPracticeState(force: true); lastPracticeFreeze = practiceFreeze; lastPracticeDisableAI = practiceDisableAI; lastPracticeFullPause = practiceFullPause; } if (flag && Time.unscaledTime >= nextPracticeUpdate) { nextPracticeUpdate = Time.unscaledTime + 0.1f; ApplyPracticeState(); } } } private void ResumeEnemies() { if (!NetworkServer.active) { status = "Host or single-player required"; return; } practiceFreeze = false; practiceDisableAI = false; practiceFullPause = false; RefreshPracticeCache(); ApplyPracticeState(force: true); lastPracticeFreeze = false; lastPracticeDisableAI = false; lastPracticeFullPause = false; status = "Enemies resumed"; } private void HealAllEnemies() { if (!NetworkServer.active) { status = "Host required"; return; } int num = 0; CharacterBody[] array = Object.FindObjectsOfType(); foreach (CharacterBody val in array) { if (IsMonsterBody(val) && (Object)(object)val.healthComponent != (Object)null) { val.healthComponent.Networkhealth = val.healthComponent.fullHealth; val.healthComponent.Networkshield = val.healthComponent.fullShield; num++; } } status = "Restored " + num + " enemies"; } private void ClearAllEnemies() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { status = "Host required"; return; } int num = 0; CharacterBody[] array = Object.FindObjectsOfType(); foreach (CharacterBody val in array) { if (IsMonsterBody(val) && (Object)(object)val.healthComponent != (Object)null) { val.healthComponent.Suicide((GameObject)null, (GameObject)null, DamageTypeCombo.op_Implicit((DamageType)0)); num++; } } status = "Cleared " + num + " enemies"; } private void ClearHostileProjectiles() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Invalid comparison between Unknown and I4 if (!NetworkServer.active) { status = "Host required"; return; } int num = 0; ProjectileController[] array = Object.FindObjectsOfType(); foreach (ProjectileController val in array) { if ((Object)(object)val != (Object)null && (Object)(object)val.teamFilter != (Object)null && (int)val.teamFilter.teamIndex == 2) { NetworkServer.Destroy(((Component)val).gameObject); num++; } } status = "Cleared " + num + " hostile projectiles"; } private void CollectStageDrops() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { status = "Host or single-player required"; return; } CharacterBody body = GetBody(); if ((Object)(object)body == (Object)null) { status = "Start a run first"; return; } Vector3 val = body.corePosition + Vector3.up * 0.5f; int num = 0; int num2 = 0; PickupDropletController[] array = Object.FindObjectsOfType(); foreach (PickupDropletController val2 in array) { if ((Object)(object)val2 == (Object)null || (Object)(object)((Component)val2).gameObject == (Object)null) { continue; } PickupDef pickupDef = PickupCatalog.GetPickupDef(val2.pickupIndex); if (pickupDef != null) { string text = (pickupDef.internalName ?? "").ToLowerInvariant(); if (!text.Contains("artifactkey") && !text.Contains("quest") && !text.Contains("voidcoin") && !text.Contains("lunarcoin")) { ((Component)val2).transform.position = val + Random.insideUnitSphere * 0.6f; num++; } } } Component[] array2 = Object.FindObjectsOfType(); foreach (Component val3 in array2) { if (!((Object)(object)val3 == (Object)null) && !((Object)(object)val3.gameObject == (Object)null)) { string text2 = ((object)val3).GetType().Name.ToLowerInvariant(); if (text2.Contains("moneypack") || text2.Contains("goldpack") || text2.Contains("treasurepack")) { val3.transform.position = val + Random.insideUnitSphere * 0.6f; num2++; } } } status = "Moved " + num + " pickup(s) and " + num2 + " money pack(s) to player"; } private void EmergencyCleanup() { if (!NetworkServer.active) { status = "Host required"; return; } int num = 0; PickupDropletController[] array = Object.FindObjectsOfType(); foreach (PickupDropletController val in array) { if ((Object)(object)val != (Object)null) { NetworkServer.Destroy(((Component)val).gameObject); num++; } } ProjectileController[] array2 = Object.FindObjectsOfType(); foreach (ProjectileController val2 in array2) { if ((Object)(object)val2 != (Object)null && (Object)(object)val2.owner == (Object)null) { NetworkServer.Destroy(((Component)val2).gameObject); num++; } } status = "Cleanup removed " + num + " objects"; } private void RemoveSelectedPickup() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Invalid comparison between Unknown and I4 //IL_005c: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { status = "Host required"; return; } CharacterBody body = GetBody(); PickupDef pickupDef = PickupCatalog.GetPickupDef(selectedPickup); if ((Object)(object)body == (Object)null || (Object)(object)body.inventory == (Object)null || pickupDef == null || (int)pickupDef.itemIndex == -1) { status = "Select an item"; return; } body.inventory.RemoveItemPermanent(pickupDef.itemIndex, spawnQuantity); status = "Removed item stacks"; } private void UndoLastGive() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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) //IL_0059: Invalid comparison between Unknown and I4 //IL_0062: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || lastGivenPickup == PickupIndex.none) { status = "Nothing to undo"; return; } CharacterBody body = GetBody(); PickupDef pickupDef = PickupCatalog.GetPickupDef(lastGivenPickup); if ((Object)(object)body != (Object)null && (Object)(object)body.inventory != (Object)null && pickupDef != null && (int)pickupDef.itemIndex != -1) { body.inventory.RemoveItemPermanent(pickupDef.itemIndex, lastGivenCount); } lastGivenPickup = PickupIndex.none; lastGivenCount = 0; status = "Undid item grant"; } private void RefreshEnemyMasterPrefabs() { enemyMasterPrefabs.Clear(); HashSet hashSet = new HashSet(); BindingFlags bindingAttr = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic; FieldInfo[] fields = typeof(MasterCatalog).GetFields(bindingAttr); foreach (FieldInfo fieldInfo in fields) { object obj = null; try { obj = fieldInfo.GetValue(null); } catch { } if (!(obj is IEnumerable enumerable)) { continue; } foreach (object item in enumerable) { GameObject val = (GameObject)((item is GameObject) ? item : null); CharacterMaster val2 = (CharacterMaster)((item is CharacterMaster) ? item : null); if ((Object)(object)val == (Object)null && (Object)(object)val2 != (Object)null) { val = ((Component)val2).gameObject; } if (!((Object)(object)val == (Object)null) && !hashSet.Contains(val) && !((Object)(object)val.GetComponent() == (Object)null)) { string text = ((Object)val).name.ToLowerInvariant(); if (!text.Contains("player") && !text.Contains("survivor") && !text.Contains("engimaster") && !text.Contains("drone") && !text.Contains("turret")) { hashSet.Add(val); enemyMasterPrefabs.Add(val); } } } } enemyMasterPrefabs.Sort((GameObject a, GameObject b) => string.Compare(EnemyDisplayName(a), EnemyDisplayName(b), StringComparison.OrdinalIgnoreCase)); selectedEnemyMaster = Mathf.Clamp(selectedEnemyMaster, 0, Mathf.Max(0, enemyMasterPrefabs.Count - 1)); status = "Found " + enemyMasterPrefabs.Count + " enemy master prefabs"; } private string EnemyDisplayName(GameObject prefab) { if ((Object)(object)prefab == (Object)null) { return "Unknown"; } string result = ((Object)prefab).name.Replace("Master", "").Replace("Clone", "").Trim(); CharacterMaster component = prefab.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.bodyPrefab != (Object)null) { CharacterBody component2 = component.bodyPrefab.GetComponent(); if ((Object)(object)component2 != (Object)null) { string text = Language.GetString(component2.baseNameToken); if (!string.IsNullOrWhiteSpace(text) && text != component2.baseNameToken) { result = text; } } } return result; } private bool IsBossMaster(GameObject prefab) { string text = (((Object)(object)prefab != (Object)null) ? ((Object)prefab).name : "").ToLowerInvariant(); if (!text.Contains("boss") && !text.Contains("titan") && !text.Contains("vagrant") && !text.Contains("worm") && !text.Contains("queen") && !text.Contains("scav") && !text.Contains("brother") && !text.Contains("voidraid")) { return text.Contains("grandparent"); } return true; } private void SpawnSelectedEnemy() { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { status = "Host or single-player required"; return; } CharacterBody body = GetBody(); if ((Object)(object)body == (Object)null) { status = "Start a run first"; return; } if (enemyMasterPrefabs.Count == 0) { RefreshEnemyMasterPrefabs(); } if (enemyMasterPrefabs.Count == 0) { status = "No enemy master prefabs found"; return; } selectedEnemyMaster = Mathf.Clamp(selectedEnemyMaster, 0, enemyMasterPrefabs.Count - 1); GameObject val = enemyMasterPrefabs[selectedEnemyMaster]; int num = 0; for (int i = 0; i < Mathf.Clamp(enemyQuantity, 1, 25); i++) { float num2 = (float)i * MathF.PI * 2f / (float)Mathf.Max(1, enemyQuantity); Vector3 val2 = body.footPosition + new Vector3(Mathf.Cos(num2), 0f, Mathf.Sin(num2)) * enemySpawnDistance; GameObject val3 = Object.Instantiate(val, val2, Quaternion.identity); CharacterMaster component = val3.GetComponent(); if ((Object)(object)component == (Object)null) { Object.Destroy((Object)(object)val3); continue; } component.teamIndex = (TeamIndex)2; NetworkServer.Spawn(val3); component.Respawn(val2, Quaternion.identity, false); silent55SpawnedMasters.Add(component); num++; } status = "Spawned " + num + " x " + EnemyDisplayName(val); } private void HealTrackedEnemies() { if (!NetworkServer.active) { status = "Host required"; return; } int num = 0; silent55SpawnedMasters.RemoveAll((CharacterMaster x) => (Object)(object)x == (Object)null); foreach (CharacterMaster silent55SpawnedMaster in silent55SpawnedMasters) { CharacterBody body = silent55SpawnedMaster.GetBody(); if (!((Object)(object)body == (Object)null) && !((Object)(object)body.healthComponent == (Object)null)) { body.healthComponent.Networkhealth = body.healthComponent.fullHealth; body.healthComponent.Networkshield = body.healthComponent.fullShield; num++; } } status = "Healed " + num + " tracked enemies"; } private void DespawnTrackedEnemies() { if (!NetworkServer.active) { status = "Host required"; return; } int num = 0; CharacterMaster[] array = silent55SpawnedMasters.ToArray(); foreach (CharacterMaster val in array) { if (!((Object)(object)val == (Object)null)) { CharacterBody body = val.GetBody(); if ((Object)(object)body != (Object)null) { NetworkServer.Destroy(((Component)body).gameObject); } NetworkServer.Destroy(((Component)val).gameObject); num++; } } silent55SpawnedMasters.Clear(); status = "Despawned " + num + " tracked enemies"; } private void GiveSelectedPickup() { //IL_001b: 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) //IL_0059: Invalid comparison between Unknown and I4 //IL_00b9: 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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { status = "Host or single-player required"; return; } CharacterBody body = GetBody(); PickupDef pickupDef = PickupCatalog.GetPickupDef(selectedPickup); if ((Object)(object)body == (Object)null || (Object)(object)body.inventory == (Object)null || !IsSpawnablePickup(pickupDef)) { status = "Select an item or equipment first"; } else if ((int)pickupDef.itemIndex != -1) { body.inventory.GiveItemPermanent(pickupDef.itemIndex, spawnQuantity); lastGivenPickup = selectedPickup; lastGivenCount = spawnQuantity; status = "Gave " + spawnQuantity + " x " + PickupName(pickupDef); } else { body.inventory.SetEquipmentIndex(pickupDef.equipmentIndex); status = "Equipped " + PickupName(pickupDef); } } private void SpawnSelectedPickup() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { status = "Host or single-player required"; return; } CharacterBody body = GetBody(); PickupDef pickupDef = PickupCatalog.GetPickupDef(selectedPickup); if ((Object)(object)body == (Object)null || !IsSpawnablePickup(pickupDef)) { status = "Select an item or equipment first"; return; } int num = Mathf.Clamp(spawnQuantity, 1, 25); Vector3 val = default(Vector3); for (int i = 0; i < num; i++) { ((Vector3)(ref val))..ctor(Random.Range(-4f, 4f), 18f, Random.Range(-4f, 4f)); PickupDropletController.CreatePickupDroplet(new UniquePickup(selectedPickup), body.corePosition + Vector3.up * 2f, val); } status = "Spawned " + num + " x " + PickupName(pickupDef) + " on ground"; } private void GiveLunarCoins(uint amount) { LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); NetworkUser val = ((firstLocalUser != null) ? firstLocalUser.currentNetworkUser : null); if ((Object)(object)val == (Object)null) { status = "Start a run or enter a lobby first"; return; } val.AwardLunarCoins(amount); status = "Added " + amount.ToString("N0") + " Lunar Coins"; } private void GiveCredits(uint amount) { CharacterBody body = GetBody(); if ((Object)(object)body == (Object)null || (Object)(object)body.master == (Object)null) { status = "Start a run first"; return; } uint num = uint.MaxValue - body.master.money; CharacterMaster master = body.master; master.money += ((amount > num) ? num : amount); status = "Added " + amount.ToString("N0") + " credits"; } private void MaxPlayerXp() { if ((Object)(object)TeamManager.instance == (Object)null) { status = "Start a run first"; return; } TeamManager.instance.SetTeamLevel((TeamIndex)1, TeamManager.naturalLevelCap); status = "Player team reached max level"; } private unsafe void UnlockAllContent() { //IL_0086: 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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); UserProfile val = ((firstLocalUser != null) ? firstLocalUser.userProfile : null); if (val == null) { status = "No local profile found"; return; } if (Time.unscaledTime > unlockConfirmUntil) { unlockConfirmUntil = Time.unscaledTime + 5f; status = "Press Unlock All again within 5 seconds to confirm"; return; } int num = 0; for (int i = 0; i < UnlockableCatalog.unlockableCount; i++) { UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef((UnlockableIndex)i); if ((Object)(object)unlockableDef != (Object)null && !val.HasUnlockable(unlockableDef)) { val.GrantUnlockable(unlockableDef); num++; } } Enumerator enumerator = PickupCatalog.allPickupIndices.GetEnumerator(); try { while (((Enumerator)(ref enumerator)).MoveNext()) { PickupIndex current = ((Enumerator)(ref enumerator)).Current; if (!val.HasDiscoveredPickup(current)) { val.DiscoverPickup(current); } } } finally { ((IDisposable)(*(Enumerator*)(&enumerator))/*cast due to .constrained prefix*/).Dispose(); } val.RequestEventualSave(); unlockConfirmUntil = 0f; status = "Unlocked " + num + " content entries; profile save requested"; } private string RecoveryPlayerName(PlayerCharacterMasterController p) { if ((Object)(object)p == (Object)null) { return "Unknown player"; } if ((Object)(object)p.networkUser != (Object)null && !string.IsNullOrWhiteSpace(p.networkUser.userName)) { return p.networkUser.userName; } return "Player"; } private PlayerCharacterMasterController SelectedRecoveryPlayer() { ReadOnlyCollection instances = PlayerCharacterMasterController.instances; if (instances == null || instances.Count == 0) { return null; } selectedRecoveryPlayer = Mathf.Clamp(selectedRecoveryPlayer, 0, instances.Count - 1); return instances[selectedRecoveryPlayer]; } private void ReviveSelectedPlayer() { if (!NetworkServer.active) { status = "Host or single-player required"; return; } PlayerCharacterMasterController val = SelectedRecoveryPlayer(); if ((Object)(object)val == (Object)null || (Object)(object)val.master == (Object)null) { status = "No player selected"; return; } if (val.master.hasBody) { status = RecoveryPlayerName(val) + " is already alive"; return; } if ((Object)(object)Stage.instance == (Object)null) { status = "No active stage"; return; } Stage.ResetGameOverTimer(8f); Stage.instance.RespawnCharacter(val.master); status = "Revived " + RecoveryPlayerName(val); } private void ReviveAllPlayers() { if (!NetworkServer.active) { status = "Host or single-player required"; return; } if ((Object)(object)Stage.instance == (Object)null) { status = "No active stage"; return; } int num = 0; Stage.ResetGameOverTimer(8f); foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (!((Object)(object)instance == (Object)null) && !((Object)(object)instance.master == (Object)null) && !instance.master.hasBody) { Stage.instance.RespawnCharacter(instance.master); num++; } } status = ((num > 0) ? ("Revived " + num + " player(s)") : "No eliminated players"); } private void HealSelectedPlayer() { if (!NetworkServer.active) { status = "Host or single-player required"; return; } PlayerCharacterMasterController val = SelectedRecoveryPlayer(); CharacterBody val2 = (((Object)(object)val != (Object)null && (Object)(object)val.master != (Object)null) ? val.master.GetBody() : null); if ((Object)(object)val2 == (Object)null || (Object)(object)val2.healthComponent == (Object)null) { status = "Selected player has no active body"; return; } val2.healthComponent.Networkhealth = val2.healthComponent.fullHealth; val2.healthComponent.Networkshield = val2.healthComponent.fullShield; status = "Healed " + RecoveryPlayerName(val); } private void ClearSelectedPlayerDebuffs() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { status = "Host or single-player required"; return; } PlayerCharacterMasterController val = SelectedRecoveryPlayer(); CharacterBody val2 = (((Object)(object)val != (Object)null && (Object)(object)val.master != (Object)null) ? val.master.GetBody() : null); if ((Object)(object)val2 == (Object)null) { status = "Selected player has no active body"; return; } int num = 0; for (int i = 0; i < BuffCatalog.buffCount; i++) { BuffIndex val3 = (BuffIndex)i; BuffDef buffDef = BuffCatalog.GetBuffDef(val3); if ((Object)(object)buffDef != (Object)null && buffDef.isDebuff) { while (val2.HasBuff(val3)) { val2.RemoveBuff(val3); num++; } } } status = "Removed " + num + " debuff stack(s) from " + RecoveryPlayerName(val); } private void TeleportSelectedToHost() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { status = "Host or single-player required"; return; } CharacterBody body = GetBody(); PlayerCharacterMasterController val = SelectedRecoveryPlayer(); CharacterBody val2 = (((Object)(object)val != (Object)null && (Object)(object)val.master != (Object)null) ? val.master.GetBody() : null); if ((Object)(object)body == (Object)null || (Object)(object)val2 == (Object)null) { status = "Host or selected player body unavailable"; return; } TeleportHelper.TeleportBody(val2, body.footPosition + ((Component)body).transform.right * 3f); status = "Teleported " + RecoveryPlayerName(val) + " to host"; } private void Heal() { CharacterBody body = GetBody(); if ((Object)(object)body == (Object)null || (Object)(object)body.healthComponent == (Object)null) { status = "Start a run first"; return; } body.healthComponent.Networkhealth = body.healthComponent.fullHealth; body.healthComponent.Networkshield = body.healthComponent.fullShield; status = "Health restored"; } private void ClearDebuffs() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) CharacterBody body = GetBody(); if ((Object)(object)body == (Object)null) { status = "Start a run first"; return; } int num = 0; for (int i = 0; i < BuffCatalog.buffCount; i++) { BuffIndex val = (BuffIndex)i; BuffDef buffDef = BuffCatalog.GetBuffDef(val); if ((Object)(object)buffDef != (Object)null && buffDef.isDebuff) { while (body.HasBuff(val)) { body.RemoveBuff(val); num++; } } } status = "Removed " + num + " debuff stack(s)"; } private void SavePosition() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) CharacterBody body = GetBody(); if ((Object)(object)body == (Object)null) { status = "Start a run first"; return; } savedPosition = body.corePosition; hasSavedPosition = true; status = "Position saved"; } private void ReturnPosition() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) CharacterBody body = GetBody(); if ((Object)(object)body == (Object)null || !hasSavedPosition) { status = "No saved position"; return; } TeleportHelper.TeleportBody(body, savedPosition); status = "Returned to saved position"; } private void Scan() { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) chests.Clear(); shrines.Clear(); drops.Clear(); groundPickups.Clear(); interactables.Clear(); shops.Clear(); repairables.Clear(); foreach (ChestBehavior instances in InstanceTracker.GetInstancesList()) { if ((Object)(object)instances != (Object)null && !instances.NetworkisChestOpened) { chests.Add(instances); } } shrines.AddRange(Object.FindObjectsOfType()); drops.AddRange(Object.FindObjectsOfType()); foreach (GenericPickupController instances2 in InstanceTracker.GetInstancesList()) { if ((Object)(object)instances2 != (Object)null) { UniquePickup pickup = instances2.pickup; if (((PickupIndex)(ref pickup.pickupIndex)).isValid) { groundPickups.Add(instances2); } } } PurchaseInteraction[] array = Object.FindObjectsOfType(); foreach (PurchaseInteraction val in array) { if ((Object)(object)val != (Object)null && val.available) { interactables.Add(val); } } shops.AddRange(Object.FindObjectsOfType()); repairables.AddRange(Object.FindObjectsOfType()); nextScan = Time.unscaledTime + 1f; } private Color InteractableColor(PurchaseInteraction p) { //IL_0077: 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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) string text = (((Object)((Component)p).gameObject).name + " " + p.displayNameToken + " " + p.contextToken).ToLowerInvariant(); if (text.Contains("portal") || text.Contains("teleporter") || text.Contains("exit")) { return new Color(1f, 0.25f, 0.8f); } if ((Object)(object)((Component)p).GetComponent() != (Object)null || text.Contains("drone") || text.Contains("turret")) { return new Color(0.25f, 1f, 0.35f); } if ((Object)(object)((Component)p).GetComponent() != (Object)null || text.Contains("shop") || text.Contains("terminal")) { return new Color(0.15f, 0.75f, 1f); } if (text.Contains("duplicator") || text.Contains("printer") || text.Contains("scrapper") || text.Contains("cauldron") || text.Contains("cleanse")) { return new Color(1f, 0.55f, 0.1f); } if (text.Contains("shrine") || text.Contains("altar")) { return new Color(0.75f, 0.3f, 1f); } if (text.Contains("chest") || text.Contains("barrel") || text.Contains("cache") || text.Contains("lockbox") || text.Contains("pod") || text.Contains("cradle")) { return new Color(1f, 0.78f, 0.1f); } return Color.white; } private bool ShowInteractable(PurchaseInteraction p) { string text = (((Object)((Component)p).gameObject).name + " " + p.displayNameToken + " " + p.contextToken).ToLowerInvariant(); if (text.Contains("portal") || text.Contains("teleporter") || text.Contains("exit")) { return showPortals; } if ((Object)(object)((Component)p).GetComponent() != (Object)null || text.Contains("drone") || text.Contains("turret")) { return showDrones; } if ((Object)(object)((Component)p).GetComponent() != (Object)null || text.Contains("shop") || text.Contains("terminal")) { return showShops; } if (text.Contains("duplicator") || text.Contains("printer") || text.Contains("scrapper") || text.Contains("cauldron") || text.Contains("cleanse")) { return showConverters; } if (text.Contains("shrine") || text.Contains("altar")) { return showShrines; } if (text.Contains("chest") || text.Contains("barrel") || text.Contains("cache") || text.Contains("lockbox") || text.Contains("pod") || text.Contains("cradle")) { return showChests; } return showMisc; } private void Marker(Camera cam, Vector3 pos, float size, Color color) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) float num = Vector3.Distance(((Component)cam).transform.position, pos); if (num > markerMaxDistance) { return; } Vector3 val = cam.WorldToScreenPoint(pos); if (!(val.z <= 0f)) { Color color2 = GUI.color; GUI.color = color; GUI.DrawTexture(new Rect(val.x - size / 2f, (float)Screen.height - val.y - size / 2f, size, size), (Texture)(object)Texture2D.whiteTexture); if (showMarkerDistance) { GUI.Label(new Rect(val.x + size / 2f + 3f, (float)Screen.height - val.y - 10f, 80f, 20f), Mathf.RoundToInt(num) + "m"); } GUI.color = color2; } } private void DrawMarkers() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) Camera main = Camera.main; if ((Object)(object)main == (Object)null) { return; } if (Time.unscaledTime >= nextScan) { Scan(); } if (showDrops) { foreach (PickupDropletController drop in drops) { if ((Object)(object)drop != (Object)null) { Marker(main, ((Component)drop).transform.position, 9f, new Color(0.1f, 0.85f, 1f)); } } } if (showDrops) { foreach (GenericPickupController groundPickup in groundPickups) { if ((Object)(object)groundPickup != (Object)null) { Marker(main, ((Component)groundPickup).transform.position, 11f, new Color(0.1f, 1f, 0.85f)); } } } foreach (PurchaseInteraction interactable in interactables) { if ((Object)(object)interactable != (Object)null && ShowInteractable(interactable)) { Marker(main, ((Component)interactable).transform.position, 10f, InteractableColor(interactable)); } } if (showTeleporter && (Object)(object)TeleporterInteraction.instance != (Object)null) { Marker(main, ((Component)TeleporterInteraction.instance).transform.position, 14f, new Color(1f, 0.35f, 0.05f)); } } private void InitStyles() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Expected O, but got Unknown //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Expected O, but got Unknown //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Expected O, but got Unknown //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Expected O, but got Unknown //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Expected O, but got Unknown //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Expected O, but got Unknown //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Expected O, but got Unknown if (titleStyle != null) { return; } GUI.skin.label.fontSize = 15; GUI.skin.label.normal.textColor = new Color(0.86f, 0.91f, 1f); GUI.skin.button.fontSize = 15; GUI.skin.button.normal.textColor = new Color(0.9f, 0.95f, 1f); GUI.skin.toggle.fontSize = 15; GUI.skin.toggle.normal.textColor = new Color(0.86f, 0.91f, 1f); GUI.skin.textField.fontSize = 15; titleStyle = new GUIStyle(GUI.skin.label) { fontSize = 23, fontStyle = (FontStyle)1, alignment = (TextAnchor)4 }; titleStyle.normal.textColor = new Color(0.92f, 0.96f, 1f); sectionStyle = new GUIStyle(GUI.skin.label) { fontSize = 18, fontStyle = (FontStyle)1, alignment = (TextAnchor)4 }; sectionStyle.normal.textColor = new Color(0.12f, 0.82f, 1f); onStyle = new GUIStyle(GUI.skin.button) { fontSize = 15, fontStyle = (FontStyle)1 }; onStyle.normal.textColor = new Color(0.22f, 1f, 0.72f); offStyle = new GUIStyle(GUI.skin.button) { fontSize = 15 }; offStyle.normal.textColor = new Color(0.88f, 0.93f, 1f); tabStyle = new GUIStyle(GUI.skin.button) { fontSize = 15, fontStyle = (FontStyle)1 }; tabStyle.normal.textColor = new Color(0.68f, 0.77f, 0.9f); tabOnStyle = new GUIStyle(tabStyle); tabOnStyle.normal.textColor = new Color(0.15f, 0.88f, 1f); tabOnStyle.hover.textColor = Color.white; cyanButtonStyle = new GUIStyle(onStyle); cyanButtonStyle.normal.textColor = new Color(0.18f, 0.86f, 1f); dangerButtonStyle = new GUIStyle(GUI.skin.button) { fontSize = 15, fontStyle = (FontStyle)1 }; dangerButtonStyle.normal.textColor = new Color(1f, 0.42f, 0.48f); try { using Stream stream = ((object)this).GetType().Assembly.GetManifestResourceStream("Silent55ModMenu.Silent55Logo.png"); if (stream != null) { byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); silent55Logo = new Texture2D(2, 2); ImageConversion.LoadImage(silent55Logo, array, false); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("Logo could not be loaded: " + ex.Message)); } } private void OnGUI() { //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) if (markers) { DrawMarkers(); } if (visible) { ((Rect)(ref window)).width = Mathf.Min(820, Screen.width - 20); ((Rect)(ref window)).height = Mathf.Min(900, Screen.height - 20); if (centeredScreenW != Screen.width || centeredScreenH != Screen.height) { ((Rect)(ref window)).x = ((float)Screen.width - ((Rect)(ref window)).width) * 0.5f; ((Rect)(ref window)).y = ((float)Screen.height - ((Rect)(ref window)).height) * 0.5f; centeredScreenW = Screen.width; centeredScreenH = Screen.height; } window = GUI.Window(55055, window, new WindowFunction(DrawWindow), " "); } } private string AuthorityText() { if (!NetworkServer.active) { return "CLIENT REQUEST MODE"; } return "HOST / SINGLE-PLAYER"; } private bool HelpButton(Rect rect, string label) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown return GUI.Button(rect, new GUIContent(label, HelpText(label))); } private bool HelpButton(Rect rect, string label, GUIStyle style) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown return GUI.Button(rect, new GUIContent(label, HelpText(label)), style); } private string HelpText(string label) { switch (label) { case "Items": return "Shows the existing item and equipment spawner."; case "Enemies": return "Shows the enemy and boss spawner. Host only."; case "Spawn Selected Enemy": return "Spawns the selected enemy around the player and tracks it for cleanup. Host only."; case "Heal Tracked": return "Restores health and shields for enemies spawned by Silent55."; case "Despawn Tracked": return "Removes only enemy masters spawned through the Silent55 spawner."; case "Create Checkpoint": return "Saves survivor inventory, equipment, money, team level, run time, and Silent55 settings. Experimental."; case "Load Checkpoint": return "Restores the saved data into a matching active run. Start the same survivor and stage first."; case "Save and Quit": return "Creates a checkpoint, then returns to the main menu after a second confirmation."; case "Delete Checkpoint": return "Deletes the primary and backup checkpoint for the current profile."; case "Normal": case "2x": case "4x": case "8x": return "Controls enemy spawn pressure by increasing director credits and shortening spawn waits. This does not falsely claim to remove the engine global crowd cap."; case "Slot 1": case "Slot 2": case "Slot 3": return "Selects which custom preset slot will be saved, applied, renamed, or reset."; case "Apply Slot": return "Applies the settings saved in the selected custom preset slot."; case "Save Current": return "Saves the current menu settings and entered name into the selected custom preset slot."; case "Reset Slot": return "Clears the selected custom preset slot and restores its default name."; case "Jump height": return "Changes how much upward force each player jump receives."; case "God Mode": return "Prevents damage and continuously restores health."; case "No Cooldown": return "Continuously refills skill stocks and cooldowns."; case "Lock On": return "Uses a Huntress-style target indicator and redirects aim toward the selected enemy."; case "Projectile Tracking": return "Steers compatible owned projectiles toward the locked target."; case "Unlimited Targets": return "Raises Acrid Epidemic to a practical limit of 1,000 bounces."; case "Unlimited Range": return "Raises Acrid Epidemic acquisition and bounce range to 10,000 units."; case "Rapid Fire": return "Repeats compatible Bandit or Acrid skills while the input is held."; case "Instant Primary Reload": return "Refills primary stock while Rapid Fire is active."; case "Include Secondary": return "Allows Rapid Fire to repeat the secondary skill."; case "Include Special": return "Allows Rapid Fire to repeat the special skill."; case "World Markers": return "Shows enabled interactables and loot through simple screen markers."; case "Marker Distances": return "Shows distance text beside world markers."; case "Stop Movement + Freeze": return "Stops monster movement by repeatedly zeroing motor and rigidbody velocity, and applies the game frozen state. Host only."; case "Disable Enemy AI": return "Disables master-level AI controllers, preventing new targeting, navigation and normal attack decisions. Existing attacks or scripted boss actions may finish. Host only."; case "Full Enemy Pause": return "Combines movement arrest, frozen state and disabled AI for all active monster-team enemies. Host only."; case "Resume Enemies": return "Turns off all Silent55 enemy pause controls and restores cached AI controllers. Host only."; case "REMOVE SILENT55 LOADOUT": return "Removes only item stacks recorded when Silent55 applied the current run loadout. Normally collected items remain."; case "APPLY OP LOADOUT": return "Applies the saved survivor build once for the current run. Heavy proc builds can reduce FPS."; case "COLLECT STAGE DROPS": return "Moves eligible pickup droplets and money-pack objects to the player, allowing normal game collection."; case "CONFIRM EMERGENCY CLEANUP": return "Confirms deletion of pickup droplets and ownerless projectiles."; case "FPS SAFE MODE": return "Turns off markers, distance labels, projectile tracking, and continuous Practice controls."; case "EMERGENCY CLEANUP": return "Host-only cleanup of ground pickup droplets and ownerless projectiles."; case "Revive Selected": return "Respawns the selected eliminated player. Host only."; case "Revive Everyone": return "Respawns every eliminated connected player. Host only."; case "Heal Selected": return "Restores the selected player health and shields. Host only."; case "Clear Selected Debuffs": return "Removes removable debuff stacks from the selected player. Host only."; case "Teleport Selected to Host": return "Moves the selected living player near the host. Host only."; case "Full Heal": return "Restores the local player to full health and shields."; case "Clear Debuffs": return "Removes all removable debuff stacks from the local player."; case "Save Position": return "Stores the local player position for this session."; case "Return Position": return "Teleports the local player to the last saved position."; case "Clear Enemies": return "Defeats all active monster-team bodies. Host only."; case "Restore Enemies": return "Restores health and shields for living monster-team bodies. Host only."; case "Clear Hostile Projectiles": return "Destroys projectiles identified as belonging to the monster team. Host only."; case "Reset Sliders": return "Returns player stat and jump controls to their normal values."; default: return "Select this control to use " + label + "."; } } private bool ToggleButton(Rect rect, string label, bool value) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) GUIContent val = new GUIContent(label + " " + (value ? "ON" : "OFF"), HelpText(label)); if (GUI.Button(rect, val, value ? onStyle : offStyle)) { value = !value; } return value; } private void DrawWindow(int id) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_039f: 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_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Expected O, but got Unknown //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0545: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Expected O, but got Unknown //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_06ba: Unknown result type (might be due to invalid IL or missing references) //IL_06ec: Unknown result type (might be due to invalid IL or missing references) //IL_0721: Unknown result type (might be due to invalid IL or missing references) //IL_0762: Unknown result type (might be due to invalid IL or missing references) //IL_079c: Unknown result type (might be due to invalid IL or missing references) //IL_07e1: Unknown result type (might be due to invalid IL or missing references) //IL_081b: Unknown result type (might be due to invalid IL or missing references) //IL_0845: Unknown result type (might be due to invalid IL or missing references) //IL_0877: Unknown result type (might be due to invalid IL or missing references) //IL_08ae: Unknown result type (might be due to invalid IL or missing references) //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_0928: Unknown result type (might be due to invalid IL or missing references) //IL_0962: Unknown result type (might be due to invalid IL or missing references) //IL_09a7: Unknown result type (might be due to invalid IL or missing references) //IL_09e1: Unknown result type (might be due to invalid IL or missing references) //IL_0a26: Unknown result type (might be due to invalid IL or missing references) //IL_0a60: Unknown result type (might be due to invalid IL or missing references) //IL_0d39: Unknown result type (might be due to invalid IL or missing references) //IL_0d6b: Unknown result type (might be due to invalid IL or missing references) //IL_0da1: Unknown result type (might be due to invalid IL or missing references) //IL_0dcd: Unknown result type (might be due to invalid IL or missing references) //IL_0e03: Unknown result type (might be due to invalid IL or missing references) //IL_0e2f: Unknown result type (might be due to invalid IL or missing references) //IL_0e65: Unknown result type (might be due to invalid IL or missing references) //IL_0e91: Unknown result type (might be due to invalid IL or missing references) //IL_0ec7: Unknown result type (might be due to invalid IL or missing references) //IL_0ef3: Unknown result type (might be due to invalid IL or missing references) //IL_0f29: Unknown result type (might be due to invalid IL or missing references) //IL_0f5e: Unknown result type (might be due to invalid IL or missing references) //IL_0f8e: Unknown result type (might be due to invalid IL or missing references) //IL_0fec: Unknown result type (might be due to invalid IL or missing references) //IL_1021: Unknown result type (might be due to invalid IL or missing references) //IL_1066: Unknown result type (might be due to invalid IL or missing references) //IL_0a95: Unknown result type (might be due to invalid IL or missing references) //IL_0ac7: Unknown result type (might be due to invalid IL or missing references) //IL_0afe: Unknown result type (might be due to invalid IL or missing references) //IL_0b33: Unknown result type (might be due to invalid IL or missing references) //IL_05fa: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Expected O, but got Unknown //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_10a2: Unknown result type (might be due to invalid IL or missing references) //IL_10d3: Unknown result type (might be due to invalid IL or missing references) //IL_0b68: Unknown result type (might be due to invalid IL or missing references) //IL_0686: Unknown result type (might be due to invalid IL or missing references) //IL_1406: Unknown result type (might be due to invalid IL or missing references) //IL_1437: Unknown result type (might be due to invalid IL or missing references) //IL_1101: Unknown result type (might be due to invalid IL or missing references) //IL_1bc6: Unknown result type (might be due to invalid IL or missing references) //IL_112f: Unknown result type (might be due to invalid IL or missing references) //IL_0ba9: Unknown result type (might be due to invalid IL or missing references) //IL_0bde: Unknown result type (might be due to invalid IL or missing references) //IL_0c1f: Unknown result type (might be due to invalid IL or missing references) //IL_0c5b: Unknown result type (might be due to invalid IL or missing references) //IL_0c92: Unknown result type (might be due to invalid IL or missing references) //IL_0cc9: Unknown result type (might be due to invalid IL or missing references) //IL_0cfe: Unknown result type (might be due to invalid IL or missing references) //IL_24b8: Unknown result type (might be due to invalid IL or missing references) //IL_24e8: Unknown result type (might be due to invalid IL or missing references) //IL_251e: Unknown result type (might be due to invalid IL or missing references) //IL_1d4f: Unknown result type (might be due to invalid IL or missing references) //IL_1d90: Unknown result type (might be due to invalid IL or missing references) //IL_1dcb: Unknown result type (might be due to invalid IL or missing references) //IL_1167: Unknown result type (might be due to invalid IL or missing references) //IL_29e2: Unknown result type (might be due to invalid IL or missing references) //IL_147b: Unknown result type (might be due to invalid IL or missing references) //IL_1192: Unknown result type (might be due to invalid IL or missing references) //IL_2de9: Unknown result type (might be due to invalid IL or missing references) //IL_2e19: Unknown result type (might be due to invalid IL or missing references) //IL_11bd: Unknown result type (might be due to invalid IL or missing references) //IL_3113: Unknown result type (might be due to invalid IL or missing references) //IL_3143: Unknown result type (might be due to invalid IL or missing references) //IL_31b6: Unknown result type (might be due to invalid IL or missing references) //IL_2a4f: Unknown result type (might be due to invalid IL or missing references) //IL_2aaa: Unknown result type (might be due to invalid IL or missing references) //IL_2ada: Unknown result type (might be due to invalid IL or missing references) //IL_2b0b: Unknown result type (might be due to invalid IL or missing references) //IL_255f: Unknown result type (might be due to invalid IL or missing references) //IL_1e09: Unknown result type (might be due to invalid IL or missing references) //IL_11f5: Unknown result type (might be due to invalid IL or missing references) //IL_3462: Unknown result type (might be due to invalid IL or missing references) //IL_347b: Unknown result type (might be due to invalid IL or missing references) //IL_3480: Unknown result type (might be due to invalid IL or missing references) //IL_3488: Unknown result type (might be due to invalid IL or missing references) //IL_348f: Unknown result type (might be due to invalid IL or missing references) //IL_3498: Expected O, but got Unknown //IL_34bb: Unknown result type (might be due to invalid IL or missing references) //IL_34f7: Unknown result type (might be due to invalid IL or missing references) //IL_33db: Unknown result type (might be due to invalid IL or missing references) //IL_33f4: Unknown result type (might be due to invalid IL or missing references) //IL_33f9: Unknown result type (might be due to invalid IL or missing references) //IL_3401: Unknown result type (might be due to invalid IL or missing references) //IL_3408: Unknown result type (might be due to invalid IL or missing references) //IL_3411: Expected O, but got Unknown //IL_3434: Unknown result type (might be due to invalid IL or missing references) //IL_31ee: Unknown result type (might be due to invalid IL or missing references) //IL_3219: Unknown result type (might be due to invalid IL or missing references) //IL_2598: Unknown result type (might be due to invalid IL or missing references) //IL_1e4c: Unknown result type (might be due to invalid IL or missing references) //IL_1e8d: Unknown result type (might be due to invalid IL or missing references) //IL_1ec8: Unknown result type (might be due to invalid IL or missing references) //IL_1c26: Unknown result type (might be due to invalid IL or missing references) //IL_1c2c: Invalid comparison between Unknown and I4 //IL_1c6a: Unknown result type (might be due to invalid IL or missing references) //IL_1228: Unknown result type (might be due to invalid IL or missing references) //IL_2e91: Unknown result type (might be due to invalid IL or missing references) //IL_2e97: Unknown result type (might be due to invalid IL or missing references) //IL_2eb6: Unknown result type (might be due to invalid IL or missing references) //IL_2ebb: Unknown result type (might be due to invalid IL or missing references) //IL_2ec0: Unknown result type (might be due to invalid IL or missing references) //IL_2e61: Unknown result type (might be due to invalid IL or missing references) //IL_17e1: Unknown result type (might be due to invalid IL or missing references) //IL_1802: Unknown result type (might be due to invalid IL or missing references) //IL_1832: Unknown result type (might be due to invalid IL or missing references) //IL_1869: Unknown result type (might be due to invalid IL or missing references) //IL_18a9: Unknown result type (might be due to invalid IL or missing references) //IL_18ee: Unknown result type (might be due to invalid IL or missing references) //IL_1964: Unknown result type (might be due to invalid IL or missing references) //IL_196a: Unknown result type (might be due to invalid IL or missing references) //IL_1993: Unknown result type (might be due to invalid IL or missing references) //IL_1998: Unknown result type (might be due to invalid IL or missing references) //IL_199d: Unknown result type (might be due to invalid IL or missing references) //IL_14e7: Unknown result type (might be due to invalid IL or missing references) //IL_1508: Unknown result type (might be due to invalid IL or missing references) //IL_1538: Unknown result type (might be due to invalid IL or missing references) //IL_156f: Unknown result type (might be due to invalid IL or missing references) //IL_2fcb: Unknown result type (might be due to invalid IL or missing references) //IL_2ffc: Unknown result type (might be due to invalid IL or missing references) //IL_2b50: Unknown result type (might be due to invalid IL or missing references) //IL_32a3: Unknown result type (might be due to invalid IL or missing references) //IL_3025: Unknown result type (might be due to invalid IL or missing references) //IL_25f1: Unknown result type (might be due to invalid IL or missing references) //IL_2612: Unknown result type (might be due to invalid IL or missing references) //IL_2642: Unknown result type (might be due to invalid IL or missing references) //IL_2679: Unknown result type (might be due to invalid IL or missing references) //IL_1f06: Unknown result type (might be due to invalid IL or missing references) //IL_126f: Unknown result type (might be due to invalid IL or missing references) //IL_330f: Unknown result type (might be due to invalid IL or missing references) //IL_3058: Unknown result type (might be due to invalid IL or missing references) //IL_2791: Unknown result type (might be due to invalid IL or missing references) //IL_27ae: Unknown result type (might be due to invalid IL or missing references) //IL_1298: Unknown result type (might be due to invalid IL or missing references) //IL_337d: Unknown result type (might be due to invalid IL or missing references) //IL_2f23: Unknown result type (might be due to invalid IL or missing references) //IL_3081: Unknown result type (might be due to invalid IL or missing references) //IL_2b95: Unknown result type (might be due to invalid IL or missing references) //IL_1abc: Unknown result type (might be due to invalid IL or missing references) //IL_1aee: Unknown result type (might be due to invalid IL or missing references) //IL_12cb: Unknown result type (might be due to invalid IL or missing references) //IL_30b4: Unknown result type (might be due to invalid IL or missing references) //IL_27f1: Unknown result type (might be due to invalid IL or missing references) //IL_1f4d: Unknown result type (might be due to invalid IL or missing references) //IL_1b21: Unknown result type (might be due to invalid IL or missing references) //IL_16cc: Unknown result type (might be due to invalid IL or missing references) //IL_16e9: Unknown result type (might be due to invalid IL or missing references) //IL_16b2: Unknown result type (might be due to invalid IL or missing references) //IL_30e6: Unknown result type (might be due to invalid IL or missing references) //IL_281a: Unknown result type (might be due to invalid IL or missing references) //IL_1a15: Unknown result type (might be due to invalid IL or missing references) //IL_1b4a: Unknown result type (might be due to invalid IL or missing references) //IL_161e: Unknown result type (might be due to invalid IL or missing references) //IL_1625: Unknown result type (might be due to invalid IL or missing references) //IL_1643: Unknown result type (might be due to invalid IL or missing references) //IL_134a: Unknown result type (might be due to invalid IL or missing references) //IL_2843: Unknown result type (might be due to invalid IL or missing references) //IL_1b7c: Unknown result type (might be due to invalid IL or missing references) //IL_172c: Unknown result type (might be due to invalid IL or missing references) //IL_1fa7: Unknown result type (might be due to invalid IL or missing references) //IL_1755: Unknown result type (might be due to invalid IL or missing references) //IL_2c5f: Unknown result type (might be due to invalid IL or missing references) //IL_2c80: Unknown result type (might be due to invalid IL or missing references) //IL_2cb1: Unknown result type (might be due to invalid IL or missing references) //IL_2739: Unknown result type (might be due to invalid IL or missing references) //IL_1669: Unknown result type (might be due to invalid IL or missing references) //IL_166e: Unknown result type (might be due to invalid IL or missing references) //IL_1788: Unknown result type (might be due to invalid IL or missing references) //IL_274a: Unknown result type (might be due to invalid IL or missing references) //IL_274f: Unknown result type (might be due to invalid IL or missing references) //IL_1fff: Unknown result type (might be due to invalid IL or missing references) //IL_17b1: Unknown result type (might be due to invalid IL or missing references) //IL_28ab: Unknown result type (might be due to invalid IL or missing references) //IL_2037: Unknown result type (might be due to invalid IL or missing references) //IL_2068: Unknown result type (might be due to invalid IL or missing references) //IL_2d10: Unknown result type (might be due to invalid IL or missing references) //IL_28d4: Unknown result type (might be due to invalid IL or missing references) //IL_28da: Unknown result type (might be due to invalid IL or missing references) //IL_28f9: Unknown result type (might be due to invalid IL or missing references) //IL_28fe: Unknown result type (might be due to invalid IL or missing references) //IL_2903: Unknown result type (might be due to invalid IL or missing references) //IL_2d85: Unknown result type (might be due to invalid IL or missing references) //IL_2dbd: Unknown result type (might be due to invalid IL or missing references) //IL_2919: Unknown result type (might be due to invalid IL or missing references) //IL_293a: Unknown result type (might be due to invalid IL or missing references) //IL_20ac: Unknown result type (might be due to invalid IL or missing references) //IL_298a: Unknown result type (might be due to invalid IL or missing references) //IL_20f1: Unknown result type (might be due to invalid IL or missing references) //IL_2136: Unknown result type (might be due to invalid IL or missing references) //IL_2184: Unknown result type (might be due to invalid IL or missing references) //IL_21b5: Unknown result type (might be due to invalid IL or missing references) //IL_21de: Unknown result type (might be due to invalid IL or missing references) //IL_2211: Unknown result type (might be due to invalid IL or missing references) //IL_223a: Unknown result type (might be due to invalid IL or missing references) //IL_226c: Unknown result type (might be due to invalid IL or missing references) //IL_23b6: Unknown result type (might be due to invalid IL or missing references) //IL_23e8: Unknown result type (might be due to invalid IL or missing references) //IL_2415: Unknown result type (might be due to invalid IL or missing references) //IL_244b: Unknown result type (might be due to invalid IL or missing references) //IL_2474: Unknown result type (might be due to invalid IL or missing references) //IL_22b9: Unknown result type (might be due to invalid IL or missing references) //IL_22df: Unknown result type (might be due to invalid IL or missing references) //IL_2315: Unknown result type (might be due to invalid IL or missing references) //IL_2353: Unknown result type (might be due to invalid IL or missing references) //IL_2383: Unknown result type (might be due to invalid IL or missing references) InitStyles(); float width = ((Rect)(ref window)).width; Color color = GUI.color; GUI.color = new Color(0.025f, 0.045f, 0.085f, 0.97f); GUI.Box(new Rect(0f, 0f, width, ((Rect)(ref window)).height), ""); GUI.color = new Color(0.04f, 0.11f, 0.2f, 0.98f); GUI.Box(new Rect(0f, 0f, width, 64f), ""); GUI.color = new Color(0.08f, 0.75f, 1f, 0.28f); GUI.Box(new Rect(0f, 61f, width, 3f), ""); GUI.color = color; if ((Object)(object)silent55Logo != (Object)null) { GUI.DrawTexture(new Rect(14f, 5f, 54f, 54f), (Texture)(object)silent55Logo, (ScaleMode)2, true); } GUI.Label(new Rect(80f, 6f, width - 160f, 30f), "SILENT55 MODMENU", titleStyle); GUIStyle val = new GUIStyle(GUI.skin.label) { fontSize = 14, alignment = (TextAnchor)4, fontStyle = (FontStyle)1 }; GUI.Label(new Rect(80f, 35f, width - 160f, 22f), "v4.5.4 | F7 to hide | " + AuthorityText(), val); if (HelpButton(new Rect(width - 48f, 12f, 32f, 28f), "X")) { visible = false; } string[] array = new string[10] { "Player", "Combat", "World", "Tools", "Spawner", "Run", "Loadout", "Presets", "Multiplayer", "Safety" }; float num = 172f; GUI.color = new Color(0.035f, 0.09f, 0.17f, 0.98f); GUI.Box(new Rect(0f, 64f, num, ((Rect)(ref window)).height - 64f), ""); GUI.color = new Color(0.1f, 0.78f, 1f, 0.3f); GUI.Box(new Rect(num - 2f, 64f, 2f, ((Rect)(ref window)).height - 64f), ""); GUI.color = color; Rect rect = default(Rect); for (int i = 0; i < array.Length; i++) { ((Rect)(ref rect))..ctor(12f, (float)(78 + i * 43), 148f, 34f); if (HelpButton(rect, array[i], (i == tab) ? tabOnStyle : tabStyle)) { tab = i; } } float num2 = 6f; float num3 = num + 18f; float num4 = width - num3 - 18f; GUI.color = new Color(0.035f, 0.075f, 0.135f, 0.92f); GUI.Box(new Rect(num3 - 8f, 76f, num4 + 16f, ((Rect)(ref window)).height - 184f), ""); GUI.color = color; GUI.BeginGroup(new Rect(num3, 86f, num4, ((Rect)(ref window)).height - 204f)); GUI.BeginGroup(new Rect(Mathf.Max(0f, (num4 - 382f) * 0.5f), 0f, 382f, ((Rect)(ref window)).height - 204f)); if (tab == 0) { GUI.Label(new Rect(8f, num2, 360f, 24f), "PLAYER", sectionStyle); num2 += 32f; godMode = ToggleButton(new Rect(8f, num2, 360f, 30f), "God Mode", godMode); num2 += 38f; maxPersonal = ToggleButton(new Rect(8f, num2, 360f, 30f), "Max Personal Health + Regen", maxPersonal); num2 += 42f; GUI.Label(new Rect(8f, num2, 155f, 22f), new GUIContent("Move speed " + moveMultiplier.ToString("0.0") + "x", "Changes the local player base movement speed multiplier.")); moveMultiplier = GUI.HorizontalSlider(new Rect(165f, num2 + 6f, 195f, 18f), moveMultiplier, 1f, 5f); num2 += 35f; GUI.Label(new Rect(8f, num2, 155f, 22f), new GUIContent("Jump height " + jumpHeightMultiplier.ToString("0.0") + "x", "Changes the upward power of each jump. Higher values launch the player farther upward.")); jumpHeightMultiplier = GUI.HorizontalSlider(new Rect(165f, num2 + 6f, 195f, 18f), jumpHeightMultiplier, 0.5f, 10f); num2 += 35f; GUI.Label(new Rect(8f, num2, 155f, 22f), new GUIContent("Extra jumps " + ((extraJumps >= 11) ? "UNLIMITED" : extraJumps.ToString()), "Adds mid-air jumps. The final slider position enables a practical unlimited value.")); extraJumps = Mathf.RoundToInt(GUI.HorizontalSlider(new Rect(165f, num2 + 6f, 195f, 18f), (float)extraJumps, 0f, 11f)); num2 += 40f; if (HelpButton(new Rect(8f, num2, 174f, 30f), "Full Heal")) { Heal(); } if (HelpButton(new Rect(194f, num2, 174f, 30f), "Clear Debuffs")) { ClearDebuffs(); } } if (tab == 1) { GUI.Label(new Rect(8f, num2, 360f, 24f), "COMBAT", sectionStyle); num2 += 32f; noCooldown = ToggleButton(new Rect(8f, num2, 360f, 30f), "No Cooldown", noCooldown); num2 += 42f; GUI.Label(new Rect(8f, num2, 155f, 22f), "Attack speed " + attackMultiplier.ToString("0.0") + "x"); attackMultiplier = GUI.HorizontalSlider(new Rect(165f, num2 + 6f, 195f, 18f), attackMultiplier, 1f, 5f); num2 += 38f; GUI.Label(new Rect(8f, num2, 155f, 22f), "Damage " + Mathf.RoundToInt(damageMultiplier) + "x"); damageMultiplier = GUI.HorizontalSlider(new Rect(165f, num2 + 6f, 195f, 18f), damageMultiplier, 1f, 100000f); num2 += 35f; GUI.Label(new Rect(8f, num2, 360f, 44f), "Damage begins at normal 1x and reaches 100,000x."); num2 += 46f; GUI.Label(new Rect(8f, num2, 360f, 24f), "LOCK ON", sectionStyle); num2 += 30f; lockOn = ToggleButton(new Rect(8f, num2, 360f, 30f), "Lock On", lockOn); num2 += 36f; projectileTracking = ToggleButton(new Rect(8f, num2, 360f, 30f), "Projectile Tracking", projectileTracking); num2 += 36f; GUI.Label(new Rect(8f, num2, 155f, 22f), "Distance " + Mathf.RoundToInt(lockDistance) + " m"); lockDistance = GUI.HorizontalSlider(new Rect(165f, num2 + 6f, 195f, 18f), lockDistance, 10f, 250f); num2 += 32f; GUI.Label(new Rect(8f, num2, 155f, 22f), "Target cone " + Mathf.RoundToInt(lockAngle) + " deg"); lockAngle = GUI.HorizontalSlider(new Rect(165f, num2 + 6f, 195f, 18f), lockAngle, 5f, 90f); num2 += 32f; GUI.Label(new Rect(8f, num2, 155f, 22f), "Tracking " + Mathf.RoundToInt(trackingStrength) + "%"); trackingStrength = GUI.HorizontalSlider(new Rect(165f, num2 + 6f, 195f, 18f), trackingStrength, 5f, 100f); num2 += 34f; GUI.Label(new Rect(8f, num2, 360f, 38f), "Uses the Huntress target marker. Compatible projectiles steer toward the locked target."); num2 += 48f; if (IsCurrentCharacterAcrid()) { GUI.Label(new Rect(8f, num2, 360f, 24f), "ACRID EPIDEMIC", sectionStyle); num2 += 30f; acridUnlimitedTargets = ToggleButton(new Rect(8f, num2, 360f, 30f), "Unlimited Targets", acridUnlimitedTargets); num2 += 36f; acridUnlimitedRange = ToggleButton(new Rect(8f, num2, 360f, 30f), "Unlimited Range", acridUnlimitedRange); num2 += 36f; GUI.Label(new Rect(8f, num2, 360f, 42f), "These controls only appear while Acrid is the active survivor."); num2 += 48f; } if (SupportsRapidFire()) { GUI.Label(new Rect(8f, num2, 360f, 24f), IsCurrentCharacterAcrid() ? "RAPID FIRE - ACRID" : "RAPID FIRE - BANDIT", sectionStyle); num2 += 30f; rapidFire = ToggleButton(new Rect(8f, num2, 360f, 30f), "Rapid Fire", rapidFire); num2 += 36f; GUI.Label(new Rect(8f, num2, 155f, 22f), "Fire interval " + rapidFireInterval.ToString("0.00") + "s"); rapidFireInterval = GUI.HorizontalSlider(new Rect(165f, num2 + 6f, 195f, 18f), rapidFireInterval, 0.02f, 0.25f); num2 += 32f; rapidFireReload = ToggleButton(new Rect(8f, num2, 360f, 30f), "Instant Primary Reload", rapidFireReload); num2 += 36f; rapidFireSecondary = ToggleButton(new Rect(8f, num2, 360f, 30f), "Include Secondary", rapidFireSecondary); num2 += 36f; rapidFireSpecial = ToggleButton(new Rect(8f, num2, 360f, 30f), "Include Special", rapidFireSpecial); num2 += 36f; GUI.Label(new Rect(8f, num2, 360f, 42f), IsCurrentCharacterBandit() ? "Bandit: Burst/Blast, secondary, Lights Out or Desperado." : "Acrid: primary, Neurotoxin/Ravenous Bite, and optional Epidemic."); } } if (tab == 2) { GUI.Label(new Rect(8f, num2, 360f, 24f), "WORLD MARKERS", sectionStyle); num2 += 32f; markers = ToggleButton(new Rect(8f, num2, 360f, 30f), "World Markers", markers); num2 += 38f; showChests = GUI.Toggle(new Rect(12f, num2, 170f, 24f), showChests, "Yellow Chests"); showTeleporter = GUI.Toggle(new Rect(195f, num2, 170f, 24f), showTeleporter, "Orange Teleporter"); num2 += 30f; showShrines = GUI.Toggle(new Rect(12f, num2, 170f, 24f), showShrines, "Purple Shrines"); showDrops = GUI.Toggle(new Rect(195f, num2, 170f, 24f), showDrops, "Cyan Ground Loot"); num2 += 28f; showShops = GUI.Toggle(new Rect(12f, num2, 170f, 24f), showShops, "Blue Shops"); showConverters = GUI.Toggle(new Rect(195f, num2, 170f, 24f), showConverters, "Orange Converters"); num2 += 28f; showDrones = GUI.Toggle(new Rect(12f, num2, 170f, 24f), showDrones, "Green Drones"); showPortals = GUI.Toggle(new Rect(195f, num2, 170f, 24f), showPortals, "Pink Portals"); num2 += 28f; showMisc = GUI.Toggle(new Rect(12f, num2, 260f, 24f), showMisc, "White Other Interactables"); num2 += 36f; GUI.Label(new Rect(8f, num2, 360f, 24f), "Stage recap", sectionStyle); num2 += 28f; GUI.Label(new Rect(8f, num2, 360f, 40f), interactables.Count + " available interactables | " + groundPickups.Count + " ground pickups"); num2 += 44f; showMarkerDistance = ToggleButton(new Rect(8f, num2, 360f, 30f), "Marker Distances", showMarkerDistance); num2 += 38f; GUI.Label(new Rect(8f, num2, 155f, 22f), "Max distance " + Mathf.RoundToInt(markerMaxDistance) + "m"); markerMaxDistance = GUI.HorizontalSlider(new Rect(165f, num2 + 6f, 195f, 18f), markerMaxDistance, 50f, 5000f); } if (tab == 3) { GUI.Label(new Rect(8f, num2, 360f, 24f), "TOOLS", sectionStyle); num2 += 32f; if (HelpButton(new Rect(8f, num2, 112f, 30f), "+5M Credits")) { GiveCredits(5000000u); } if (HelpButton(new Rect(132f, num2, 112f, 30f), "+10M Credits")) { GiveCredits(10000000u); } if (HelpButton(new Rect(256f, num2, 112f, 30f), "+100M Credits")) { GiveCredits(100000000u); } num2 += 38f; if (HelpButton(new Rect(8f, num2, 112f, 30f), "+10 Lunar")) { GiveLunarCoins(10u); } if (HelpButton(new Rect(132f, num2, 112f, 30f), "+100 Lunar")) { GiveLunarCoins(100u); } if (HelpButton(new Rect(256f, num2, 112f, 30f), "+1,000 Lunar")) { GiveLunarCoins(1000u); } num2 += 38f; if (HelpButton(new Rect(8f, num2, 360f, 30f), "Max Player XP / Level")) { MaxPlayerXp(); } num2 += 38f; if (HelpButton(new Rect(8f, num2, 360f, 30f), (Time.unscaledTime <= unlockConfirmUntil) ? "CONFIRM UNLOCK ALL CONTENT" : "Unlock All Content")) { UnlockAllContent(); } num2 += 38f; if (HelpButton(new Rect(8f, num2, 174f, 30f), "Save Position")) { SavePosition(); } if (HelpButton(new Rect(194f, num2, 174f, 30f), "Return to Position")) { ReturnPosition(); } num2 += 42f; if (HelpButton(new Rect(8f, num2, 360f, 30f), "Reset Sliders")) { attackMultiplier = 1f; moveMultiplier = 1f; jumpHeightMultiplier = 1f; damageMultiplier = 1f; extraJumps = 0; status = "Sliders reset"; } num2 += 42f; CharacterBody body = GetBody(); if ((Object)(object)body != (Object)null) { GUI.Label(new Rect(8f, num2, 360f, 42f), "HP " + Mathf.RoundToInt(body.healthComponent.health) + " / " + Mathf.RoundToInt(body.healthComponent.fullHealth) + " Damage " + body.damage.ToString("0.0") + " Speed " + body.moveSpeed.ToString("0.0")); } } if (tab == 4) { GUI.Label(new Rect(8f, num2, 360f, 24f), "SPAWNER", sectionStyle); num2 += 30f; if (HelpButton(new Rect(8f, num2, 174f, 30f), "Items", (spawnerMode == 0) ? onStyle : GUI.skin.button)) { spawnerMode = 0; } if (HelpButton(new Rect(194f, num2, 174f, 30f), "Enemies", (spawnerMode == 1) ? onStyle : GUI.skin.button)) { spawnerMode = 1; if (enemyMasterPrefabs.Count == 0) { RefreshEnemyMasterPrefabs(); } } num2 += 38f; if (spawnerMode == 0) { GUI.Label(new Rect(8f, num2, 75f, 22f), "Search"); itemSearch = GUI.TextField(new Rect(82f, num2, 278f, 24f), itemSearch); num2 += 32f; GUI.Label(new Rect(8f, num2, 130f, 22f), "Quantity " + spawnQuantity); spawnQuantity = Mathf.RoundToInt(GUI.HorizontalSlider(new Rect(140f, num2 + 6f, 220f, 18f), (float)spawnQuantity, 1f, 100f)); num2 += 30f; int num5 = 0; string text = itemSearch.Trim().ToLowerInvariant(); foreach (PickupDef allPickup in PickupCatalog.allPickups) { if (!IsSpawnablePickup(allPickup)) { continue; } string text2 = PickupName(allPickup); if (text.Length <= 0 || text2.ToLowerInvariant().Contains(text) || allPickup.internalName.ToLowerInvariant().Contains(text)) { if (num5 >= 7) { break; } bool flag = selectedPickup == allPickup.pickupIndex; if (HelpButton(new Rect(8f, num2, 360f, 27f), (flag ? "> " : "") + text2)) { selectedPickup = allPickup.pickupIndex; } num2 += 30f; num5++; } } if (num5 == 0) { GUI.Label(new Rect(8f, num2, 360f, 24f), "No matching items or equipment"); num2 += 28f; } PickupDef pickupDef = PickupCatalog.GetPickupDef(selectedPickup); GUI.Label(new Rect(8f, num2, 360f, 24f), "Selected: " + ((pickupDef != null) ? PickupName(pickupDef) : "None")); num2 += 30f; if (HelpButton(new Rect(8f, num2, 174f, 32f), "Give to Player")) { GiveSelectedPickup(); } if (HelpButton(new Rect(194f, num2, 174f, 32f), "Spawn on Ground")) { SpawnSelectedPickup(); } num2 += 38f; if (HelpButton(new Rect(8f, num2, 174f, 30f), "Remove from Player")) { RemoveSelectedPickup(); } if (HelpButton(new Rect(194f, num2, 174f, 30f), "Undo Last Give")) { UndoLastGive(); } } else { GUI.Label(new Rect(8f, num2, 75f, 22f), "Search"); enemySearch = GUI.TextField(new Rect(82f, num2, 278f, 24f), enemySearch); num2 += 32f; GUI.Label(new Rect(8f, num2, 150f, 22f), "Quantity " + enemyQuantity); enemyQuantity = Mathf.RoundToInt(GUI.HorizontalSlider(new Rect(160f, num2 + 6f, 200f, 18f), (float)enemyQuantity, 1f, 25f)); num2 += 30f; GUI.Label(new Rect(8f, num2, 150f, 22f), "Distance " + Mathf.RoundToInt(enemySpawnDistance) + "m"); enemySpawnDistance = GUI.HorizontalSlider(new Rect(160f, num2 + 6f, 200f, 18f), enemySpawnDistance, 5f, 60f); num2 += 32f; string q = enemySearch.Trim().ToLowerInvariant(); List list = enemyMasterPrefabs.Where((GameObject x) => string.IsNullOrEmpty(q) || EnemyDisplayName(x).ToLowerInvariant().Contains(q) || ((Object)x).name.ToLowerInvariant().Contains(q)).Take(40).ToList(); enemyScroll = GUI.BeginScrollView(new Rect(8f, num2, 360f, 190f), enemyScroll, new Rect(0f, 0f, 335f, (float)Mathf.Max(190, list.Count * 30))); for (int num6 = 0; num6 < list.Count; num6++) { GameObject val2 = list[num6]; int num7 = enemyMasterPrefabs.IndexOf(val2); string label = ((num7 == selectedEnemyMaster) ? "> " : "") + (IsBossMaster(val2) ? "[BOSS] " : "") + EnemyDisplayName(val2); if (HelpButton(new Rect(0f, (float)(num6 * 30), 327f, 27f), label, (num7 == selectedEnemyMaster) ? onStyle : GUI.skin.button)) { selectedEnemyMaster = num7; } } GUI.EndScrollView(); num2 += 198f; string text3 = ((enemyMasterPrefabs.Count > 0) ? EnemyDisplayName(enemyMasterPrefabs[Mathf.Clamp(selectedEnemyMaster, 0, enemyMasterPrefabs.Count - 1)]) : "None"); GUI.Label(new Rect(8f, num2, 360f, 24f), "Selected: " + text3); num2 += 30f; if (HelpButton(new Rect(8f, num2, 360f, 34f), "Spawn Selected Enemy")) { SpawnSelectedEnemy(); } num2 += 42f; if (HelpButton(new Rect(8f, num2, 174f, 30f), "Heal Tracked")) { HealTrackedEnemies(); } if (HelpButton(new Rect(194f, num2, 174f, 30f), "Despawn Tracked")) { DespawnTrackedEnemies(); } num2 += 38f; GUI.Label(new Rect(8f, num2, 360f, 42f), "Tracked by Silent55: " + silent55SpawnedMasters.Count + " master(s)"); } } if (tab == 5) { GUI.Label(new Rect(8f, num2, 360f, 24f), "RUN CONTROLS", sectionStyle); num2 += 30f; Run instance = Run.instance; if ((Object)(object)instance != (Object)null) { float num8 = 0f; int num9 = 0; foreach (CombatDirector instances2 in CombatDirector.instancesList) { if ((Object)(object)instances2 != (Object)null && (int)instances2.teamIndex == 2) { num9++; num8 += instances2.monsterCredit; } } GUI.Label(new Rect(8f, num2, 360f, 62f), "Real " + FormatClock(realSessionTime) + " | Scaled " + FormatClock(instance.GetRunStopwatch()) + "\nRate " + difficultyRate.ToString("0.00") + "x | Coefficient " + instance.difficultyCoefficient.ToString("0.00") + "\nEnemy Lv " + instance.ambientLevel.ToString("0.0") + " | Directors " + num9 + " | Credits " + num8.ToString("0")); num2 += 68f; } GUI.Label(new Rect(8f, num2, 170f, 22f), "Difficulty rate " + difficultyRate.ToString("0.00") + "x"); difficultyRate = GUI.HorizontalSlider(new Rect(180f, num2 + 6f, 180f, 18f), difficultyRate, 0f, 50f); num2 += 34f; if (HelpButton(new Rect(8f, num2, 174f, 30f), NetworkServer.active ? "Apply Difficulty" : "Request Difficulty")) { RequestOrApply(1, difficultyRate); } if (HelpButton(new Rect(194f, num2, 174f, 30f), "Freeze Difficulty")) { difficultyRate = 0f; RequestOrApply(1, 0f); } num2 += 42f; GUI.Label(new Rect(8f, num2, 170f, 22f), "Teleporter rate " + teleporterRate.ToString("0.00") + "x"); teleporterRate = GUI.HorizontalSlider(new Rect(180f, num2 + 6f, 180f, 18f), teleporterRate, 0.25f, 10f); num2 += 34f; if (HelpButton(new Rect(8f, num2, 174f, 30f), NetworkServer.active ? "Apply Teleporter" : "Request Teleporter")) { RequestOrApply(2, teleporterRate); } if (HelpButton(new Rect(194f, num2, 174f, 30f), NetworkServer.active ? "Instant Charge" : "Request Instant")) { RequestOrApply(3, 1f); } num2 += 42f; if (HelpButton(new Rect(8f, num2, 360f, 30f), NetworkServer.active ? ("Shrine of Chance: " + (guaranteedShrineChance ? "GUARANTEED" : "NORMAL")) : "REQUEST GUARANTEED SHRINES")) { ToggleOrRequestShrineChance(); } num2 += 38f; if (HelpButton(new Rect(8f, num2, 174f, 30f), "Reset Run Rates")) { difficultyRate = 1f; teleporterRate = 1f; RequestOrApply(1, 1f); RequestOrApply(2, 1f); } autoApproveRequests = NetworkServer.active && GUI.Toggle(new Rect(194f, num2, 174f, 30f), autoApproveRequests, "Auto-approve requests"); num2 += 42f; GUI.Label(new Rect(8f, num2, 360f, 24f), "ENEMY SPAWN PRESSURE", sectionStyle); num2 += 28f; if (HelpButton(new Rect(8f, num2, 82f, 30f), "Normal", (spawnPressureMode == 0) ? onStyle : GUI.skin.button)) { spawnPressureMode = 0; } if (HelpButton(new Rect(98f, num2, 82f, 30f), "2x", (spawnPressureMode == 1) ? onStyle : GUI.skin.button)) { spawnPressureMode = 1; } if (HelpButton(new Rect(188f, num2, 82f, 30f), "4x", (spawnPressureMode == 2) ? onStyle : GUI.skin.button)) { spawnPressureMode = 2; } if (HelpButton(new Rect(278f, num2, 82f, 30f), "8x", (spawnPressureMode == 3) ? onStyle : GUI.skin.button)) { spawnPressureMode = 3; } num2 += 38f; GUI.Label(new Rect(8f, num2, 360f, 24f), "RUN CHECKPOINT", sectionStyle); num2 += 28f; if (HelpButton(new Rect(8f, num2, 174f, 30f), "Create Checkpoint")) { CreateCheckpoint(); } if (HelpButton(new Rect(194f, num2, 174f, 30f), "Load Checkpoint")) { LoadCheckpoint(); } num2 += 38f; if (HelpButton(new Rect(8f, num2, 174f, 30f), "Save and Quit")) { SaveAndQuit(); } if (HelpButton(new Rect(194f, num2, 174f, 30f), "Delete Checkpoint")) { DeleteCheckpoint(); } num2 += 42f; GUI.Label(new Rect(8f, num2, 360f, 28f), NetworkServer.active ? "Mode: Host / single-player" : "Mode: Client request-only"); num2 += 30f; if (NetworkServer.active && pendingRequest != null) { GUI.Box(new Rect(8f, num2, 360f, 92f), ""); GUI.Label(new Rect(16f, num2 + 8f, 344f, 22f), pendingRequest.requester + " requests:"); GUI.Label(new Rect(16f, num2 + 30f, 344f, 22f), ActionName(pendingRequest.action, pendingRequest.value)); if (HelpButton(new Rect(16f, num2 + 57f, 158f, 27f), "Approve")) { ResolvePending(approve: true); } if (HelpButton(new Rect(190f, num2 + 57f, 158f, 27f), "Reject")) { ResolvePending(approve: false); } } num2 += 42f; GUI.Label(new Rect(8f, num2, 360f, 24f), "ENEMY CONTROL", sectionStyle); num2 += 28f; practiceFreeze = ToggleButton(new Rect(8f, num2, 174f, 32f), "Stop Movement + Freeze", practiceFreeze); practiceDisableAI = ToggleButton(new Rect(194f, num2, 174f, 32f), "Disable Enemy AI", practiceDisableAI); num2 += 39f; if (HelpButton(new Rect(8f, num2, 174f, 30f), "Resume Enemies")) { ResumeEnemies(); } if (HelpButton(new Rect(194f, num2, 174f, 30f), "Clear Hostile Projectiles")) { ClearHostileProjectiles(); } num2 += 38f; } if (tab == 6) { EnsureCharacterLoadout(); GUI.Label(new Rect(8f, num2, 360f, 24f), "OP LOADOUT", sectionStyle); num2 += 28f; GUI.Label(new Rect(8f, num2, 360f, 24f), "Current character: " + CurrentCharacterName()); num2 += 30f; if (HelpButton(new Rect(8f, num2, 360f, 34f), NetworkServer.active ? "APPLY OP LOADOUT" : "REQUEST OP LOADOUT")) { ApplyOrRequestCharacterLoadout(); } num2 += 42f; if (HelpButton(new Rect(8f, num2, 360f, 34f), "REMOVE SILENT55 LOADOUT", dangerButtonStyle)) { RemoveSilent55Loadout(); } num2 += 42f; if (HelpButton(new Rect(8f, num2, 360f, 30f), NetworkServer.active ? ("Empowered Summons: " + (empoweredSummons ? "ON" : "OFF")) : "REQUEST EMPOWERED SUMMONS")) { ToggleOrRequestEmpoweredSummons(); } num2 += 38f; GUI.Label(new Rect(8f, num2, 75f, 22f), "Search"); loadoutSearch = GUI.TextField(new Rect(82f, num2, 278f, 24f), loadoutSearch); num2 += 31f; GUI.Label(new Rect(8f, num2, 130f, 22f), "Add quantity " + loadoutQuantity); loadoutQuantity = Mathf.RoundToInt(GUI.HorizontalSlider(new Rect(145f, num2 + 6f, 215f, 18f), (float)loadoutQuantity, 1f, 100f)); num2 += 30f; int num10 = 0; string text4 = loadoutSearch.Trim().ToLowerInvariant(); if (text4.Length > 0) { foreach (PickupDef allPickup2 in PickupCatalog.allPickups) { if (!IsSpawnablePickup(allPickup2)) { continue; } string text5 = PickupName(allPickup2); if (text5.ToLowerInvariant().Contains(text4) || allPickup2.internalName.ToLowerInvariant().Contains(text4)) { if (num10 >= 3) { break; } if (HelpButton(new Rect(8f, num2, 360f, 25f), text5)) { selectedPickup = allPickup2.pickupIndex; status = "Selected " + text5; } num2 += 28f; num10++; } } } PickupDef pickupDef2 = PickupCatalog.GetPickupDef(selectedPickup); GUI.Label(new Rect(8f, num2, 360f, 22f), "Selected: " + ((pickupDef2 != null) ? PickupName(pickupDef2) : "None")); num2 += 27f; if (HelpButton(new Rect(8f, num2, 112f, 28f), "Add Item")) { AddSelectedToLoadout(); } if (HelpButton(new Rect(128f, num2, 112f, 28f), "Clear")) { ClearCharacterLoadout(); } if (HelpButton(new Rect(248f, num2, 120f, 28f), "Restore Default")) { RestoreDefaultLoadout(); } num2 += 36f; string key = CurrentCharacterKey(); List list2 = (opLoadouts.ContainsKey(key) ? opLoadouts[key] : null); if (list2 == null || list2.Count == 0) { GUI.Label(new Rect(8f, num2, 360f, 24f), "No items saved for this character."); } else { int num11 = -1; loadoutScroll = GUI.BeginScrollView(new Rect(8f, num2, 360f, 105f), loadoutScroll, new Rect(0f, 0f, 335f, (float)(list2.Count * 27))); for (int num12 = 0; num12 < list2.Count; num12++) { PickupDef pickupDef3 = PickupCatalog.GetPickupDef(list2[num12].pickup); GUI.Label(new Rect(0f, (float)(num12 * 27), 265f, 24f), ((pickupDef3 != null) ? PickupName(pickupDef3) : "Missing") + " x" + list2[num12].count); if (HelpButton(new Rect(272f, (float)(num12 * 27), 55f, 23f), "Remove")) { num11 = num12; } } GUI.EndScrollView(); if (num11 >= 0) { RemoveLoadoutEntry(num11); } } } if (tab == 7) { GUI.Label(new Rect(8f, num2, 360f, 24f), "RUN PRESETS", sectionStyle); num2 += 30f; string[] array2 = new string[5] { "Vanilla Plus", "Practice", "OP Showcase", "Extreme Challenge", "Drone Commander" }; foreach (string text6 in array2) { if (HelpButton(new Rect(8f, num2, 360f, 30f), "Apply " + text6)) { ApplyPreset(BuiltInPreset(text6), text6); } num2 += 36f; } num2 += 8f; GUI.Label(new Rect(8f, num2, 360f, 24f), "CUSTOM PRESETS", sectionStyle); num2 += 28f; GUI.Label(new Rect(8f, num2, 360f, 22f), "Select custom slot"); num2 += 28f; int num14 = customPresetSlot; if (HelpButton(new Rect(8f, num2, 112f, 32f), "Slot 1", (customPresetSlot == 1) ? onStyle : GUI.skin.button)) { customPresetSlot = 1; } if (HelpButton(new Rect(128f, num2, 112f, 32f), "Slot 2", (customPresetSlot == 2) ? onStyle : GUI.skin.button)) { customPresetSlot = 2; } if (HelpButton(new Rect(248f, num2, 112f, 32f), "Slot 3", (customPresetSlot == 3) ? onStyle : GUI.skin.button)) { customPresetSlot = 3; } num2 += 40f; string value = ((BaseUnityPlugin)this).Config.Bind("Presets", "Slot" + customPresetSlot + "Name", "Custom Slot " + customPresetSlot, (ConfigDescription)null).Value; if (num14 != customPresetSlot || presetLoadedSlot != customPresetSlot) { presetName = value; presetLoadedSlot = customPresetSlot; presetOverwriteConfirmUntil = 0f; } GUI.Label(new Rect(8f, num2, 95f, 22f), "Name"); presetName = GUI.TextField(new Rect(105f, num2, 255f, 24f), presetName); num2 += 34f; if (HelpButton(new Rect(8f, num2, 112f, 30f), "Apply Slot")) { ApplyCustomPreset(customPresetSlot); } string label2 = ((Time.unscaledTime < presetOverwriteConfirmUntil) ? "Confirm Save" : (CustomPresetExists(customPresetSlot) ? "Overwrite" : "Save Current")); if (HelpButton(new Rect(128f, num2, 112f, 30f), label2)) { if (CustomPresetExists(customPresetSlot) && Time.unscaledTime >= presetOverwriteConfirmUntil) { presetOverwriteConfirmUntil = Time.unscaledTime + 4f; status = "Press Confirm Save within 4 seconds to overwrite slot " + customPresetSlot; } else { SaveCustomPreset(customPresetSlot); } } if (HelpButton(new Rect(248f, num2, 112f, 30f), "Reset Slot")) { ResetCustomPreset(customPresetSlot); } num2 += 40f; GUI.Label(new Rect(8f, num2, 360f, 58f), "Presets store player, combat, marker, run, shrine, summon, Lock On, Rapid Fire, and Acrid settings."); } if (tab == 8) { GUI.Label(new Rect(8f, num2, 360f, 28f), "MULTIPLAYER", sectionStyle); num2 += 34f; GUI.Label(new Rect(8f, num2, 360f, 44f), NetworkServer.active ? "Host authority active. Select a connected player below." : "Client mode. Recovery actions must be performed by the host."); num2 += 50f; ReadOnlyCollection instances = PlayerCharacterMasterController.instances; if (instances.Count == 0) { GUI.Label(new Rect(8f, num2, 360f, 24f), "No connected players found"); num2 += 30f; } else { recoveryScroll = GUI.BeginScrollView(new Rect(8f, num2, 360f, 135f), recoveryScroll, new Rect(0f, 0f, 335f, (float)(instances.Count * 31))); for (int num15 = 0; num15 < instances.Count; num15++) { PlayerCharacterMasterController val3 = instances[num15]; string text7 = (((Object)(object)val3 != (Object)null && (Object)(object)val3.master != (Object)null && val3.master.hasBody) ? "ALIVE" : "ELIMINATED"); if (HelpButton(new Rect(0f, (float)(num15 * 31), 327f, 27f), ((num15 == selectedRecoveryPlayer) ? "> " : "") + RecoveryPlayerName(val3) + " [" + text7 + "]", (num15 == selectedRecoveryPlayer) ? onStyle : GUI.skin.button)) { selectedRecoveryPlayer = num15; } } GUI.EndScrollView(); num2 += 144f; } GUI.Label(new Rect(8f, num2, 360f, 24f), "PLAYER RECOVERY", sectionStyle); num2 += 28f; if (HelpButton(new Rect(8f, num2, 174f, 30f), "Revive Selected")) { ReviveSelectedPlayer(); } if (HelpButton(new Rect(194f, num2, 174f, 30f), "Revive Everyone")) { ReviveAllPlayers(); } num2 += 38f; if (HelpButton(new Rect(8f, num2, 174f, 30f), "Heal Selected")) { HealSelectedPlayer(); } if (HelpButton(new Rect(194f, num2, 174f, 30f), "Clear Selected Debuffs")) { ClearSelectedPlayerDebuffs(); } num2 += 38f; if (HelpButton(new Rect(8f, num2, 360f, 30f), "Teleport Selected to Host")) { TeleportSelectedToHost(); } num2 += 42f; GUI.Label(new Rect(8f, num2, 360f, 62f), "Recovery controls affect only the selected connected player. Revive actions apply only to eliminated players."); } if (tab == 9) { GUI.Label(new Rect(8f, num2, 360f, 24f), "SAFETY AND PERFORMANCE", sectionStyle); num2 += 32f; GUI.Label(new Rect(8f, num2, 360f, 60f), "Active bodies: " + cachedBodies + "\nProjectiles: " + cachedProjectiles + " | Pickup droplets: " + cachedPickups); num2 += 68f; if (HelpButton(new Rect(8f, num2, 360f, 34f), "COLLECT STAGE DROPS", cyanButtonStyle)) { CollectStageDrops(); } num2 += 42f; GUI.Label(new Rect(8f, num2, 360f, 45f), "Moves eligible item, equipment, and money-pack objects to your player so the game collects them normally."); num2 += 50f; if (HelpButton(new Rect(8f, num2, 360f, 34f), "FPS SAFE MODE")) { markers = false; showMarkerDistance = false; projectileTracking = false; spawnPressureMode = 0; practiceFreeze = false; practiceDisableAI = false; RefreshPracticeCache(); ApplyPracticeState(force: true); status = "FPS Safe Mode applied"; } num2 += 42f; string label3 = ((Time.unscaledTime < cleanupConfirmUntil) ? "CONFIRM EMERGENCY CLEANUP" : "EMERGENCY CLEANUP"); if (HelpButton(new Rect(8f, num2, 360f, 34f), label3, dangerButtonStyle)) { if (Time.unscaledTime < cleanupConfirmUntil) { cleanupConfirmUntil = 0f; EmergencyCleanup(); } else { cleanupConfirmUntil = Time.unscaledTime + 4f; status = "Press Emergency Cleanup again within 4 seconds"; } } num2 += 42f; if (HelpButton(new Rect(8f, num2, 360f, 34f), "RESET ENEMY CONTROLS")) { practiceFreeze = false; practiceDisableAI = false; practiceFullPause = false; RefreshPracticeCache(); ApplyPracticeState(force: true); lastPracticeFreeze = false; lastPracticeDisableAI = false; lastPracticeFullPause = false; status = "Enemy controls reset"; } num2 += 44f; GUI.Label(new Rect(8f, num2, 360f, 70f), "Collect Stage Drops preserves pickups. Emergency Cleanup is destructive and removes pickup droplets plus ownerless projectiles after confirmation."); } GUI.EndGroup(); GUI.EndGroup(); float num16 = ((Rect)(ref window)).height - 88f; if (!string.IsNullOrEmpty(GUI.tooltip)) { GUI.Box(new Rect(184f, num16 - 48f, ((Rect)(ref window)).width - 196f, 44f), ""); GUIStyle val4 = new GUIStyle(GUI.skin.label) { fontSize = 15, alignment = (TextAnchor)4, wordWrap = true }; GUI.Label(new Rect(194f, num16 - 43f, ((Rect)(ref window)).width - 216f, 36f), GUI.tooltip, val4); } GUI.Box(new Rect(184f, num16, ((Rect)(ref window)).width - 196f, 40f), ""); GUIStyle val5 = new GUIStyle(GUI.skin.label) { fontSize = 15, fontStyle = (FontStyle)1, alignment = (TextAnchor)4 }; GUI.Label(new Rect(194f, num16 + 9f, ((Rect)(ref window)).width - 216f, 24f), "STATUS " + status, val5); GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref window)).width - 60f, 58f)); } private void OnDestroy() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown practiceFreeze = false; practiceDisableAI = false; practiceFullPause = false; if (NetworkServer.active) { RefreshPracticeCache(); ApplyPracticeState(force: true); } RestoreAcridEpidemic(); DisableLockTracker(); foreach (HoldoutZoneController hookedZone in hookedZones) { if ((Object)(object)hookedZone != (Object)null) { hookedZone.calcChargeRate -= new CalcChargeRateDelegate(ScaleChargeRate); } } hookedZones.Clear(); empoweredMinions.Clear(); if ((Object)(object)trackedHealth != (Object)null) { trackedHealth.godMode = false; } RestoreStats(); } } }