Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of signal decoder v1.0.4
plugins/SignalDecoder/SignalDecoder.dll
Decompiled 2 years ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Logging; using EntityStates; using HG; using HG.Reflection; using HarmonyLib; using IL.RoR2; using IL.RoR2.CharacterAI; using IL.RoR2.UI.LogBook; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using MonoMod.Utils; using On.RoR2; using On.RoR2.CharacterAI; using On.RoR2.UI.LogBook; using On.RoR2.UI.MainMenu; using R2API; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.EntitlementManagement; using RoR2.ExpansionManagement; using RoR2.Items; using RoR2.Orbs; using RoR2.UI; using RoR2.UI.LogBook; using RoR2.UI.MainMenu; using RoR2BepInExPack; using SignalDecoder.Components; using SignalDecoder.Components.Tablet; using SignalDecoder.Components.TabletDisplay; using SignalDecoder.Components.UI; using SignalDecoder.Content; using SignalDecoder.Content.EntityStates.Finale; using SignalDecoder.Content.EntityStates.Tablet; using SignalDecoder.Content.EntityStates.Tablet.ancientloft; using SignalDecoder.Content.EntityStates.Tablet.foggyswamp; using SignalDecoder.Content.EntityStates.Tablet.goolake; using SignalDecoder.Content.EntityStates.Tablet.rootjungle; using SignalDecoder.Content.EntityStates.Tablet.wispgraveyard; using SignalDecoder.Content.EntityStates.TabletDisplay; using SignalDecoder.Encryption; using SignalDecoder.PortalDialer; using TMPro; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyCompany("SignalDecoder")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+58722924d9887befbf1c6bfd6af9354cffef9264")] [assembly: AssemblyProduct("SignalDecoder")] [assembly: AssemblyTitle("SignalDecoder")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class IsReadOnlyAttribute : Attribute { } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SignalDecoder { internal static class CharacterDeathHook { public delegate void CharacterDeathHookDelegate(CharacterMaster characterMaster, ref bool preventGameOver); [CompilerGenerated] private static class <>O { public static Manipulator <0>__CharacterMaster_OnBodyDeath; } public static event CharacterDeathHookDelegate OnDeath; public static void Initialize() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown object obj = <>O.<0>__CharacterMaster_OnBodyDeath; if (obj == null) { Manipulator val = CharacterMaster_OnBodyDeath; <>O.<0>__CharacterMaster_OnBodyDeath = val; obj = (object)val; } CharacterMaster.OnBodyDeath += (Manipulator)obj; } public static void Cleanup() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown object obj = <>O.<0>__CharacterMaster_OnBodyDeath; if (obj == null) { Manipulator val = CharacterMaster_OnBodyDeath; <>O.<0>__CharacterMaster_OnBodyDeath = val; obj = (object)val; } CharacterMaster.OnBodyDeath -= (Manipulator)obj; } private static void CharacterMaster_OnBodyDeath(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld<CharacterMaster>(x, "preventGameOver") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<bool, CharacterMaster, bool>>((Func<bool, CharacterMaster, bool>)delegate(bool preventGameOver, CharacterMaster instance) { CharacterDeathHook.OnDeath?.Invoke(instance, ref preventGameOver); return preventGameOver; }); } } } internal static class CharacterEvents { public delegate void CharacterBuffStacksChangedDelegate(CharacterBody body, BuffIndex buffType, int newCount); [CompilerGenerated] private static class <>O { public static hook_SetBuffCount <0>__CharacterBody_SetBuffCount; } public static event CharacterBuffStacksChangedDelegate CharacterBuffStacksChanged; public static void Initialize() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown object obj = <>O.<0>__CharacterBody_SetBuffCount; if (obj == null) { hook_SetBuffCount val = CharacterBody_SetBuffCount; <>O.<0>__CharacterBody_SetBuffCount = val; obj = (object)val; } CharacterBody.SetBuffCount += (hook_SetBuffCount)obj; } public static void Cleanup() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown object obj = <>O.<0>__CharacterBody_SetBuffCount; if (obj == null) { hook_SetBuffCount val = CharacterBody_SetBuffCount; <>O.<0>__CharacterBody_SetBuffCount = val; obj = (object)val; } CharacterBody.SetBuffCount -= (hook_SetBuffCount)obj; } private static void CharacterBody_SetBuffCount(orig_SetBuffCount orig, CharacterBody self, BuffIndex buffType, int newCount) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, buffType, newCount); CharacterEvents.CharacterBuffStacksChanged?.Invoke(self, buffType, newCount); } } internal static class HookLogHider { private delegate bool orig_HookWatcher_LogMethod(MemberInfo originalMethod, Assembly hookOwnerAssembly, bool added); private static bool _failedToApplyHook; private static Hook _disableLogHook; private static MemberInfo _lastLoggedOwnedMethod; public static bool HideHookLogs { get { if (!_failedToApplyHook && _disableLogHook != null && _disableLogHook.IsValid) { return _disableLogHook.IsApplied; } return false; } set { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown if (_failedToApplyHook || value == HideHookLogs) { return; } if (value) { if (_disableLogHook == null) { try { _disableLogHook = new Hook((MethodBase)typeof(RoR2BepInExPack).Assembly.GetType("RoR2BepInExPack.HookWatcher").GetMethod("LogMethod", BindingFlags.Static | BindingFlags.NonPublic), (Delegate)new Func<orig_HookWatcher_LogMethod, MemberInfo, Assembly, bool, bool>(disableHookLog)); return; } catch (Exception) { if (_disableLogHook != null) { _disableLogHook.Dispose(); _disableLogHook = null; } _failedToApplyHook = true; ManualLogSource logSource = PuzzlePlugin.LogSource; if (logSource != null) { logSource.LogError((object)"Failed to apply HookWatcher patch"); } return; } } _disableLogHook.Apply(); } else { Hook disableLogHook = _disableLogHook; if (disableLogHook != null) { disableLogHook.Undo(); } } } } private static bool disableHookLog(orig_HookWatcher_LogMethod orig, MemberInfo originalMethod, Assembly hookOwnerAssembly, bool added) { if (hookOwnerAssembly == Assembly.GetExecutingAssembly()) { _lastLoggedOwnedMethod = originalMethod; return true; } if (_lastLoggedOwnedMethod == originalMethod && Regex.IsMatch(hookOwnerAssembly.GetName().Name, "^DMDASM\\.(?:[A-F]|[\\d])+\\.Cecil$")) { return true; } _lastLoggedOwnedMethod = null; return orig(originalMethod, hookOwnerAssembly, added); } } public readonly struct ItemStack { public readonly ItemDef Item; public readonly int Count; public ItemStack(ItemDef item, int count) { Item = item; Count = count; } } internal static class LogbookEntryRestrictor { [CompilerGenerated] private static class <>O { public static Manipulator <0>__LogBookController_BuildCategories; } public static void Initailize() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown object obj = <>O.<0>__LogBookController_BuildCategories; if (obj == null) { Manipulator val = LogBookController_BuildCategories; <>O.<0>__LogBookController_BuildCategories = val; obj = (object)val; } LogBookController.BuildCategories += (Manipulator)obj; } public static void Cleanup() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown object obj = <>O.<0>__LogBookController_BuildCategories; if (obj == null) { Manipulator val = LogBookController_BuildCategories; <>O.<0>__LogBookController_BuildCategories = val; obj = (object)val; } LogBookController.BuildCategories -= (Manipulator)obj; } private static void LogBookController_BuildCategories(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown ILCursor val = new ILCursor(il); MethodReference method2 = default(MethodReference); while (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, ref method2) && isEntriesBuilderMethod(method2) })) { val.EmitDelegate<Func<Entry[], Entry[]>>((Func<Entry[], Entry[]>)delegate(Entry[] entries) { List<Entry> list = new List<Entry>(entries.Length); foreach (Entry val2 in entries) { if (isValidEntry(val2)) { list.Add(val2); } } return (list.Count != entries.Length) ? list.ToArray() : entries; }); } static bool isEntriesBuilderMethod(MethodReference method) { if (Regex.IsMatch(((MemberReference)method).Name, "^Build\\w*Entries$")) { return Extensions.Is((MemberReference)(object)method.ReturnType, (MemberInfo)typeof(Entry[])); } return false; } } private static bool isValidEntry(Entry entry) { switch (entry.nameToken) { case "PUZZLE_CLUE_ITEM_NAME": case "ITEM_CRITGLASSES_NAME": case "ITEM_SPRINTBONUS_NAME": case "ITEM_SPRINTARMOR_NAME": case "GRANDPARENT_BODY_NAME": case "MAP_ANCIENTLOFT_TITLE": case "ITEM_WARDONLEVEL_NAME": case "ITEM_SQUIDTURRET_NAME": case "ITEM_GHOSTONKILL_NAME": case "ITEM_MOREMISSILE_NAME": case "ITEM_SHOCKNEARBY_NAME": case "ITEM_ARTIFACTKEY_NAME": case "MAP_SNOWYFOREST_TITLE": case "ITEM_BEETLEGLAND_NAME": case "ITEM_SCRAPYELLOW_NAME": case "MAP_GOLEMPLAINS_TITLE": case "ITEM_MISSILEVOID_NAME": case "ITEM_LUNARDAGGER_NAME": case "BEETLEGUARD_BODY_NAME": case "MAP_SULFURPOOLS_TITLE": case "EQUIPMENT_METEOR_NAME": case "HERMIT_CRAB_BODY_NAME": case "CLAYBRUISER_BODY_NAME": case "BEETLEQUEEN_BODY_NAME": case "GRAVEKEEPER_BODY_NAME": case "GREATERWISP_BODY_NAME": case "ITEM_REPULSIONARMORPLATE_NAME": case "ITEM_BONUSGOLDPACKONKILL_NAME": case "ITEM_ARMORREDUCTIONONHIT_NAME": case "ITEM_MONSTERSONSHRINEUSE_NAME": case "EQUIPMENT_COMMANDMISSILE_NAME": case "EQUIPMENT_LIFESTEALONHIT_NAME": case "EQUIPMENT_PASSIVEHEALING_NAME": case "EQUIPMENT_VENDINGMACHINE_NAME": case "ACHIEVEMENT_LOGCOLLECTOR_NAME": case "ACHIEVEMENT_MAGEFASTBOSS_NAME": case "ITEM_ATTACKSPEEDANDMOVESPEED_NAME": case "ITEM_ENERGIZEDONEQUIPMENTUSE_NAME": case "ITEM_LUNARPRIMARYREPLACEMENT_NAME": case "ITEM_LUNARSPECIALREPLACEMENT_NAME": case "ITEM_LUNARUTILITYREPLACEMENT_NAME": case "ACHIEVEMENT_FAILSHRINECHANCE_NAME": case "ACHIEVEMENT_KILLELITEMONSTER_NAME": case "ACHIEVEMENT_KILLTOTALENEMIES_NAME": case "ACHIEVEMENT_COMPLETE20STAGES_NAME": case "ACHIEVEMENT_MAXHEALINGSHRINE_NAME": case "ITEM_BARRIERONKILL_NAME": case "ITEM_HEALWHILESAFE_NAME": case "ITEM_ROBOBALLBUDDY_NAME": case "ITEM_HEALINGPOTION_NAME": case "ITEM_TREASURECACHE_NAME": case "MAP_WISPGRAVEYARD_TITLE": case "MAP_SHIPGRAVEYARD_TITLE": case "ITEM_TPHEALINGNOVA_NAME": case "ITEM_SLOWONHITVOID_NAME": case "ITEM_EXTRALIFEVOID_NAME": case "ITEM_RANDOMLYLUNAR_NAME": case "EQUIPMENT_RECYCLER_NAME": case "LUNAREXPLODER_BODY_NAME": case "CLAYGRENADIER_BODY_NAME": case "MEGACONSTRUCT_BODY_NAME": case "MAP_ARTIFACTWORLD_TITLE": case "ITEM_BEAR_NAME": case "ITEM_HOOF_NAME": case "ITEM_SEED_NAME": case "WISP_BODY_NAME": case "BELL_BODY_NAME": case "SCAV_BODY_NAME": case "MAP_MOON_TITLE": case "ENGI_BODY_NAME": case "MAGE_BODY_NAME": case "MERC_BODY_NAME": case "ITEM_BLEEDONHIT_NAME": case "ITEM_CRITDAMAGE_NAME": case "ITEM_FLATHEALTH_NAME": case "ITEM_HEADHUNTER_NAME": case "MAP_GOLDSHORES_TITLE": case "ITEM_GOLDONHURT_NAME": case "ITEM_HEALONCRIT_NAME": case "ITEM_NOVAONHEAL_NAME": case "ITEM_SCRAPWHITE_NAME": case "ITEM_SCRAPGREEN_NAME": case "ITEM_STICKYBOMB_NAME": case "ITEM_SHINYPEARL_NAME": case "ITEM_SPRINTWISP_NAME": case "MAP_FROZENWALL_TITLE": case "ITEM_CLOVERVOID_NAME": case "ITEM_REPEATHEAL_NAME": case "ITEM_SHIELDONLY_NAME": case "EQUIPMENT_TONIC_NAME": case "EQUIPMENT_FRUIT_NAME": case "LUNARGOLEM_BODY_NAME": case "VOIDJAILER_BODY_NAME": case "RAILGUNNER_BODY_NAME": case "MAP_BLACKBEACH_TITLE": case "MAP_FOGGYSWAMP_TITLE": case "MAP_ROOTJUNGLE_TITLE": case "ITEM_BOSSDAMAGEBONUS_NAME": case "ITEM_STUNCHANCEONHIT_NAME": case "ITEM_CRITGLASSESVOID_NAME": case "ITEM_MOVESPEEDONKILL_NAME": case "ITEM_INCREASEHEALING_NAME": case "EQUIPMENT_GUMMYCLONE_NAME": case "ITEM_KILLELITEFRENZY_NAME": case "ITEM_NOVAONLOWHEALTH_NAME": case "EQUIPMENT_BURNNEARBY_NAME": case "EQUIPMENT_BOSSHUNTER_NAME": case "EQUIPMENT_TEAMWARCRY_NAME": case "LEMURIANBRUISER_BODY_NAME": case "ACHIEVEMENT_LOOPONCE_NAME": case "ACHIEVEMENT_ENGIARMY_NAME": case "ACHIEVEMENT_FREEMAGE_NAME": case "ITEM_CROWBAR_NAME": case "ITEM_SYRINGE_NAME": case "IMPBOSS_BODY_NAME": case "ITEM_FEATHER_NAME": case "ITEM_ICERING_NAME": case "CAPTAIN_BODY_NAME": case "HERETIC_BODY_NAME": case "ITEM_MISSILE_NAME": case "ITEM_PHASING_NAME": case "VULTURE_BODY_NAME": case "BROTHER_BODY_NAME": case "VAGRANT_BODY_NAME": case "MAP_GOOLAKE_TITLE": case "TOOLBOT_BODY_NAME": case "TREEBOT_BODY_NAME": case "BANDIT2_BODY_NAME": case "ITEM_FIREWORK_NAME": case "ITEM_FIRERING_NAME": case "ITEM_SCRAPRED_NAME": case "ITEM_MUSHROOM_NAME": case "CLAYBOSS_BODY_NAME": case "HUNTRESS_BODY_NAME": case "ITEM_INFUSION_NAME": case "ITEM_BEHEMOTH_NAME": case "ITEM_TALISMAN_NAME": case "ITEM_BEARVOID_NAME": case "ITEM_LUNARSUN_NAME": case "EQUIPMENT_BFG_NAME": case "LEMURIAN_BODY_NAME": case "MAP_DAMPCAVE_TITLE": case "MAP_VOIDRAID_TITLE": case "COMMANDO_BODY_NAME": case "ITEM_FRAGILEDAMAGEBONUS_NAME": case "ITEM_CHAINLIGHTNINGVOID_NAME": case "ITEM_EXPLODEONDEATHVOID_NAME": case "ITEM_FOCUSEDCONVERGENCE_NAME": case "EQUIPMENT_MULTISHOPCARD_NAME": case "ACHIEVEMENT_ATTACKSPEED_NAME": case "ACHIEVEMENT_BURNTODEATH_NAME": case "ACHIEVEMENT_CLEANUPDUTY_NAME": case "ITEM_IGNITEONKILL_NAME": case "ITEM_BOUNCENEARBY_NAME": case "ITEM_DRONEWEAPONS_NAME": case "ITEM_LASERTURBINE_NAME": case "ITEM_LUNARTRINKET_NAME": case "ITEM_MUSHROOMVOID_NAME": case "VOIDINFESTOR_BODY_NAME": case "MINIMUSHROOM_BODY_NAME": case "VOIDSURVIVOR_BODY_NAME": case "ITEM_LUNARBADLUCK_NAME": case "EQUIPMENT_CLEANSE_NAME": case "EQUIPMENT_GATEWAY_NAME": case "EQUIPMENT_GOLDGAT_NAME": case "EQUIPMENT_JETPACK_NAME": case "EQUIPMENT_MOLOTOV_NAME": case "EQUIPMENT_SCANNER_NAME": case "ROBOBALLBOSS_BODY_NAME": case "FLYINGVERMIN_BODY_NAME": case "ROBOBALLMINI_BODY_NAME": case "VOIDBARNACLE_BODY_NAME": case "VOIDRAIDCRAB_BODY_NAME": case "VOIDMEGACRAB_BODY_NAME": case "ELECTRICWORM_BODY_NAME": case "MAP_MYSTERYSPACE_TITLE": case "ITEM_MEDKIT_NAME": case "ITEM_THORNS_NAME": case "PARENT_BODY_NAME": case "ITEM_CLOVER_NAME": case "ITEM_DAGGER_NAME": case "ITEM_ICICLE_NAME": case "BEETLE_BODY_NAME": case "VERMIN_BODY_NAME": case "MAP_BAZAAR_TITLE": case "LOADER_BODY_NAME": case "ITEM_NEARBYDAMAGEBONUS_NAME": case "ITEM_ATTACKSPEEDONCRIT_NAME": case "ACHIEVEMENT_HARDHITTER_NAME": case "ITEM_EQUIPMENTMAGAZINE_NAME": case "EQUIPMENT_FIREBALLDASH_NAME": case "ITEM_REGENERATINGSCRAP_NAME": case "ITEM_SPRINTOUTOFCOMBAT_NAME": case "ITEM_WARCRYONMULTIKILL_NAME": case "ITEM_BARRIERONOVERHEAL_NAME": case "ITEM_SIPHONONLOWHEALTH_NAME": case "ITEM_TITANGOLDDURINGTP_NAME": case "ITEM_AUTOCASTEQUIPMENT_NAME": case "ITEM_TREASURECACHEVOID_NAME": case "ITEM_ELEMENTALRINGVOID_NAME": case "SUPERROBOBALLBOSS_BODY_NAME": case "ACHIEVEMENT_STAYALIVE1_NAME": case "ACHIEVEMENT_DIE20TIMES_NAME": case "ITEM_OUTOFCOMBATARMOR_NAME": case "ITEM_VOIDMEGACRABITEM_NAME": case "ITEM_RANDOMDAMAGEZONE_NAME": case "EQUIPMENT_CRIPPLEWARD_NAME": case "EQUIPMENT_DRONEBACKUP_NAME": case "ACHIEVEMENT_DIE5TIMES_NAME": case "ACHIEVEMENT_MOVESPEED_NAME": case "ACHIEVEMENT_BEATARENA_NAME": case "ITEM_PERSONALSHIELD_NAME": case "ITEM_CHAINLIGHTNING_NAME": case "EQUIPMENT_LIGHTNING_NAME": case "ITEM_EXPLODEONDEATH_NAME": case "ITEM_STRENGTHENBURN_NAME": case "EQUIPMENT_GAINARMOR_NAME": case "ITEM_IMMUNETODEBUFF_NAME": case "ITEM_FIREBALLSONHIT_NAME": case "ITEM_BLEEDONHITVOID_NAME": case "EQUIPMENT_BLACKHOLE_NAME": case "EQUIPMENT_CRITONUSE_NAME": case "EQUIPMENT_SAWMERANG_NAME": case "MINORCONSTRUCT_BODY_NAME": case "ITEM_SECONDARYSKILLMAGAZINE_NAME": case "ITEM_RANDOMEQUIPMENTTRIGGER_NAME": case "ACHIEVEMENT_CARRYLUNARITEMS_NAME": case "ACHIEVEMENT_USETHREEPORTALS_NAME": case "ITEM_TOOTH_NAME": case "ITEM_KNURL_NAME": case "ITEM_PEARL_NAME": case "BISON_BODY_NAME": case "GOLEM_BODY_NAME": case "TITAN_BODY_NAME": case "CROCO_BODY_NAME": case "MAP_LAKES_TITLE": case "MAP_ARENA_TITLE": case "MAP_LIMBO_TITLE": case "ITEM_BANDOLIER_NAME": case "ITEM_DEATHMARK_NAME": case "ITEM_FREECHEST_NAME": case "ITEM_FALLBOOTS_NAME": case "JELLYFISH_BODY_NAME": case "NULLIFIER_BODY_NAME": case "ITEM_JUMPBOOST_NAME": case "ITEM_SLOWONHIT_NAME": case "ITEM_ALIENHEAD_NAME": case "ACIDLARVA_BODY_NAME": case "ITEM_EXTRALIFE_NAME": case "ITEM_PARENTEGG_NAME": case "ITEM_GOLDONHIT_NAME": case "TITANGOLD_BODY_NAME": case "LUNARWISP_BODY_NAME": case "MAGMAWORM_BODY_NAME": case "MAP_SKYMEADOW_TITLE": case "MAP_VOIDSTAGE_TITLE": case "ITEM_EXECUTELOWHEALTHELITE_NAME": case "ITEM_INTERSTELLARDESKPLANT_NAME": case "ITEM_EQUIPMENTMAGAZINEVOID_NAME": case "ITEM_HALFSPEEDDOUBLEHEALTH_NAME": case "ACHIEVEMENT_FINDDEVILALTAR_NAME": case "ACHIEVEMENT_FINDTIMEDCHEST_NAME": case "ACHIEVEMENT_MAJORMULTIKILL_NAME": case "ACHIEVEMENT_TREEBOTBIGHEAL_NAME": case "ACHIEVEMENT_LOADERSPEEDRUN_NAME": case "ITEM_PRIMARYSKILLSHURIKEN_NAME": case "ITEM_CAPTAINDEFENSEMATRIX_NAME": case "ITEM_PERMANENTDEBUFFONHIT_NAME": case "ITEM_UTILITYSKILLMAGAZINE_NAME": case "ITEM_BLEEDONHITANDEXPLODE_NAME": case "ITEM_LIGHTNINGSTRIKEONHIT_NAME": case "EQUIPMENT_DEATHPROJECTILE_NAME": case "ITEM_MINORCONSTRUCTONKILL_NAME": case "ACHIEVEMENT_KILLBOSSQUICK_NAME": case "ACHIEVEMENT_NEVERBACKDOWN_NAME": case "ACHIEVEMENT_MAGEMULTIKILL_NAME": case "ACHIEVEMENT_RESCUETREEBOT_NAME": case "ACHIEVEMENT_LOADERBIGSLAM_NAME": case "ITEM_HALFATTACKSPEEDHALFCOOLDOWNS_NAME": case "ACHIEVEMENT_DISCOVER10UNIQUETIER1_NAME": case "ACHIEVEMENT_FINDUNIQUENEWTSTATUES_NAME": case "ACHIEVEMENT_KILLBOSSQUANTITYINRUN_NAME": case "ACHIEVEMENT_COMPLETEUNKNOWNENDING_NAME": case "ACHIEVEMENT_CROCOCLEARGAMEMONSOON_NAME": case "ACHIEVEMENT_BANDIT2REVOLVERFINALE_NAME": case "ACHIEVEMENT_REPEATFIRSTTELEPORTER_NAME": case "ACHIEVEMENT_TOOLBOTBEATARENALATER_NAME": case "ACHIEVEMENT_MAGEAIRBORNEMULTIKILL_NAME": case "ACHIEVEMENT_MERCXSKILLSINYSECONDS_NAME": case "ACHIEVEMENT_OBTAINARTIFACTCOMMAND_NAME": case "ITEM_LUNARSECONDARYREPLACEMENT_NAME": case "ACHIEVEMENT_COMPLETETELEPORTER_NAME": case "ACHIEVEMENT_DISCOVER5EQUIPMENT_NAME": case "ACHIEVEMENT_SUICIDEHERMITCRABS_NAME": case "ACHIEVEMENT_CROCOKILLSCAVENGER_NAME": case "ACHIEVEMENT_COMPLETEMAINENDING_NAME": case "ACHIEVEMENT_COMPLETEVOIDENDING_NAME": case "ACHIEVEMENT_OBTAINARTIFACTBOMB_NAME": case "GUP_BODY_NAME": case "IMP_BODY_NAME": case "ACHIEVEMENT_COMMANDOCLEARGAMEMONSOON_NAME": case "ACHIEVEMENT_HUNTRESSCLEARGAMEMONSOON_NAME": case "ACHIEVEMENT_REPEATEDLYDUPLICATEITEMS_NAME": case "ACHIEVEMENT_OBTAINARTIFACTSINGLEMONSTERTYPE_NAME": case "ACHIEVEMENT_RAILGUNNERCONSECUTIVEWEAKPOINTS_NAME": case "ACHIEVEMENT_COMPLETETELEPORTERWITHOUTINJURY_NAME": case "ACHIEVEMENT_MERCCOMPLETETRIALWITHFULLHEALTH_NAME": case "ACHIEVEMENT_LOADERKILLLOADERS_NAME": case "ACHIEVEMENT_MULTICOMBATSHRINE_NAME": case "ACHIEVEMENT_ENGIKILLBOSSQUICK_NAME": case "ACHIEVEMENT_HARDELITEBOSSKILL_NAME": case "ACHIEVEMENT_KILLELITESMILESTONE_NAME": case "ACHIEVEMENT_TOTALDRONESREPAIRED_NAME": case "ACHIEVEMENT_TOTALMONEYCOLLECTED_NAME": case "ACHIEVEMENT_COMPLETETHREESTAGES_NAME": case "ACHIEVEMENT_MERCDONTTOUCHGROUND_NAME": case "ACHIEVEMENT_TREEBOTDUNKCLAYBOSS_NAME": case "ACHIEVEMENT_CAPTAINBUYMEGADRONE_NAME": case "ACHIEVEMENT_OBTAINARTIFACTGLASS_NAME": case "ACHIEVEMENT_KILLELEMENTALLEMURIANS_NAME": case "ACHIEVEMENT_COMPLETEPRISMATICTRIAL_NAME": case "ACHIEVEMENT_COMPLETE30STAGESCAREER_NAME": case "ACHIEVEMENT_COMPLETEMAINENDINGHARD_NAME": case "ACHIEVEMENT_BANDIT2STACKSUPERBLEED_NAME": case "ACHIEVEMENT_TOOLBOTGUARDTELEPORTER_NAME": case "ACHIEVEMENT_LOADERCLEARGAMEMONSOON_NAME": case "ACHIEVEMENT_OBTAINARTIFACTDELUSION_NAME": case "ACHIEVEMENT_OBTAINARTIFACTDEVOTION_NAME": case "ACHIEVEMENT_OBTAINARTIFACTMIXENEMY_NAME": case "ACHIEVEMENT_AUTOMATIONACTIVATION_NAME": case "ACHIEVEMENT_ENGICLEARGAMEMONSOON_NAME": case "ACHIEVEMENT_MAGECLEARGAMEMONSOON_NAME": case "ACHIEVEMENT_MERCCLEARGAMEMONSOON_NAME": case "ACHIEVEMENT_OBTAINARTIFACTENIGMA_NAME": case "ACHIEVEMENT_OBTAINARTIFACTSWARMS_NAME": case "ACHIEVEMENT_KILLGOLDTITANINONECYCLE_NAME": case "ACHIEVEMENT_COMPLETEMULTIBOSSSHRINE_NAME": case "ACHIEVEMENT_HUNTRESSCOLLECTCROWBARS_NAME": case "ACHIEVEMENT_BANDIT2CONSECUTIVERESET_NAME": case "ACHIEVEMENT_BANDIT2CLEARGAMEMONSOON_NAME": case "ACHIEVEMENT_TOOLBOTCLEARGAMEMONSOON_NAME": case "ACHIEVEMENT_TREEBOTCLEARGAMEMONSOON_NAME": case "ACHIEVEMENT_CAPTAINCLEARGAMEMONSOON_NAME": case "ACHIEVEMENT_DEFEATSUPERROBOBALLBOSS_NAME": case "ACHIEVEMENT_OBTAINARTIFACTTEAMDEATH_NAME": case "ACHIEVEMENT_CAPTAINSUPPLYDROPFINALE_NAME": case "ACHIEVEMENT_OBTAINARTIFACTELITEONLY_NAME": case "ACHIEVEMENT_OBTAINARTIFACTSACRIFICE_NAME": case "ACHIEVEMENT_COMMANDOKILLOVERLOADINGWORM_NAME": case "ACHIEVEMENT_COMMANDOFASTFIRSTSTAGECLEAR_NAME": case "ACHIEVEMENT_RAILGUNNERAIRBORNEMULTIKILL_NAME": case "ACHIEVEMENT_RAILGUNNERDEALMASSIVEDAMAGE_NAME": case "ACHIEVEMENT_COMMANDONONLUNARENDURANCE_NAME": case "ACHIEVEMENT_TOOLBOTKILLIMPBOSSWITHBFG_NAME": case "ACHIEVEMENT_CAPTAINVISITSEVERALSTAGES_NAME": case "ACHIEVEMENT_OBTAINARTIFACTSHADOWCLONE_NAME": case "ACHIEVEMENT_OBTAINARTIFACTWISPONDEATH_NAME": case "ACHIEVEMENT_HUNTRESSALLGLAIVEBOUNCESKILL_NAME": case "ACHIEVEMENT_VOIDSURVIVORCLEARGAMEMONSOON_NAME": case "ACHIEVEMENT_ENGICLEARTELEPORTERWITHZEROMONSTERS_NAME": case "ACHIEVEMENT_OBTAINARTIFACTMONSTERTEAMGAINSITEMS_NAME": case "ACHIEVEMENT_TREEBOTLOWHEALTHTELEPORTER_NAME": case "ACHIEVEMENT_OBTAINARTIFACTWEAKASSKNEES_NAME": case "ACHIEVEMENT_OBTAINARTIFACTFRIENDLYFIRE_NAME": case "ACHIEVEMENT_RAILGUNNERCLEARGAMEMONSOON_NAME": case "ACHIEVEMENT_CROCOKILLWEAKENEMIESMILESTONE_NAME": case "ACHIEVEMENT_CROCOTOTALINFECTIONSMILESTONE_NAME": case "ACHIEVEMENT_CHARGETELEPORTERWHILENEARDEATH_NAME": case "ACHIEVEMENT_COMPLETETHREESTAGESWITHOUTHEALING_NAME": case "ACHIEVEMENT_HUNTRESSMAINTAINFULLHEALTHONFROZENWALL_NAME": case "ACHIEVEMENT_OBTAINARTIFACTRANDOMSURVIVORONRESPAWN_NAME": return true; default: return false; } } } internal static class MiscCommands { private static readonly FieldRef<Action<UserProfile>> _onUserProfileViewedViewablesChangedFieldRef; static MiscCommands() { FieldInfo field = typeof(UserProfile).GetField("onUserProfileViewedViewablesChanged", BindingFlags.Static | BindingFlags.NonPublic); if (field != null) { _onUserProfileViewedViewablesChangedFieldRef = AccessTools.StaticFieldRefAccess<Action<UserProfile>>(field); } } [ConCommand(commandName = "set_viewable_viewed")] private static void CCSetViewableViewed(ConCommandArgs args) { string argString = ((ConCommandArgs)(ref args)).GetArgString(0); bool argBool = ((ConCommandArgs)(ref args)).GetArgBool(1); LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); if (firstLocalUser == null) { return; } UserProfile userProfile = firstLocalUser.userProfile; if (userProfile == null) { return; } bool flag; if (argBool) { if (!userProfile.viewedViewables.Contains(argString)) { userProfile.viewedViewables.Add(argString); flag = true; } else { flag = false; } } else { flag = userProfile.viewedViewables.Remove(argString); } if (flag) { if (_onUserProfileViewedViewablesChangedFieldRef != null) { _onUserProfileViewedViewablesChangedFieldRef.Invoke()?.Invoke(userProfile); } userProfile.RequestEventualSave(); } Debug.Log((object)("Set viewable '" + argString + "' to " + (argBool ? "viewed" : "unviewed"))); } } internal static class MissingDLCNotification { public static void Apply() { LanguageAPI.Add("POPUP_MISSING_DLC_HEADER", "DLC not found"); LanguageAPI.Add("POPUP_MISSING_DLC_DESCRIPTION", "This puzzle requires '{0}' be owned and active"); } public static void Undo() { } public static bool TryCreatePopup() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) ExpansionDef val = Addressables.LoadAssetAsync<ExpansionDef>((object)"RoR2/DLC1/Common/DLC1.asset").WaitForCompletion(); if (((BaseUserEntitlementTracker<LocalUser>)(object)EntitlementManager.localUserEntitlementTracker).AnyUserHasEntitlement(val.requiredEntitlement)) { return false; } Object.Destroy((Object)(object)PuzzlePlugin.Instance); SimpleDialogBox val2 = SimpleDialogBox.Create((MPEventSystem)null); val2.headerToken = new TokenParamsPair("POPUP_MISSING_DLC_HEADER", Array.Empty<object>()); val2.descriptionToken = new TokenParamsPair("POPUP_MISSING_DLC_DESCRIPTION", new object[1] { Language.GetString(val.nameToken) }); val2.AddCancelButton("PAUSE_QUIT_TO_DESKTOP", Array.Empty<object>()); OnDestroyCallback.AddCallback(((Component)val2).gameObject, (Action<OnDestroyCallback>)delegate { Application.Quit(); }); return true; } } internal static class MultiplayerDisabler { [CompilerGenerated] private static class <>O { public static hook_OnEnter <0>__BaseMainMenuScreen_OnEnter; public static Action <1>__onUpdate; } public static void Initialize() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown object obj = <>O.<0>__BaseMainMenuScreen_OnEnter; if (obj == null) { hook_OnEnter val = BaseMainMenuScreen_OnEnter; <>O.<0>__BaseMainMenuScreen_OnEnter = val; obj = (object)val; } BaseMainMenuScreen.OnEnter += (hook_OnEnter)obj; RoR2Application.onUpdate += onUpdate; } public static void Cleanup() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown object obj = <>O.<0>__BaseMainMenuScreen_OnEnter; if (obj == null) { hook_OnEnter val = BaseMainMenuScreen_OnEnter; <>O.<0>__BaseMainMenuScreen_OnEnter = val; obj = (object)val; } BaseMainMenuScreen.OnEnter -= (hook_OnEnter)obj; RoR2Application.onUpdate -= onUpdate; } private static void onUpdate() { if (PlatformSystems.lobbyManager.isInLobby) { PlatformSystems.lobbyManager.LeaveLobby(); if (Object.op_Implicit((Object)(object)MainMenuController.instance)) { MainMenuController.instance.SetDesiredMenuScreen(MainMenuController.instance.titleMenuScreen); } else { Console.instance.SubmitCmd((NetworkUser)null, "disconnect", false); } } } private static void BaseMainMenuScreen_OnEnter(orig_OnEnter orig, BaseMainMenuScreen self, MainMenuController mainMenuController) { orig.Invoke(self, mainMenuController); if ((Object)(object)self == (Object)(object)mainMenuController.titleMenuScreen) { Transform val = ((Component)self).transform.Find("SafeZone/GenericMenuButtonPanel/JuicePanel/GenericMenuButton (Multiplayer)"); Selectable val2 = default(Selectable); if (Object.op_Implicit((Object)(object)val) && ((Component)val).TryGetComponent<Selectable>(ref val2)) { val2.interactable = false; } } } } internal static class PuzzleClueLogbookItem { private class LogbookButtonTracker : MonoBehaviour { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__1_0; internal void <Awake>b__1_0() { Application.OpenURL(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)PuzzlePlugin.Instance).Info.Location) ?? string.Empty, "Attached_Files")); } } private GameObject _buttonObject; private void Awake() { //IL_005d: 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_0093: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown Transform val = ((Component)this).transform.Find("NakedButton (Back)"); if (Object.op_Implicit((Object)(object)val)) { _buttonObject = Object.Instantiate<GameObject>(((Component)val).gameObject, ((Component)this).transform); ((Object)_buttonObject).name = "OpenPuzzleFolderButton"; Transform transform = _buttonObject.transform; ((RectTransform)((transform is RectTransform) ? transform : null)).anchoredPosition = new Vector2(210f, 0f); _buttonObject.GetComponent<LanguageTextMeshController>().token = "PUZZLE_CLUE_OPEN_PLUGIN_FOLDER"; HGButton component = _buttonObject.GetComponent<HGButton>(); ((Button)component).onClick = new ButtonClickedEvent(); ButtonClickedEvent onClick = ((Button)component).onClick; object obj = <>c.<>9__1_0; if (obj == null) { UnityAction val2 = delegate { Application.OpenURL(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)PuzzlePlugin.Instance).Info.Location) ?? string.Empty, "Attached_Files")); }; <>c.<>9__1_0 = val2; obj = (object)val2; } ((UnityEvent)onClick).AddListener((UnityAction)obj); ((UnityEvent)((Button)component).onClick).AddListener(new UnityAction(component.OnClickCustom)); } else { PuzzlePlugin.LogSource.LogError((object)"Failed to find log page back button"); } } private void OnEnable() { if (Object.op_Implicit((Object)(object)_buttonObject)) { _buttonObject.SetActive(true); } } private void OnDisable() { if (Object.op_Implicit((Object)(object)_buttonObject)) { _buttonObject.SetActive(false); } } private void OnDestroy() { if (Object.op_Implicit((Object)(object)_buttonObject)) { Object.Destroy((Object)(object)_buttonObject); } } public static void SetButtonActive(GameObject pageObject, bool active) { LogbookButtonTracker logbookButtonTracker = default(LogbookButtonTracker); if (pageObject.TryGetComponent<LogbookButtonTracker>(ref logbookButtonTracker)) { ((Behaviour)logbookButtonTracker).enabled = active; } else if (active) { pageObject.AddComponent<LogbookButtonTracker>(); } } } [CompilerGenerated] private static class <>O { public static hook_BuildPickupEntries <0>__LogBookController_BuildPickupEntries; public static hook_SetEntry <1>__LogBookPage_SetEntry; public static GetStatusDelegate <2>__getClueItemStatus; public static GetTooltipContentDelegate <3>__getClueTooltipContent; public static Action<PageBuilder> <4>__cluePageBuilder; } public const string CLUE_ITEM_NAME_TOKEN = "PUZZLE_CLUE_ITEM_NAME"; private const string CLUE_ITEM_DESCRIPTION_1_TOKEN = "PUZZLE_CLUE_ITEM_DESCRIPTION_1"; private const string CLUE_ITEM_DESCRIPTION_2_TOKEN = "PUZZLE_CLUE_ITEM_DESCRIPTION_2"; private const string OPEN_PLUGIN_FOLDER_BUTTON_TOKEN = "PUZZLE_CLUE_OPEN_PLUGIN_FOLDER"; private const string CLUE_ITEM_VIEWABLE_NAME = "/Logbook/LOGBOOK_CATEGORY_ITEMANDEQUIPMENT/PUZZLE_CLUE_ITEM_NAME"; private const string CLUE_ITEM_NOT_VIEWED_POPUP_TITLE_TOKEN = "CLUE_ITEM_NOT_VIEWED_POPUP_TITLE"; private const string CLUE_ITEM_NOT_VIEWED_POPUP_DESCRIPTION_TOKEN = "CLUE_ITEM_NOT_VIEWED_POPUP_DESCRIPTION"; private static Entry _clueLogbookEntry; internal static void Setup() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //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_003b: Expected O, but got Unknown object obj = <>O.<0>__LogBookController_BuildPickupEntries; if (obj == null) { hook_BuildPickupEntries val = LogBookController_BuildPickupEntries; <>O.<0>__LogBookController_BuildPickupEntries = val; obj = (object)val; } LogBookController.BuildPickupEntries += (hook_BuildPickupEntries)obj; object obj2 = <>O.<1>__LogBookPage_SetEntry; if (obj2 == null) { hook_SetEntry val2 = LogBookPage_SetEntry; <>O.<1>__LogBookPage_SetEntry = val2; obj2 = (object)val2; } LogBookPage.SetEntry += (hook_SetEntry)obj2; LanguageAPI.Add("PUZZLE_CLUE_ITEM_NAME", "????"); LanguageAPI.Add("PUZZLE_CLUE_ITEM_DESCRIPTION_1", "It seems to give off a certain measurable and identifiable resonance, and all I can draw from this thing is this signal on repeat.. it's obviously a coded message of some kind.\r\n\r\nI uploaded the data to the system and it sent some locked files through, labeled X1 and X2. I have some decoding resources saved here on this terminal but... I just don't get it.\r\n\r\nIf anyone finds this - it means they may have found me already - I'd say give it a crack. \r\n\r\nThey're hiding something.\r\n\r\n-M"); LanguageAPI.Add("PUZZLE_CLUE_ITEM_DESCRIPTION_2", "Signal data:\r\n\r\n<style=cMono>LODGE nUMb\r\nFACT cAweD\r\nHaG HUBCAP\r\ndoubtaBLe\r\nbroadCast\r\ncrEPE HeAL\r\nrEVAlUIng</style>"); LanguageAPI.Add("PUZZLE_CLUE_OPEN_PLUGIN_FOLDER", "Access Files"); LanguageAPI.Add("CLUE_ITEM_NOT_VIEWED_POPUP_TITLE", "New User Detected"); LanguageAPI.Add("CLUE_ITEM_NOT_VIEWED_POPUP_DESCRIPTION", "1 logbook entr(ies) unaccounted for"); } internal static void Undo() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //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_003b: Expected O, but got Unknown object obj = <>O.<0>__LogBookController_BuildPickupEntries; if (obj == null) { hook_BuildPickupEntries val = LogBookController_BuildPickupEntries; <>O.<0>__LogBookController_BuildPickupEntries = val; obj = (object)val; } LogBookController.BuildPickupEntries -= (hook_BuildPickupEntries)obj; object obj2 = <>O.<1>__LogBookPage_SetEntry; if (obj2 == null) { hook_SetEntry val2 = LogBookPage_SetEntry; <>O.<1>__LogBookPage_SetEntry = val2; obj2 = (object)val2; } LogBookPage.SetEntry -= (hook_SetEntry)obj2; } public static bool TryCreatePopup(out SimpleDialogBox dialogBox) { //IL_003b: 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) dialogBox = null; LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); UserProfile val = ((firstLocalUser != null) ? firstLocalUser.userProfile : null); if (val == null || val.HasViewedViewable("/Logbook/LOGBOOK_CATEGORY_ITEMANDEQUIPMENT/PUZZLE_CLUE_ITEM_NAME")) { return false; } dialogBox = SimpleDialogBox.Create((MPEventSystem)null); dialogBox.headerToken = new TokenParamsPair("CLUE_ITEM_NOT_VIEWED_POPUP_TITLE", Array.Empty<object>()); dialogBox.descriptionToken = new TokenParamsPair("CLUE_ITEM_NOT_VIEWED_POPUP_DESCRIPTION", Array.Empty<object>()); dialogBox.AddCancelButton(CommonLanguageTokens.ok, Array.Empty<object>()); return true; } private static EntryStatus getClueItemStatus(in Entry entry, UserProfile viewerProfile) { return (EntryStatus)4; } private static TooltipContent getClueTooltipContent(in Entry entry, UserProfile userProfile, EntryStatus status) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_0022: Unknown result type (might be due to invalid IL or missing references) TooltipContent result = default(TooltipContent); result.titleToken = "PUZZLE_CLUE_ITEM_NAME"; result.titleColor = entry.color; return result; } private static void cluePageBuilder(PageBuilder builder) { builder.AddSimpleTextPanel(Language.GetString("PUZZLE_CLUE_ITEM_DESCRIPTION_1")); builder.AddSimpleTextPanel(Language.GetString("PUZZLE_CLUE_ITEM_DESCRIPTION_2")); } private static Entry[] LogBookController_BuildPickupEntries(orig_BuildPickupEntries orig, Dictionary<ExpansionDef, bool> expansionAvailability) { //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_0018: 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_002d: Unknown result type (might be due to invalid IL or missing references) //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_003a: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_00a4: 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) //IL_00af: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_00fb: Expected O, but got Unknown Entry[] result = orig.Invoke(expansionAvailability); Entry val = new Entry { nameToken = "PUZZLE_CLUE_ITEM_NAME", extraData = PickupCatalog.FindPickupIndex("ItemTier.Lunar"), color = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)21)) }; Sprite obj = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion(); val.iconTexture = (Texture)(object)((obj != null) ? obj.texture : null); val.bgTexture = (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/Common/texLunarBGIcon.png").WaitForCompletion(); val.modelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/EliteLunar/DisplayEliteLunar,Eye.prefab").WaitForCompletion(); object obj2 = <>O.<2>__getClueItemStatus; if (obj2 == null) { GetStatusDelegate val2 = getClueItemStatus; <>O.<2>__getClueItemStatus = val2; obj2 = (object)val2; } val.getStatusImplementation = (GetStatusDelegate)obj2; object obj3 = <>O.<3>__getClueTooltipContent; if (obj3 == null) { GetTooltipContentDelegate val3 = getClueTooltipContent; <>O.<3>__getClueTooltipContent = val3; obj3 = (object)val3; } val.getTooltipContentImplementation = (GetTooltipContentDelegate)obj3; val.pageBuilderMethod = cluePageBuilder; _clueLogbookEntry = val; ArrayUtils.ArrayInsert<Entry>(ref result, 0, ref _clueLogbookEntry); return result; } private static void LogBookPage_SetEntry(orig_SetEntry orig, LogBookPage self, UserProfile userProfile, Entry entry) { orig.Invoke(self, userProfile, entry); LogbookButtonTracker.SetButtonActive(((Component)self).gameObject, entry == _clueLogbookEntry); } } [BepInPlugin("Gorakh.signal_decoder", "signal_decoder", "1.0.4")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class PuzzlePlugin : BaseUnityPlugin { public const string PluginGUID = "Gorakh.signal_decoder"; public const string PluginAuthor = "Gorakh"; public const string PluginName = "signal_decoder"; public const string PluginVersion = "1.0.4"; private static PuzzlePlugin _instance; internal static PuzzlePlugin Instance => _instance; internal static ManualLogSource LogSource { get; private set; } internal static AssetBundle AssetBundle { get; private set; } internal static ContentPackProvider ContentPackProvider { get; private set; } private void Awake() { SingletonHelper.Assign<PuzzlePlugin>(ref _instance, this); LogSource = ((BaseUnityPlugin)this).Logger; ((BaseUnityPlugin)this).Logger.LogMessage((object)"Nothing to see here, quit trying to cheat"); ContentPackProvider = new ContentPackProvider(); HookLogHider.HideHookLogs = true; AssetBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "puzzle_assets")); Prefabs.Initialize(); PortalDialerExtender.Apply(); PuzzleClueLogbookItem.Setup(); MissingDLCNotification.Apply(); TabletPlacementHandler.Init(); VanillaArtifactCodeRemover.Initialize(); SurvivorRestrictor.Initialize(); TabletDamageNumberDisabler.Initialize(); TabletPingDisabler.Initialize(); CharacterEvents.Initialize(); MultiplayerDisabler.Initialize(); CharacterDeathHook.Initialize(); PauseScreenSuppressor.Initialize(); LogbookEntryRestrictor.Initailize(); TitlePopupManager.Initialize(); } private void OnDestroy() { try { PortalDialerExtender.Undo(); PuzzleClueLogbookItem.Undo(); MissingDLCNotification.Undo(); TabletPlacementHandler.Cleanup(); VanillaArtifactCodeRemover.Cleanup(); SurvivorRestrictor.Cleanup(); TabletDamageNumberDisabler.Cleanup(); TabletPingDisabler.Cleanup(); CharacterEvents.Cleanup(); MultiplayerDisabler.Cleanup(); CharacterDeathHook.Cleanup(); PauseScreenSuppressor.Cleanup(); LogbookEntryRestrictor.Cleanup(); TitlePopupManager.Cleanup(); } finally { HookLogHider.HideHookLogs = false; } SingletonHelper.Unassign<PuzzlePlugin>(ref _instance, this); } } internal static class SurvivorRestrictor { [CompilerGenerated] private static class <>O { public static hook_SetSurvivorDefs <0>__SurvivorCatalog_SetSurvivorDefs; public static hook_GetSurvivorPreference <1>__UserProfile_GetSurvivorPreference; public static hook_SpawnBody <2>__CharacterMaster_SpawnBody; } private static readonly SurvivorDef _allowedSurvivor = Addressables.LoadAssetAsync<SurvivorDef>((object)"RoR2/Base/Commando/Commando.asset").WaitForCompletion(); public static void Initialize() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //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_003b: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown object obj = <>O.<0>__SurvivorCatalog_SetSurvivorDefs; if (obj == null) { hook_SetSurvivorDefs val = SurvivorCatalog_SetSurvivorDefs; <>O.<0>__SurvivorCatalog_SetSurvivorDefs = val; obj = (object)val; } SurvivorCatalog.SetSurvivorDefs += (hook_SetSurvivorDefs)obj; object obj2 = <>O.<1>__UserProfile_GetSurvivorPreference; if (obj2 == null) { hook_GetSurvivorPreference val2 = UserProfile_GetSurvivorPreference; <>O.<1>__UserProfile_GetSurvivorPreference = val2; obj2 = (object)val2; } UserProfile.GetSurvivorPreference += (hook_GetSurvivorPreference)obj2; object obj3 = <>O.<2>__CharacterMaster_SpawnBody; if (obj3 == null) { hook_SpawnBody val3 = CharacterMaster_SpawnBody; <>O.<2>__CharacterMaster_SpawnBody = val3; obj3 = (object)val3; } CharacterMaster.SpawnBody += (hook_SpawnBody)obj3; } public static void Cleanup() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //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_003b: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown object obj = <>O.<0>__SurvivorCatalog_SetSurvivorDefs; if (obj == null) { hook_SetSurvivorDefs val = SurvivorCatalog_SetSurvivorDefs; <>O.<0>__SurvivorCatalog_SetSurvivorDefs = val; obj = (object)val; } SurvivorCatalog.SetSurvivorDefs -= (hook_SetSurvivorDefs)obj; object obj2 = <>O.<1>__UserProfile_GetSurvivorPreference; if (obj2 == null) { hook_GetSurvivorPreference val2 = UserProfile_GetSurvivorPreference; <>O.<1>__UserProfile_GetSurvivorPreference = val2; obj2 = (object)val2; } UserProfile.GetSurvivorPreference -= (hook_GetSurvivorPreference)obj2; object obj3 = <>O.<2>__CharacterMaster_SpawnBody; if (obj3 == null) { hook_SpawnBody val3 = CharacterMaster_SpawnBody; <>O.<2>__CharacterMaster_SpawnBody = val3; obj3 = (object)val3; } CharacterMaster.SpawnBody -= (hook_SpawnBody)obj3; } private static void SurvivorCatalog_SetSurvivorDefs(orig_SetSurvivorDefs orig, SurvivorDef[] newSurvivorDefs) { foreach (SurvivorDef obj in newSurvivorDefs) { obj.hidden = (Object)(object)obj != (Object)(object)_allowedSurvivor; } orig.Invoke(newSurvivorDefs); } private static SurvivorDef UserProfile_GetSurvivorPreference(orig_GetSurvivorPreference orig, UserProfile self) { if ((Object)(object)orig.Invoke(self) != (Object)(object)_allowedSurvivor) { self.SetSurvivorPreference(_allowedSurvivor); } return _allowedSurvivor; } private static CharacterBody CharacterMaster_SpawnBody(orig_SpawnBody orig, CharacterMaster self, Vector3 position, Quaternion rotation) { //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) if (Object.op_Implicit((Object)(object)self.playerCharacterMasterController)) { ref GameObject bodyPrefab = ref self.bodyPrefab; if (Object.op_Implicit((Object)(object)bodyPrefab) && (Object)(object)SurvivorCatalog.FindSurvivorDefFromBody(bodyPrefab) != (Object)(object)_allowedSurvivor) { bodyPrefab = _allowedSurvivor.bodyPrefab; } } return orig.Invoke(self, position, rotation); } } internal static class TabletDamageNumberDisabler { [CompilerGenerated] private static class <>O { public static Manipulator <0>__HealthComponent_HandleDamageDealt_IL; public static hook_HandleDamageDealt <1>__HealthComponent_HandleDamageDealt; public static Manipulator <2>__HealthComponent_HandleHeal_IL; public static hook_HandleHeal <3>__HealthComponent_HandleHeal; public static hook_SpawnDamageNumber <4>__DamageNumberManager_SpawnDamageNumber; } private static BodyIndex _tabletBodyIndex; private static bool _disableDamageNumbers; [SystemInitializer(new Type[] { typeof(BodyCatalog) })] private static void Init() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) _tabletBodyIndex = BodyCatalog.FindBodyIndex(BodyPrefabs.ArtifactTabletBodyPrefab); } public static void Initialize() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //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_003b: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown object obj = <>O.<0>__HealthComponent_HandleDamageDealt_IL; if (obj == null) { Manipulator val = HealthComponent_HandleDamageDealt_IL; <>O.<0>__HealthComponent_HandleDamageDealt_IL = val; obj = (object)val; } HealthComponent.HandleDamageDealt += (Manipulator)obj; object obj2 = <>O.<1>__HealthComponent_HandleDamageDealt; if (obj2 == null) { hook_HandleDamageDealt val2 = HealthComponent_HandleDamageDealt; <>O.<1>__HealthComponent_HandleDamageDealt = val2; obj2 = (object)val2; } HealthComponent.HandleDamageDealt += (hook_HandleDamageDealt)obj2; object obj3 = <>O.<2>__HealthComponent_HandleHeal_IL; if (obj3 == null) { Manipulator val3 = HealthComponent_HandleHeal_IL; <>O.<2>__HealthComponent_HandleHeal_IL = val3; obj3 = (object)val3; } HealthComponent.HandleHeal += (Manipulator)obj3; object obj4 = <>O.<3>__HealthComponent_HandleHeal; if (obj4 == null) { hook_HandleHeal val4 = HealthComponent_HandleHeal; <>O.<3>__HealthComponent_HandleHeal = val4; obj4 = (object)val4; } HealthComponent.HandleHeal += (hook_HandleHeal)obj4; object obj5 = <>O.<4>__DamageNumberManager_SpawnDamageNumber; if (obj5 == null) { hook_SpawnDamageNumber val5 = DamageNumberManager_SpawnDamageNumber; <>O.<4>__DamageNumberManager_SpawnDamageNumber = val5; obj5 = (object)val5; } DamageNumberManager.SpawnDamageNumber += (hook_SpawnDamageNumber)obj5; } public static void Cleanup() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //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_003b: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown object obj = <>O.<0>__HealthComponent_HandleDamageDealt_IL; if (obj == null) { Manipulator val = HealthComponent_HandleDamageDealt_IL; <>O.<0>__HealthComponent_HandleDamageDealt_IL = val; obj = (object)val; } HealthComponent.HandleDamageDealt -= (Manipulator)obj; object obj2 = <>O.<1>__HealthComponent_HandleDamageDealt; if (obj2 == null) { hook_HandleDamageDealt val2 = HealthComponent_HandleDamageDealt; <>O.<1>__HealthComponent_HandleDamageDealt = val2; obj2 = (object)val2; } HealthComponent.HandleDamageDealt -= (hook_HandleDamageDealt)obj2; object obj3 = <>O.<2>__HealthComponent_HandleHeal_IL; if (obj3 == null) { Manipulator val3 = HealthComponent_HandleHeal_IL; <>O.<2>__HealthComponent_HandleHeal_IL = val3; obj3 = (object)val3; } HealthComponent.HandleHeal -= (Manipulator)obj3; object obj4 = <>O.<3>__HealthComponent_HandleHeal; if (obj4 == null) { hook_HandleHeal val4 = HealthComponent_HandleHeal; <>O.<3>__HealthComponent_HandleHeal = val4; obj4 = (object)val4; } HealthComponent.HandleHeal -= (hook_HandleHeal)obj4; object obj5 = <>O.<4>__DamageNumberManager_SpawnDamageNumber; if (obj5 == null) { hook_SpawnDamageNumber val5 = DamageNumberManager_SpawnDamageNumber; <>O.<4>__DamageNumberManager_SpawnDamageNumber = val5; obj5 = (object)val5; } DamageNumberManager.SpawnDamageNumber -= (hook_SpawnDamageNumber)obj5; } private static void HealthComponent_HandleDamageDealt_IL(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MethodReference val3 = default(MethodReference); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val3) && Extensions.Is((MemberReference)(object)((MemberReference)val3).DeclaringType, (MemberInfo)typeof(NetworkMessage)) && ((MemberReference)val3).Name == "ReadMessage" })) { return; } val.Emit(OpCodes.Dup); val.EmitDelegate<Action<DamageDealtMessage>>((Action<DamageDealtMessage>)delegate(DamageDealtMessage damageDealtMessage) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) CharacterBody val2 = default(CharacterBody); if (Object.op_Implicit((Object)(object)damageDealtMessage.victim) && damageDealtMessage.victim.TryGetComponent<CharacterBody>(ref val2) && val2.bodyIndex == _tabletBodyIndex) { _disableDamageNumbers = true; } }); } private static void HealthComponent_HandleHeal_IL(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MethodReference val3 = default(MethodReference); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val3) && Extensions.Is((MemberReference)(object)((MemberReference)val3).DeclaringType, (MemberInfo)typeof(NetworkMessage)) && ((MemberReference)val3).Name == "ReadMessage" })) { return; } val.Emit(OpCodes.Dup); val.EmitDelegate<Action<HealMessage>>((Action<HealMessage>)delegate(HealMessage healMessage) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) CharacterBody val2 = default(CharacterBody); if (Object.op_Implicit((Object)(object)healMessage.target) && healMessage.target.TryGetComponent<CharacterBody>(ref val2) && val2.bodyIndex == _tabletBodyIndex) { _disableDamageNumbers = true; } }); } private static void HealthComponent_HandleHeal(orig_HandleHeal orig, NetworkMessage netMsg) { try { orig.Invoke(netMsg); } finally { _disableDamageNumbers = false; } } private static void HealthComponent_HandleDamageDealt(orig_HandleDamageDealt orig, NetworkMessage netMsg) { try { orig.Invoke(netMsg); } finally { _disableDamageNumbers = false; } } private static void DamageNumberManager_SpawnDamageNumber(orig_SpawnDamageNumber orig, DamageNumberManager self, float amount, Vector3 position, bool crit, TeamIndex teamIndex, DamageColorIndex damageColorIndex) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) if (!_disableDamageNumbers) { orig.Invoke(self, amount, position, crit, teamIndex, damageColorIndex); } } } public class TabletOutput { public readonly string ChatMessage; public readonly TabletDisplayDescriptor TabletDisplay; public TabletOutput(string chatMessage, TabletDisplayDescriptor tabletDisplay) { ChatMessage = chatMessage; TabletDisplay = tabletDisplay; } public static TabletOutput Read(BinaryReader reader) { string chatMessage = reader.ReadString(); TabletDisplayDescriptor tabletDisplay = TabletDisplayDescriptor.Read(reader); return new TabletOutput(chatMessage, tabletDisplay); } } internal static class TabletPingDisabler { [CompilerGenerated] private static class <>O { public static Manipulator <0>__PingerController_GeneratePingInfo_IL; public static hook_GeneratePingInfo <1>__PingerController_GeneratePingInfo; } private static BodyIndex _tabletBodyIndex; private static RaycastHit? _currentRaycastHit; [SystemInitializer(new Type[] { typeof(BodyCatalog) })] private static void Init() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) _tabletBodyIndex = BodyCatalog.FindBodyIndex(BodyPrefabs.ArtifactTabletBodyPrefab); } public static void Initialize() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //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_003b: Expected O, but got Unknown object obj = <>O.<0>__PingerController_GeneratePingInfo_IL; if (obj == null) { Manipulator val = PingerController_GeneratePingInfo_IL; <>O.<0>__PingerController_GeneratePingInfo_IL = val; obj = (object)val; } PingerController.GeneratePingInfo += (Manipulator)obj; object obj2 = <>O.<1>__PingerController_GeneratePingInfo; if (obj2 == null) { hook_GeneratePingInfo val2 = PingerController_GeneratePingInfo; <>O.<1>__PingerController_GeneratePingInfo = val2; obj2 = (object)val2; } PingerController.GeneratePingInfo += (hook_GeneratePingInfo)obj2; } public static void Cleanup() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //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_003b: Expected O, but got Unknown object obj = <>O.<0>__PingerController_GeneratePingInfo_IL; if (obj == null) { Manipulator val = PingerController_GeneratePingInfo_IL; <>O.<0>__PingerController_GeneratePingInfo_IL = val; obj = (object)val; } PingerController.GeneratePingInfo -= (Manipulator)obj; object obj2 = <>O.<1>__PingerController_GeneratePingInfo; if (obj2 == null) { hook_GeneratePingInfo val2 = PingerController_GeneratePingInfo; <>O.<1>__PingerController_GeneratePingInfo = val2; obj2 = (object)val2; } PingerController.GeneratePingInfo -= (hook_GeneratePingInfo)obj2; } private unsafe static void PingerController_GeneratePingInfo_IL(ILContext il) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); while (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, (MethodBase)SymbolExtensions.GetMethodInfo<RaycastHit>((Expression<Action<RaycastHit>>)((RaycastHit _) => Util.CharacterRaycast((GameObject)null, default(Ray), ref *(RaycastHit*)(&_), 0f, default(LayerMask), (QueryTriggerInteraction)0)))) })) { int index = val.Index; int raycastHitLocalIndex = -1; bool num = val.TryGotoPrev(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloca(x, ref raycastHitLocalIndex) && Extensions.Is((MemberReference)(object)((VariableReference)il.Method.Body.Variables[raycastHitLocalIndex]).VariableType, (MemberInfo)typeof(RaycastHit)) }); val.Index = index; if (num) { val.Emit(OpCodes.Ldloc, raycastHitLocalIndex); val.EmitDelegate<Action<RaycastHit>>((Action<RaycastHit>)delegate(RaycastHit hit) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) _currentRaycastHit = hit; }); } int index2 = val.Index; val.Index = index2 + 1; } } private static bool PingerController_GeneratePingInfo(orig_GeneratePingInfo orig, Ray aimRay, GameObject bodyObject, out PingInfo result) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //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_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_0059: 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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_0076: Unknown result type (might be due to invalid IL or missing references) _currentRaycastHit = null; bool result2 = orig.Invoke(aimRay, bodyObject, ref result); ref NetworkIdentity targetNetworkIdentity = ref result.targetNetworkIdentity; CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)targetNetworkIdentity) && ((Component)targetNetworkIdentity).TryGetComponent<CharacterBody>(ref val) && val.bodyIndex == _tabletBodyIndex) { targetNetworkIdentity = null; if (_currentRaycastHit.HasValue) { RaycastHit value = _currentRaycastHit.Value; result.origin = ((RaycastHit)(ref value)).point; value = _currentRaycastHit.Value; result.normal = ((RaycastHit)(ref value)).normal; } } return result2; } } internal static class TabletPlacementHandler { private static GameObject _finalTabletPrefab; public static void Init() { _finalTabletPrefab = PuzzlePlugin.AssetBundle.LoadAsset<GameObject>("clue_rock_final"); SceneCatalog.onMostRecentSceneDefChanged += SceneCatalog_onMostRecentSceneDefChanged; } public static void Cleanup() { SceneCatalog.onMostRecentSceneDefChanged -= SceneCatalog_onMostRecentSceneDefChanged; } private static void SceneCatalog_onMostRecentSceneDefChanged(SceneDef scene) { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00df: 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_014f: 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_017e: 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_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) switch (scene.cachedName) { case "goolake": { GameObject val = Object.Instantiate<GameObject>(BodyPrefabs.ArtifactTabletBodyPrefab); val.transform.position = new Vector3(-60.909f, -176.7904f, -339.2192f); val.transform.rotation = Quaternion.Euler(0f, 93.2511f, 0f); val.transform.localScale = Vector3.one; val.GetComponent<TeamComponent>().teamIndex = (TeamIndex)(-1); EntityStateMachine.FindByCustomName(val, "Body").mainStateType = new SerializableEntityStateType(typeof(TabletGoolakeMainState)); TabletInteraction component = val.GetComponent<TabletInteraction>(); component.Identifier = "goolake"; component.InteractionVerificationKey = new EncryptedBytes(new byte[64] { 117, 1, 159, 233, 176, 23, 183, 59, 197, 111, 172, 249, 217, 159, 58, 204, 123, 147, 27, 181, 234, 144, 127, 32, 152, 102, 95, 104, 201, 144, 3, 50, 21, 56, 236, 160, 222, 206, 60, 51, 73, 143, 196, 28, 7, 152, 150, 224, 182, 191, 31, 88, 234, 17, 158, 82, 176, 233, 0, 252, 234, 12, 21, 28 }, new byte[32] { 87, 20, 174, 52, 35, 191, 144, 230, 191, 88, 210, 46, 242, 188, 31, 166, 88, 189, 220, 231, 177, 106, 221, 251, 220, 220, 194, 12, 54, 48, 97, 134 }); NetworkServer.Spawn(val); break; } case "foggyswamp": { GameObject val5 = Object.Instantiate<GameObject>(BodyPrefabs.ArtifactTabletBodyPrefab); val5.transform.position = new Vector3(-137.1347f, -149.1607f, 116.7283f); val5.transform.rotation = Quaternion.Euler(0f, 193.5471f, 0f); val5.transform.localScale = Vector3.one; EntityStateMachine.FindByCustomName(val5, "Body").mainStateType = new SerializableEntityStateType(typeof(TabletFoggyswampMainState)); TabletInteraction component5 = val5.GetComponent<TabletInteraction>(); component5.Identifier = "foggyswamp"; component5.InteractionVerificationKey = new EncryptedBytes(new byte[64] { 61, 141, 13, 251, 47, 150, 113, 16, 190, 161, 153, 46, 198, 109, 211, 123, 234, 236, 13, 153, 2, 102, 134, 243, 76, 0, 198, 154, 78, 204, 141, 118, 234, 90, 19, 230, 237, 112, 17, 37, 8, 43, 65, 177, 182, 212, 11, 227, 0, 185, 236, 41, 117, 221, 56, 241, 206, 222, 151, 103, 143, 28, 104, 99 }, new byte[32] { 36, 75, 118, 227, 241, 163, 188, 13, 26, 75, 43, 49, 34, 84, 68, 38, 95, 12, 72, 174, 58, 33, 170, 51, 188, 183, 221, 154, 225, 129, 119, 228 }); NetworkServer.Spawn(val5); break; } case "rootjungle": { GameObject val4 = Object.Instantiate<GameObject>(BodyPrefabs.ArtifactTabletBodyPrefab); val4.transform.position = new Vector3(-108.3118f, 24.8799f, -276.3597f); val4.transform.rotation = Quaternion.Euler(0f, 167.8538f, 0f); val4.transform.localScale = Vector3.one; EntityStateMachine.FindByCustomName(val4, "Body").mainStateType = new SerializableEntityStateType(typeof(TabletRootJungleMainState)); TabletInteraction component4 = val4.GetComponent<TabletInteraction>(); component4.Identifier = "rootjungle"; component4.InteractionVerificationKey = new EncryptedBytes(new byte[64] { 163, 149, 6, 129, 141, 132, 184, 253, 229, 0, 121, 97, 100, 173, 145, 197, 188, 38, 23, 215, 127, 217, 44, 81, 63, 41, 55, 25, 184, 185, 121, 97, 242, 76, 75, 96, 243, 64, 159, 103, 221, 210, 182, 49, 156, 206, 217, 83, 94, 175, 65, 12, 47, 239, 234, 121, 175, 245, 250, 111, 217, 62, 44, 208 }, new byte[32] { 225, 150, 199, 221, 225, 10, 34, 76, 35, 120, 161, 35, 72, 228, 10, 202, 246, 169, 38, 105, 207, 4, 212, 169, 80, 64, 156, 96, 61, 57, 235, 32 }); NetworkServer.Spawn(val4); GameObject obj2 = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/rootjungle/RJShroomShelf.prefab").WaitForCompletion()); obj2.transform.position = new Vector3(-108.2658f, 21.4934f, -279.6231f); obj2.transform.rotation = Quaternion.Euler(358.6883f, 152.5692f, 0f); obj2.transform.localScale = new Vector3(1.6521f, 1.6521f, 1.6521f); break; } case "wispgraveyard": { GameObject val3 = Object.Instantiate<GameObject>(BodyPrefabs.ArtifactTabletBodyPrefab); val3.transform.position = new Vector3(-249.4934f, 61.2978f, 290.5674f); val3.transform.rotation = Quaternion.Euler(358.3309f, 282.0266f, 0f); val3.transform.localScale = Vector3.one; EntityStateMachine.FindByCustomName(val3, "Body").mainStateType = new SerializableEntityStateType(typeof(TabletWispgraveyardMainState)); TabletInteraction component3 = val3.GetComponent<TabletInteraction>(); component3.Identifier = "wispgraveyard"; component3.InteractionVerificationKey = new EncryptedBytes(new byte[64] { 253, 38, 114, 241, 128, 103, 100, 187, 1, 46, 36, 228, 17, 152, 181, 19, 212, 29, 197, 126, 88, 191, 116, 10, 199, 195, 10, 12, 18, 253, 251, 48, 69, 225, 179, 223, 62, 108, 210, 94, 181, 128, 14, 63, 45, 231, 213, 206, 134, 45, 138, 108, 30, 88, 149, 136, 147, 112, 33, 213, 63, 219, 93, 32 }, new byte[32] { 60, 135, 93, 183, 84, 143, 13, 80, 36, 111, 79, 56, 88, 115, 213, 168, 225, 236, 243, 218, 233, 130, 66, 92, 19, 172, 106, 122, 193, 252, 165, 85 }); NetworkServer.Spawn(val3); break; } case "ancientloft": { GameObject val2 = Object.Instantiate<GameObject>(BodyPrefabs.ArtifactTabletBodyPrefab); val2.transform.position = new Vector3(97.9855f, 155.503f, -60.3773f); val2.transform.rotation = Quaternion.Euler(0f, 11.0473f, 0f); val2.transform.localScale = Vector3.one; EntityStateMachine.FindByCustomName(val2, "Body").mainStateType = new SerializableEntityStateType(typeof(TabletAncientloftBranchState)); TabletInteraction component2 = val2.GetComponent<TabletInteraction>(); component2.Identifier = "ancientloft"; component2.InteractionVerificationKey = new EncryptedBytes(new byte[64] { 122, 167, 18, 31, 135, 74, 60, 12, 247, 19, 148, 140, 124, 155, 194, 23, 42, 177, 225, 91, 102, 128, 176, 37, 94, 242, 131, 134, 152, 251, 133, 162, 220, 84, 72, 10, 133, 87, 218, 127, 60, 207, 123, 179, 15, 38, 143, 252, 147, 200, 173, 219, 89, 85, 4, 135, 127, 185, 90, 213, 225, 78, 182, 139 }, new byte[32] { 226, 104, 226, 165, 141, 212, 146, 86, 188, 18, 177, 90, 86, 132, 122, 214, 84, 77, 237, 99, 210, 28, 101, 127, 164, 99, 25, 241, 151, 193, 108, 38 }); NetworkServer.Spawn(val2); break; } case "moon": if (Run.instance.stageClearCount % 7 == 4) { GameObject obj = Object.Instantiate<GameObject>(_finalTabletPrefab); obj.transform.position = new Vector3(1709.331f, 122.644f, 140.2442f); obj.transform.rotation = Quaternion.Euler(355.3962f, 178.3199f, 359.0472f); obj.transform.localScale = Vector3.one; } break; } } } internal static class TitlePopupManager { private static bool _isShowingPopupsQueue; public static void Initialize() { LocalUserManager.onUserSignIn += LocalUserManager_onUserSignIn; } public static void Cleanup() { LocalUserManager.onUserSignIn -= LocalUserManager_onUserSignIn; } private static void LocalUserManager_onUserSignIn(LocalUser localUser) { if (!_isShowingPopupsQueue) { _isShowingPopupsQueue = true; ((MonoBehaviour)RoR2Application.instance).StartCoroutine(createPopups()); } } private static IEnumerator createPopups() { yield return 0; if (!MissingDLCNotification.TryCreatePopup() && PuzzleClueLogbookItem.TryCreatePopup(out var currentDialogBox)) { while (Object.op_Implicit((Object)(object)currentDialogBox)) { yield return 0; } } _isShowingPopupsQueue = false; } } internal static class VanillaArtifactCodeRemover { public static void Initialize() { SceneCatalog.onMostRecentSceneDefChanged += SceneCatalog_onMostRecentSceneDefChanged; removePrefabArtifactFormula("RoR2/Base/ScavLunar/ScavLunar1Body.prefab", "ModelBase/mdlScav/ScavArmature/ROOT/base/stomach/chest/Decal"); removePrefabArtifactFormula("RoR2/Base/ScavLunar/ScavLunar2Body.prefab", "ModelBase/mdlScav/ScavArmature/ROOT/base/stomach/chest/Decal"); removePrefabArtifactFormula("RoR2/Base/ScavLunar/ScavLunar3Body.prefab", "ModelBase/mdlScav/ScavArmature/ROOT/base/stomach/chest/Decal"); removePrefabArtifactFormula("RoR2/Base/ScavLunar/ScavLunar4Body.prefab", "ModelBase/mdlScav/ScavArmature/ROOT/base/stomach/chest/Decal"); removePrefabArtifactFormula("RoR2/Base/mysteryspace/MysteryspaceDioramaDisplay.prefab", "ArtifactFormulaDisplay"); static void removePrefabArtifactFormula(string assetPath, string displayObjectPath) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)assetPath).WaitForCompletion(); if (Object.op_Implicit((Object)(object)val)) { Transform val2 = val.transform.Find(displayObjectPath); if (Object.op_Implicit((Object)(object)val2)) { Object.Destroy((Object)(object)((Component)val2).gameObject); } } } } public static void Cleanup() { SceneCatalog.onMostRecentSceneDefChanged -= SceneCatalog_onMostRecentSceneDefChanged; } private static void SceneCatalog_onMostRecentSceneDefChanged(SceneDef scene) { string cachedName = scene.cachedName; if (cachedName == null) { return; } switch (cachedName.Length) { case 10: switch (cachedName[2]) { case 'a': if (cachedName == "blackbeach") { removeArtifactFormula("HOLDER: Artifact Formula"); } break; case 'o': if (cachedName == "frozenwall") { removeArtifactFormula("HOLDER: Artifact Formula Area/ArtifactFormulaDisplay"); removeArtifactFormula("HOLDER: Artifact Formula Area/SnowPile"); } break; case 'g': if (cachedName == "foggyswamp") { removeArtifactFormula("HOLDER: Hidden Altar Stuff/ArtifactFormulaDisplay"); } break; case 'l': if (cachedName == "goldshores") { removeArtifactFormula("ArtifactFormulaDisplay"); } break; } break; case 12: switch (cachedName[0]) { case 'g': if (cachedName == "golemplains2") { removeArtifactFormula("HOLDER: Distant Props/ArtifactFormulaDisplay"); } break; case 'm': if (cachedName == "mysteryspace") { removeArtifactFormula("ArtifactFormulaDisplay"); } break; } break; case 13: switch (cachedName[0]) { case 'w': if (cachedName == "wispgraveyard") { removeArtifactFormula("ENTIRE SCENE HOLDER/HOLDER: Terrain/WPTerrainBackwall1Detailed/WPPlatform1Stairs (Level 3)/WPObeliskLarge"); } break; case 's': if (cachedName == "shipgraveyard") { removeArtifactFormula("HOLDER: Artifact Formula Area"); } break; case 'a': if (cachedName == "artifactworld") { removeArtifactFormula("ArtifactFormulaDisplay"); } break; } break; case 5: switch (cachedName[0]) { case 'a': if (cachedName == "arena") { removeArtifactFormula("HOLDER: Artifact Formula"); } break; case 't': if (cachedName == "title") { removeArtifactFormula("MainMenu/MENU: Settings/ArtifactFormulaDisplay"); } break; } break; case 7: if (cachedName == "goolake") { removeArtifactFormula("ArtifactFormulaDisplay (Bottom Half)"); removeArtifactFormula("ArtifactFormulaDisplay (Top Half)"); } break; case 14: if (cachedName == "dampcavesimple") { removeArtifactFormula("HOLDER: Formula Area"); } break; case 9: if (cachedName == "skymeadow") { removeArtifactFormula("PortalDialerEvent/Final Zone/Formula"); } break; case 6: if (cachedName == "bazaar") { removeArtifactFormula("HOLDER: Store/ArtifactFormulaDisplay"); } break; case 8: case 11: break; } static void removeArtifactFormula(string objectPath) { ((MonoBehaviour)RoR2Application.instance).StartCoroutine(waitThenRemoveArtifactFormula(objectPath)); } static IEnumerator waitThenRemoveArtifactFormula(string objectPath) { yield return 0; GameObject val = GameObject.Find(objectPath); if (Object.op_Implicit((Object)(object)val)) { Object.Destroy((Object)(object)val); } } } } } namespace SignalDecoder.PortalDialer { public class ComponentFieldValueSetInfo { public string FieldName; public string FieldValueString; public float Delay; public ComponentFieldValueSetInfo(string fieldName, object fieldValue, float delay = 0f) : this(fieldName, Convert.ToString(fieldValue, CultureInfo.InvariantCulture), delay) { } public ComponentFieldValueSetInfo(string fieldName, string fieldValueString, float delay = 0f) { FieldName = fieldName; FieldValueString = fieldValueString; Delay = delay; } public static ComponentFieldValueSetInfo Read(BinaryReader reader) { string fieldName = reader.ReadString(); string fieldValueString = reader.ReadString(); float delay = reader.ReadSingle(); return new ComponentFieldValueSetInfo(fieldName, fieldValueString, delay); } } public class ComponentValuesSetup { private class CoroutineDummy : MonoBehaviour { public Component OwnerComponent; public void SetCoroutine(IEnumerator coroutine) { ((MonoBehaviour)this).StartCoroutine(internalCoroutine()); IEnumerator internalCoroutine() { Component ownerComponent = OwnerComponent; Behaviour ownerAsBehaviour = (Behaviour)(object)((ownerComponent is Behaviour) ? ownerComponent : null); while (Object.op_Implicit((Object)(object)OwnerComponent) && coroutine.MoveNext()) { yield return coroutine.Current; while (Object.op_Implicit((Object)(object)ownerAsBehaviour) && !ownerAsBehaviour.enabled) { yield return 0; } } Object.Destroy((Object)(object)this); } } } public readonly Type ComponentType; public readonly bool SingleComponent; public readonly ComponentFieldValueSetInfo[] FieldValues; public ComponentValuesSetup(Type componentType, bool singleComponent, ComponentFieldValueSetInfo[] fieldValues) { ComponentType = componentType ?? throw new ArgumentNullException("componentType"); SingleComponent = singleComponent; FieldValues = fieldValues ?? Array.Empty<ComponentFieldValueSetInfo>(); } public ComponentValuesSetup(string componentTypeName, bool singleComponent, ComponentFieldValueSetInfo[] fieldValues) : this(Type.GetType(componentTypeName), singleComponent, fieldValues) { } public static ComponentValuesSetup Read(BinaryReader reader) { string componentTypeName = reader.ReadString(); bool singleComponent = reader.ReadBoolean(); ComponentFieldValueSetInfo[] array = new ComponentFieldValueSetInfo[reader.ReadInt32()]; for (int i = 0; i < array.Length; i++) { array[i] = ComponentFieldValueSetInfo.Read(reader); } return new ComponentValuesSetup(componentTypeName, singleComponent, array); } public void SetValues(GameObject obj) { Component val = default(Component); Component[] array = (Component[])((!SingleComponent) ? obj.GetComponents(ComponentType) : ((!obj.TryGetComponent(ComponentType, ref val)) ? ((Array)Array.Empty<Component>()) : ((Array)new Component[1] { val }))); if (array.Length == 0) { return; } ComponentFieldValueSetInfo[] fieldValues = FieldValues; foreach (ComponentFieldValueSetInfo componentFieldValueSetInfo in fieldValues) { string fieldName = componentFieldValueSetInfo.FieldName; string fieldValueString = componentFieldValueSetInfo.FieldValueString; MemberInfo[] member = ComponentType.GetMember(fieldName, MemberTypes.Field | MemberTypes.Property, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); Component[] array2 = array; foreach (Component val2 in array2) { MemberInfo[] array3 = member; foreach (MemberInfo memberInfo in array3) { Action<Component, object> action; Type type; if (!(memberInfo is FieldInfo fieldInfo)) { if (!(memberInfo is PropertyInfo propertyInfo) || !(propertyInfo.SetMethod != null)) { continue; } action = propertyInfo.SetValue; type = propertyInfo.PropertyType; } else { if (fieldInfo.IsLiteral) { continue; } action = fieldInfo.SetValue; type = fieldInfo.FieldType; } object obj2 = ((!type.IsEnum) ? Convert.ChangeType(fieldValueString, type, CultureInfo.InvariantCulture) : Enum.Parse(type, fieldValueString)); if (componentFieldValueSetInfo.Delay <= 0f) { action(val2, obj2); continue; } IEnumerator enumerator = waitThenSetValue(val2, obj2, action, componentFieldValueSetInfo.Delay); MonoBehaviour val3 = (MonoBehaviour)(object)((val2 is MonoBehaviour) ? val2 : null); if (val3 != null) { val3.StartCoroutine(enumerator); continue; } CoroutineDummy coroutineDummy = obj.AddComponent<CoroutineDummy>(); coroutineDummy.OwnerComponent = val2; coroutineDummy.SetCoroutine(enumerator); } } } static IEnumerator waitThenSetValue(Component component, object value, Action<Component, object> setValueFunc, float delay) { yield return (object)new WaitForSeconds(delay); if (Object.op_Implicit((Object)(object)component)) { setValueFunc(component, value); } } } } public class GateStateOverride { public readonly string GateName; public readonly bool Enabled; public readonly float Delay; public GateStateOverride(string gateName, bool enabled, float delay) { GateName = gateName; Enabled = enabled; Delay = delay; } public static GateStateOverride Read(BinaryReader reader) { string gateName = reader.ReadString(); bool enabled = reader.ReadBoolean(); float delay = reader.ReadSingle(); return new GateStateOverride(gateName, enabled, delay); } public IEnumerator SetOverride() { if (Delay > 0f) { yield return (object)new WaitForSeconds(Delay); } SceneInfo.instance.SetGateState(GateName, Enabled); } } internal static class PortalDialerExtender { [CompilerGenerated] private static class <>O { public static hook_PerformActionServer <0>__PortalDialerController_PerformActionServer; public static hook_OnEnter <1>__PortalDialerDialDigitState_OnEnter; public static hook_ApplyActivations <2>__SceneObjectToggleGroup_ApplyActivations; public static Action<SceneDef> <3>__SceneCatalog_onMostRecentSceneDefChanged; } private static readonly EncryptedPortalDialerResult[] _outputs = new EncryptedPortalDialerResult[4] { new EncryptedPortalDialerResult(new byte[1424] { 246, 75, 20, 176, 41, 80, 176, 67, 150, 129, 192, 216, 162, 185, 50, 41, 39, 152, 188, 117, 157, 57, 11, 71, 61, 246, 240, 31, 19, 29, 212, 183, 19, 183, 218, 34, 143, 198, 134, 73, 50, 162, 244, 255, 171, 92, 96, 34, 45, 67, 243, 94, 219, 169, 72, 237, 66, 71, 67, 29, 175, 201, 251, 44, 199, 155, 220, 143, 76, 107, 14, 189, 35, 85, 69, 16, 72, 239, 215, 21, 99, 200, 218, 251, 32, 38, 222, 81, 1, 85, 106, 161, 23, 42, 23, 84, 166, 170, 68, 126, 144, 28, 178, 218, 54, 138, 210, 170, 45, 134, 27, 119, 255, 182, 70, 68, 175, 48, 47, 214, 180, 82, 75, 230, 124, 70, 135, 161, 168, 76, 80, 62, 153, 48, 244, 67, 123, 186, 201, 234, 161, 252, 166, 254, 187, 37, 255, 129, 53, 37, 50, 180, 32, 21, 208, 218, 75, 86, 221, 177, 69, 104, 188, 125, 105, 41, 240, 60, 73, 197, 67, 103, 121, 167, 210, 71, 19, 234, 58, 21, 139, 15, 101, 66, 171, 184, 105, 71, 244, 17, 245, 210, 46, 37, 125, 91, 54, 200, 164, 0, 37, 197, 62, 206, 74, 149, 214, 239, 20, 70, 9, 177, 229, 83, 204, 29, 127, 14, 53, 236, 22, 188, 138, 239, 233, 78, 35, 253, 69, 159, 60, 248, 153, 60, 16, 224, 7, 34, 2, 161, 180, 232, 245, 139, 187, 186, 161, 158, 247, 35, 97, 192, 31, 31, 113, 51, 196, 199, 112, 120, 117, 222, 177, 219, 216, 8, 79, 34, 190, 13, 184, 205, 79, 106, 185, 222, 26, 40, 90, 224, 203, 134, 5, 195, 224, 101, 87, 208, 87, 182, 132, 119, 67, 108, 200, 34, 201, 187, 129, 198, 92, 220, 78, 99, 249, 23, 130, 254, 80, 188, 128, 90, 239, 78, 164, 105, 109, 74, 237, 175, 177, 45, 197, 142, 113, 60, 129, 199, 86, 189, 91, 3, 53, 1, 66, 123, 131, 134, 3, 78, 55, 170, 32, 198, 197, 127, 248, 107, 111, 206, 130, 34, 189, 192, 72, 105, 95, 98, 112, 254, 34, 145, 105, 69, 12, 186, 24, 155, 162, 58, 43, 64, 196, 179, 1, 153, 116, 67, 119, 74, 125, 60, 51, 45, 72, 74, 126, 124, 248, 148, 48, 244, 217, 87, 112, 234, 160, 0, 130, 58, 146, 78, 57, 180, 255, 114, 113, 126, 5, 66, 68, 187, 185, 195, 69, 66, 192, 107, 94, 159, 199, 197, 35, 171, 29, 134, 49, 61, 26, 6, 91, 204, 247, 186, 241, 119, 47, 229, 206, 249, 128, 236, 80, 70, 138, 54, 255, 41, 17, 59, 56, 166, 129, 137, 107, 92, 131, 27, 156, 246, 12, 226, 151, 53, 212, 13, 153, 230, 253, 49, 231, 105, 196, 144, 226, 74, 53, 10, 169, 37, 79, 11, 75, 211, 118, 222, 59, 12, 48, 177, 143, 58, 164, 31, 3, 225, 49, 236, 203, 129, 202, 44, 245, 173, 117, 226, 175, 175, 230, 196, 26, 174, 69, 70, 211, 10, 97, 235, 84, 21, 3, 11, 79, 68, 245, 19, 107, 117, 129, 135, 239, 27, 8, 82, 213, 27, 217, 116, 113, 144, 65, 101, 187, 216, 224, 12, 148, 19, 167, 111, 100, 126, 122, 112, 24, 97, 19, 253, 225, 230, 35, 205, 147, 204, 28, 243, 50, 240, 137, 84, 199, 74, 193, 249, 10, 181, 170, 129, 119, 141, 252, 255, 24, 72, 28, 129, 247, 24, 84, 177, 184, 242, 19, 254, 233, 210, 150, 15, 110, 39, 14, 140, 154, 220, 59, 21, 125, 124, 215, 171, 103, 160, 109, 249, 1, 110, 243, 228, 117, 16, 221, 37, 15, 129, 99, 55, 56, 105, 70, 127, 160, 47, 10, 225, 247, 100, 105, 3, 24, 109, 152, 70, 188, 62, 215, 202, 248, 234, 84, 93, 140, 68, 252, 246, 146, 72, 136, 203, 171, 152, 127, 212, 126, 64, 32, 216, 185, 191, 38, 175, 85, 42, 190, 156, 121, 178, 157, 165, 86, 41, 232, 253, 235, 85, 19, 207, 106, 87, 103, 210, 235, 156, 255, 98, 25, 246, 26, 253, 29, 101, 219, 83, 64, 21, 233, 141, 154, 224, 211, 177, 207, 209, 50, 99, 70, 113, 2, 81, 252, 97, 240, 221, 58, 17, 127, 155, 151, 119, 237, 5, 184, 255, 62, 39, 232, 122, 118, 37, 212, 112, 232, 115, 125, 132, 194, 216, 72, 114, 185, 204, 22, 101, 197, 17, 180, 135, 29, 42, 38, 20, 190, 90, 210, 178, 220, 104, 164, 13, 218, 194, 50, 74, 173, 198, 194, 15, 4, 179, 100, 163, 241, 52, 133, 38, 165, 30, 97, 108, 254, 225, 208, 239, 235, 80, 210, 73, 28, 244, 90, 209, 30, 29, 136, 250, 125, 167, 57, 170, 254, 214, 39, 245, 171, 205, 141, 240, 68, 53, 176, 132, 15, 172, 61, 244, 176, 8, 229, 187, 175, 191, 119, 122, 88, 46, 205, 238, 79, 186, 43, 203, 34, 218, 186, 237, 156, 133, 10, 210, 3, 137, 65, 28, 188, 93, 144, 127, 97, 157, 112, 51, 24, 180, 128, 77, 81, 101, 175, 28, 6, 25, 92, 194, 189, 102, 183, 252, 238, 173, 129, 92, 140, 135, 207, 0, 210, 223, 96, 22, 35, 113, 47, 126, 10, 195, 188, 232, 199, 232, 70, 216, 234, 131, 64, 229, 173, 67, 212, 187, 96, 217, 207, 201, 10, 228, 232, 63, 64, 210, 236, 145, 118, 163, 144, 188, 120, 227, 37, 233, 46, 166, 235, 229, 74, 216, 211, 46, 207, 72, 70, 202, 150, 186, 231, 214, 115, 57, 191, 142, 195, 99, 242, 194, 105, 70, 208, 155, 84, 250, 123, 50, 170, 205, 190, 39, 42, 170, 222, 75, 57, 107, 50, 76, 189, 30, 206, 107, 177, 178, 127, 189, 29, 167, 163, 165, 195, 142, 199, 114, 122, 214, 150, 196, 115, 39, 13, 223, 212, 218, 244, 77, 120, 229, 20, 224, 246, 172, 169, 61, 214, 20, 101, 150, 60, 154, 179, 136, 249, 47, 85, 94, 68, 77, 43, 204, 245, 224, 169, 142, 95, 227, 192, 43, 53, 179, 254, 24, 22, 2, 112, 37, 251, 244, 238, 162, 134, 50, 75, 165, 252, 165, 140, 13, 181, 227, 196, 64, 2, 26, 156, 0, 254, 177, 97, 123, 204, 53, 24, 200, 153, 176, 233, 130, 52, 107, 88, 126, 152, 232, 193, 235, 4, 162, 135, 169, 211, 27, 143, 209, 142, 241, 219, 32, 205, 33, 183, 210, 119, 43, 30, 196, 235, 49, 129, 77, 239, 206, 17, 80, 185, 248, 175, 184, 74, 209, 169, 104, 216, 86, 151, 201, 57, 40, 107, 208, 86, 43, 163, 137, 245, 97, 78, 100, 215, 159, 60, 12, 134, 44, 92, 165, 21, 208, 30, 28, 74, 35, 65, 52, 151, 134, 153, 254, 145, 20, 207, 229, 60, 171, 165, 30, 55, 196, 127, 18, 171, 85, 110, 151, 135, 239, 194, 200, 38, 213, 195, 18, 166, 2, 127, 187, 210, 246, 205, 5, 205, 193, 127, 142, 73, 201, 160, 8, 48, 164, 222, 238, 195, 0, 114, 254, 111, 111, 233, 73, 122, 52, 159, 160, 239, 108, 79, 65, 31, 148, 234, 57, 244, 4, 60, 137, 187, 217, 7, 7, 104, 23, 136, 248, 89, 30, 42, 204, 26, 211, 224, 95, 77, 163, 69, 0, 239, 163, 77, 18, 7, 127, 11, 239, 168, 228, 142, 72, 88, 80, 206, 236, 250, 168, 126, 142, 39, 110, 113, 223, 156, 175, 101, 150, 84, 203, 2, 111, 55, 190, 184, 246, 219, 190, 45, 83, 204, 65, 58, 229, 60, 55, 221, 42, 104, 223, 98, 249, 90, 124, 11, 219, 224, 234, 193, 11, 211, 107, 160, 156, 98, 77, 91, 219, 108, 82, 38, 88, 160, 210, 231, 80, 11, 183, 112, 191, 121, 237, 53, 239, 249, 229, 158, 52, 180, 117, 65, 139, 4, 242, 224, 105, 127, 122, 116, 183, 60, 244, 90, 62, 125, 100, 120, 64, 187, 229, 80, 3, 208, 219, 73, 175, 17, 48, 41, 203, 173, 183, 30, 91, 238, 107, 151, 244, 206, 54, 106, 225, 169, 133, 157, 175, 253, 202, 79, 227, 218, 193, 12, 184, 103, 6, 26, 156, 80, 16, 189, 106, 32, 222, 195, 69, 246, 104, 134, 117, 45, 229, 77, 146, 213, 237, 129, 181, 119, 119, 135, 135, 180, 169, 120, 176, 126, 98, 3, 4, 84, 48, 181, 225 }, new byte[32] { 62, 111, 123, 26, 42, 191, 88, 140, 171, 242, 157, 39, 175, 139, 234, 50, 146, 90, 92, 18, 79, 81, 89, 208, 27, 51, 186, 238, 141, 110, 218, 78 }), new EncryptedPortalDialerResult(new byte[64] { 129, 54, 183, 116, 103, 183, 214, 236, 26, 103, 171, 130, 106, 28, 232, 30, 98, 225, 73, 107, 71, 73, 215, 2, 156, 5, 19, 104, 31, 188, 134, 16, 128, 163, 231, 178, 227, 163, 87, 196, 238, 26, 171, 159, 200, 167, 15, 240, 105, 176, 84, 204, 190, 194, 56, 58, 201, 87, 33, 72, 54, 66, 231, 127 }, new byte[32] { 74, 155, 6, 139, 14, 12, 137, 126, 174, 215, 143, 28, 232, 51, 247, 228, 242, 68, 215, 96, 3, 231, 168, 6, 75, 217, 125, 11, 22, 250, 110, 126 }), new EncryptedPortalDialerResult(new byte[64] { 195, 167, 14, 1, 50, 156, 183, 186, 216, 53, 154, 111, 237, 95, 93, 104, 12, 168, 231, 138, 227, 13, 244, 142, 235, 95, 196, 105, 22, 0, 110, 50, 1, 235, 122, 86, 175, 102, 219, 184, 99, 145, 1, 106, 86, 22, 94, 200, 182, 153, 128, 238, 254, 247, 59, 138, 152, 212, 188, 119, 226, 217, 19, 217 }, new byte[32] { 144, 25, 112, 193, 92, 251, 210, 8, 91, 69, 111, 206, 97, 172, 168, 191, 238, 21, 165, 160, 165, 86, 125, 145, 188, 23, 142, 166, 160, 214, 177, 248 }), new EncryptedPortalDialerResult(new byte[64] { 153, 124, 171, 6, 235, 6, 61, 176, 19, 206, 97, 25, 79, 44, 231, 52, 110, 47, 4, 82, 66, 145, 32, 97, 68, 40, 51, 12, 40, 184, 0, 236, 18, 146, 107, 126, 3, 119, 99, 132, 49, 17, 42, 93, 254, 169, 230, 23, 78, 157, 130, 52, 54, 254, 72, 129, 239, 213, 215, 113, 242, 122, 198, 172 }, new byte[32] { 68, 109, 216, 138, 85, 165, 35, 189, 163, 74, 193, 177, 68, 245, 179, 209, 167, 188, 173, 115, 80, 111, 31, 79, 144, 33, 101, 243, 115, 221, 83, 208 }) }; private static PortalDialerResult _lastEnteredResult; private const string CODE_SEQUENCE_CORRECT_MESSAGE_TOKEN = "CODE_SEQUENCE_CORRECT_MESSAGE_FORMAT"; private const string CODE_SEQUENCE_INCORRECT_MESSAGE_TOKEN = "CODE_SEQUENCE_INCORRECT_MESSAGE_FORMAT"; internal static void