Decompiled source of ZetTweaks v1.2.0
plugins/ZetTweaks/ZetTweaks.dll
Decompiled 2 months 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.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using EntityStates.Missions.Arena.NullWard; using EntityStates.NewtMonster; using IL.EntityStates.Missions.Arena.NullWard; using IL.RoR2; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates.Missions.Arena.NullWard; using On.EntityStates.NewtMonster; using On.RoR2; using On.RoR2.UI.LogBook; using On.RoR2.UI.MainMenu; using RoR2; using RoR2.CharacterAI; using RoR2.Items; using RoR2.Navigation; using RoR2.UI.MainMenu; using UnityEngine; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("ZetTweaks")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ZetTweaks")] [assembly: AssemblyTitle("ZetTweaks")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace TPDespair.ZetTweaks; public static class GameplayModule { [CompilerGenerated] private sealed class <>c__DisplayClass289_0 { public ILLabel jumpTo; internal bool <SelfCrowbarHook>b__3(Instruction x) { return ILPatternMatchingExt.MatchBle(x, ref jumpTo); } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__289_1; public static Func<Instruction, bool> <>9__289_2; public static Func<HealthComponent, CharacterBody, bool> <>9__289_4; public static Manipulator <>9__289_0; public static Func<Instruction, bool> <>9__290_1; public static Func<Instruction, bool> <>9__290_2; public static Func<HealthComponent, CharacterBody, bool> <>9__290_4; public static Manipulator <>9__290_0; public static Func<Instruction, bool> <>9__291_1; public static Func<Instruction, bool> <>9__291_2; public static Func<HealthComponent, CharacterBody, bool> <>9__291_4; public static Manipulator <>9__291_0; public static hook_PlaceTeleporter <>9__292_0; public static Func<Instruction, bool> <>9__293_1; public static Func<Instruction, bool> <>9__293_2; public static Func<int, int> <>9__293_3; public static Manipulator <>9__293_0; public static hook_FixedUpdate <>9__294_0; public static hook_BeginRound <>9__295_0; public static Func<Instruction, bool> <>9__300_1; public static Func<float, float> <>9__300_2; public static Manipulator <>9__300_0; public static Func<Instruction, bool> <>9__301_1; public static Func<Instruction, bool> <>9__301_2; public static Func<Instruction, bool> <>9__301_3; public static Func<uint, uint> <>9__301_4; public static Manipulator <>9__301_0; public static Func<Instruction, bool> <>9__302_1; public static Func<uint, ShrineBloodBehavior, uint> <>9__302_2; public static Manipulator <>9__302_0; public static Func<Instruction, bool> <>9__303_1; public static Func<Instruction, bool> <>9__303_2; public static Func<float, BossGroup, int, int, float> <>9__303_3; public static Manipulator <>9__303_0; public static hook_OnEnable <>9__304_0; public static hook_OnDisable <>9__304_1; public static hook_FixedUpdate <>9__304_2; public static hook_OnEnter <>9__308_0; public static hook_OnExit <>9__308_1; public static Func<Instruction, bool> <>9__309_0; public static Func<float> <>9__309_1; public static hook_Awake <>9__310_0; public static Func<Instruction, bool> <>9__312_2; public static Func<Instruction, bool> <>9__312_3; public static Func<PickupDef, PickupDef> <>9__312_4; public static Manipulator <>9__312_0; public static hook_GetOptionsFromPickupIndex <>9__314_0; public static hook_TryZoneStart <>9__317_0; public static Action<CharacterBody, CharacterMaster> <>9__324_1; public static Manipulator <>9__324_0; public static hook_Awake <>9__327_0; public static Func<Instruction, bool> <>9__328_1; public static Func<float> <>9__328_2; public static Manipulator <>9__328_0; public static Func<Instruction, bool> <>9__329_1; public static Func<Instruction, bool> <>9__329_2; public static Func<Instruction, bool> <>9__329_3; public static Func<Instruction, bool> <>9__329_4; public static Func<ShrineChanceBehavior, Interactor, PickupIndex> <>9__329_5; public static Func<PickupIndex, bool> <>9__329_6; public static Func<Instruction, bool> <>9__329_7; public static Func<Instruction, bool> <>9__329_8; public static Manipulator <>9__329_0; public static Func<Instruction, bool> <>9__330_1; public static Func<Color, ShrineChanceBehavior, PickupIndex, Color> <>9__330_2; public static Func<Instruction, bool> <>9__330_3; public static Func<Color, ShrineChanceBehavior, PickupIndex, Color> <>9__330_4; public static Manipulator <>9__330_0; internal void <SelfCrowbarHook>b__289_0(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass289_0 CS$<>8__locals0 = new <>c__DisplayClass289_0(); ILCursor val = new ILCursor(il); CS$<>8__locals0.jumpTo = null; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 22), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref CS$<>8__locals0.jumpTo) })) { val.Index += 3; val.Emit(OpCodes.Ldarg, 0); val.Emit(OpCodes.Ldloc, 1); val.EmitDelegate<Func<HealthComponent, CharacterBody, bool>>((Func<HealthComponent, CharacterBody, bool>)((HealthComponent healthComponent, CharacterBody atkBody) => ((Object)(object)healthComponent.body == (Object)(object)atkBody) ? true : false)); val.Emit(OpCodes.Brtrue, (object)CS$<>8__locals0.jumpTo); } else { Debug.LogWarning((object)"ZetTweaks - SelfCrowbarHook Failed!"); } } internal bool <SelfCrowbarHook>b__289_1(Instruction x) { return ILPatternMatchingExt.MatchLdloc(x, 22); } internal bool <SelfCrowbarHook>b__289_2(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal bool <SelfCrowbarHook>b__289_4(HealthComponent healthComponent, CharacterBody atkBody) { if ((Object)(object)healthComponent.body == (Object)(object)atkBody) { return true; } return false; } internal void <SelfFocusHook>b__290_0(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass290_0 CS$<>8__locals0 = new <>c__DisplayClass290_0(); ILCursor val = new ILCursor(il); CS$<>8__locals0.jumpTo = null; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 27), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref CS$<>8__locals0.jumpTo) })) { val.Index += 3; val.Emit(OpCodes.Ldarg, 0); val.Emit(OpCodes.Ldloc, 1); val.EmitDelegate<Func<HealthComponent, CharacterBody, bool>>((Func<HealthComponent, CharacterBody, bool>)((HealthComponent healthComponent, CharacterBody atkBody) => ((Object)(object)healthComponent.body == (Object)(object)atkBody) ? true : false)); val.Emit(OpCodes.Brtrue, (object)CS$<>8__locals0.jumpTo); } else { Debug.LogWarning((object)"ZetTweaks - SelfFocusHook Failed!"); } } internal bool <SelfFocusHook>b__290_1(Instruction x) { return ILPatternMatchingExt.MatchLdloc(x, 27); } internal bool <SelfFocusHook>b__290_2(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal bool <SelfFocusHook>b__290_4(HealthComponent healthComponent, CharacterBody atkBody) { if ((Object)(object)healthComponent.body == (Object)(object)atkBody) { return true; } return false; } internal void <SelfWatchHook>b__291_0(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass291_0 CS$<>8__locals0 = new <>c__DisplayClass291_0(); ILCursor val = new ILCursor(il); CS$<>8__locals0.jumpTo = null; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 28), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref CS$<>8__locals0.jumpTo) })) { val.Index += 3; val.Emit(OpCodes.Ldarg, 0); val.Emit(OpCodes.Ldloc, 1); val.EmitDelegate<Func<HealthComponent, CharacterBody, bool>>((Func<HealthComponent, CharacterBody, bool>)((HealthComponent healthComponent, CharacterBody atkBody) => ((Object)(object)healthComponent.body == (Object)(object)atkBody) ? true : false)); val.Emit(OpCodes.Brtrue, (object)CS$<>8__locals0.jumpTo); } else { Debug.LogWarning((object)"ZetTweaks - SelfWatchHook Failed!"); } } internal bool <SelfWatchHook>b__291_1(Instruction x) { return ILPatternMatchingExt.MatchLdloc(x, 28); } internal bool <SelfWatchHook>b__291_2(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal bool <SelfWatchHook>b__291_4(HealthComponent healthComponent, CharacterBody atkBody) { if ((Object)(object)healthComponent.body == (Object)(object)atkBody) { return true; } return false; } internal void <PlaceTeleporterHook>b__292_0(orig_PlaceTeleporter orig, SceneDirector self) { if ((Object)(object)self.teleporterSpawnCard != (Object)null) { string text = ((Run.instance.NetworkstageClearCount >= Run.stagesPerLoop - 1) ? "iscLunarTeleporter" : "iscTeleporter"); SpawnCard val = (SpawnCard)(object)LegacyResourcesAPI.Load<InteractableSpawnCard>("spawncards/interactablespawncard/" + text); if (Object.op_Implicit((Object)(object)val)) { self.teleporterSpawnCard = val; } else { Debug.LogWarning((object)("ZetTweaks - interactablespawncard/" + text + " could not be found!")); } } orig.Invoke(self); } internal void <BazaarGestureHook>b__293_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items).GetField("AutoCastEquipment")), (Instruction x) => ILPatternMatchingExt.MatchCall<Inventory>(x, "GetItemCount") })) { val.Index += 2; val.EmitDelegate<Func<int, int>>((Func<int, int>)((int count) => (!(SceneInfo.instance.sceneDef.nameToken == "MAP_BAZAAR_TITLE")) ? count : 0)); } else { Debug.LogWarning((object)"ZetTweaks - BazaarGestureHook Failed!"); } } internal bool <BazaarGestureHook>b__293_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Items).GetField("AutoCastEquipment")); } internal bool <BazaarGestureHook>b__293_2(Instruction x) { return ILPatternMatchingExt.MatchCall<Inventory>(x, "GetItemCount"); } internal int <BazaarGestureHook>b__293_3(int count) { if (SceneInfo.instance.sceneDef.nameToken == "MAP_BAZAAR_TITLE") { return 0; } return count; } internal void <BazaarPreventKickoutHook>b__294_0(orig_FixedUpdate orig, KickFromShop self) { ((EntityState)self).outer.SetNextStateToMain(); } internal void <VoidRecoveryHook>b__295_0(orig_BeginRound orig, ArenaMissionController self) { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!NetworkServer.active) { return; } float value = VoidHealthRecoveryCfg.Value; float value2 = VoidShieldRecoveryCfg.Value; if (!(value > 0f) && !(value2 > 0f)) { return; } for (int i = 0; i < CharacterMaster.readOnlyInstancesList.Count; i++) { CharacterBody body = CharacterMaster.readOnlyInstancesList[i].GetBody(); if (Object.op_Implicit((Object)(object)body)) { HealthComponent healthComponent = body.healthComponent; if (!Compat.DisableVoidHealthHeal && value > 0f) { healthComponent.Heal(healthComponent.fullHealth * value, default(ProcChainMask), true); } if (value2 > 0f) { healthComponent.RechargeShield(healthComponent.fullShield * value2); } } } } internal void <DirectorMoneyHook>b__300_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "RoR2.CombatDirector/DirectorMoneyWave", "multiplier") })) { val.EmitDelegate<Func<float, float>>((Func<float, float>)delegate(float value) { Run instance = Run.instance; if (Object.op_Implicit((Object)(object)instance) && instance.stageClearCount < DirectorStageLimitCfg.Value) { value *= DirectorMoneyCfg.Value; } return value; }); } else { Debug.LogWarning((object)"ZetTweaks - DirectorMoneyHook Failed!"); } } internal bool <DirectorMoneyHook>b__300_1(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "RoR2.CombatDirector/DirectorMoneyWave", "multiplier"); } internal float <DirectorMoneyHook>b__300_2(float value) { Run instance = Run.instance; if (Object.op_Implicit((Object)(object)instance) && instance.stageClearCount < DirectorStageLimitCfg.Value) { value *= DirectorMoneyCfg.Value; } return value; } internal void <GoldFromKillHook>b__301_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<DeathRewards>(x, "get_goldReward"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 2) })) { val.Index += 3; val.Emit(OpCodes.Ldloc, 2); val.EmitDelegate<Func<uint, uint>>((Func<uint, uint>)delegate(uint reward) { int participatingPlayerCount = Run.instance.participatingPlayerCount; int count = PlayerCharacterMasterController.instances.Count; if (participatingPlayerCount != count) { int num = participatingPlayerCount / count; float num2 = Mathf.Max(1f, (float)num - 1f); int num3 = num + 2; int stageClearCount = Run.instance.stageClearCount; float num4 = 0.5f + 0.5f / num2 * Math.Min(num2, count - 1); num4 *= (float)Math.Max(0, num3 - stageClearCount) / (float)num3; uint num5 = (uint)((float)reward * (num2 * num4 + 1f)); if (num5 > reward) { return num5; } } return reward; }); val.Emit(OpCodes.Stloc, 2); } else { Debug.LogWarning((object)"ZetTweaks - GoldFromKillHook Failed!"); } } internal bool <GoldFromKillHook>b__301_1(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <GoldFromKillHook>b__301_2(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<DeathRewards>(x, "get_goldReward"); } internal bool <GoldFromKillHook>b__301_3(Instruction x) { return ILPatternMatchingExt.MatchStloc(x, 2); } internal uint <GoldFromKillHook>b__301_4(uint reward) { int participatingPlayerCount = Run.instance.participatingPlayerCount; int count = PlayerCharacterMasterController.instances.Count; if (participatingPlayerCount != count) { int num = participatingPlayerCount / count; float num2 = Mathf.Max(1f, (float)num - 1f); int num3 = num + 2; int stageClearCount = Run.instance.stageClearCount; float num4 = 0.5f + 0.5f / num2 * Math.Min(num2, count - 1); num4 *= (float)Math.Max(0, num3 - stageClearCount) / (float)num3; uint num5 = (uint)((float)reward * (num2 * num4 + 1f)); if (num5 > reward) { return num5; } } return reward; } internal void <ModifyBloodShrineReward>b__302_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 1) })) { val.Emit(OpCodes.Ldarg, 0); val.EmitDelegate<Func<uint, ShrineBloodBehavior, uint>>((Func<uint, ShrineBloodBehavior, uint>)delegate(uint money, ShrineBloodBehavior shrine) { if (Object.op_Implicit((Object)(object)Run.instance)) { uint num = (uint)((float)Run.instance.GetDifficultyScaledCost(25) * ((float)shrine.purchaseInteraction.cost / 100f) * BloodShrineScaleCfg.Value); if (num > money) { return num; } } return money; }); } else { Debug.LogWarning((object)"ZetTweaks - ModifyBloodShrineReward Failed!"); } } internal bool <ModifyBloodShrineReward>b__302_1(Instruction x) { return ILPatternMatchingExt.MatchStloc(x, 1); } internal uint <ModifyBloodShrineReward>b__302_2(uint money, ShrineBloodBehavior shrine) { if (Object.op_Implicit((Object)(object)Run.instance)) { uint num = (uint)((float)Run.instance.GetDifficultyScaledCost(25) * ((float)shrine.purchaseInteraction.cost / 100f) * BloodShrineScaleCfg.Value); if (num > money) { return num; } } return money; } internal void <BossRewardChanceHook>b__303_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<BossGroup>(x, "bossDropChance") })) { val.Emit(OpCodes.Ldarg, 0); val.Emit(OpCodes.Ldloc, 8); val.Emit(OpCodes.Ldloc, 2); val.EmitDelegate<Func<float, BossGroup, int, int, float>>((Func<float, BossGroup, int, int, float>)delegate(float rng, BossGroup bossGroup, int i, int count) { if (bossGroup.forceTier3Reward) { return rng; } float num = ((float)i + 1f) / (float)count; int num2 = count - i; float num3 = 0f; if (num > 0.39f) { num3 = 0.05f; } if (num > 0.59f) { num3 = 0.1f; } if (num > 0.79f) { num3 = 0.2f; } if (num2 <= 4) { num3 = Mathf.Max(0.15f, num3); } if (num2 <= 2) { num3 = Mathf.Max(0.25f, num3); } Debug.LogWarning((object)("Drop Reward - " + i + " (" + (i + 1) + " of " + count + ") progress: " + num + " rng: " + rng + " chance: " + num3 + " - " + (rng <= num3))); return (rng <= num3) ? 0f : 1f; }); } else { Debug.LogWarning((object)"ZetTweaks - BossRewardChanceHook Failed!"); } } internal bool <BossRewardChanceHook>b__303_1(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <BossRewardChanceHook>b__303_2(Instruction x) { return ILPatternMatchingExt.MatchLdfld<BossGroup>(x, "bossDropChance"); } internal float <BossRewardChanceHook>b__303_3(float rng, BossGroup bossGroup, int i, int count) { if (bossGroup.forceTier3Reward) { return rng; } float num = ((float)i + 1f) / (float)count; int num2 = count - i; float num3 = 0f; if (num > 0.39f) { num3 = 0.05f; } if (num > 0.59f) { num3 = 0.1f; } if (num > 0.79f) { num3 = 0.2f; } if (num2 <= 4) { num3 = Mathf.Max(0.15f, num3); } if (num2 <= 2) { num3 = Mathf.Max(0.25f, num3); } Debug.LogWarning((object)("Drop Reward - " + i + " (" + (i + 1) + " of " + count + ") progress: " + num + " rng: " + rng + " chance: " + num3 + " - " + (rng <= num3))); if (rng <= num3) { return 0f; } return 1f; } internal void <UnlockInteractablesHook>b__304_0(orig_OnEnable orig, OutsideInteractableLocker self) { } internal void <UnlockInteractablesHook>b__304_1(orig_OnDisable orig, OutsideInteractableLocker self) { } internal void <UnlockInteractablesHook>b__304_2(orig_FixedUpdate orig, OutsideInteractableLocker self) { } internal void <VoidCellHook>b__308_0(orig_OnEnter orig, NullWardBaseState self) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Invalid comparison between Unknown and I4 //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Invalid comparison between Unknown and I4 //IL_005b: Unknown result type (might be due to invalid IL or missing references) float num = (ModifyHoldoutValueCfg.Value ? VoidRadiusCfg.Value : NullWardBaseState.wardRadiusOn); if (Object.op_Implicit((Object)(object)Run.instance) && EclipseHoldoutLimitCfg.Value) { bool flag = (int)Run.instance.selectedDifficulty >= 4; if ((int)ZetTweaksPlugin.EclipseArtifact != -1 && RunArtifactManager.instance.IsArtifactEnabled(ZetTweaksPlugin.EclipseArtifact)) { flag = true; } if (flag) { if (num <= 20f) { num *= 2f; } else if (num < 40f) { num = 40f; } } } NullWardBaseState.wardRadiusOn = num; orig.Invoke(self); } internal void <VoidCellHook>b__308_1(orig_OnExit orig, Active self) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) HoldoutZoneController holdoutZoneController = self.holdoutZoneController; if (Object.op_Implicit((Object)(object)holdoutZoneController)) { VoidCellExitRadius = holdoutZoneController.currentRadius; ChildLocator childLocator = ((NullWardBaseState)self).childLocator; if (Object.op_Implicit((Object)(object)childLocator)) { Transform val = ((NullWardBaseState)self).childLocator.FindChild("CompleteEffect"); if (Object.op_Implicit((Object)(object)val)) { float num = VoidCellExitRadius * 0.933f; val.localScale = new Vector3(num, num, num); } } } orig.Invoke(self); } internal bool <ReplaceWardRadius>b__309_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(NullWardBaseState).GetField("wardRadiusOn")); } internal float <ReplaceWardRadius>b__309_1() { return Mathf.Max(10f, VoidCellExitRadius); } internal void <HoldoutZoneHook>b__310_0(orig_Awake orig, HoldoutZoneController self) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Invalid comparison between Unknown and I4 //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Invalid comparison between Unknown and I4 //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (ModifyHoldoutValueCfg.Value) { ModifyHoldoutValues(self); } if (EclipseHoldoutLimitCfg.Value) { bool flag = (int)Run.instance.selectedDifficulty >= 4; if ((int)ZetTweaksPlugin.EclipseArtifact != -1 && RunArtifactManager.instance.IsArtifactEnabled(ZetTweaksPlugin.EclipseArtifact)) { flag = true; } if (flag) { if (self.baseRadius <= 20f) { self.baseRadius *= 2f; } else if (self.baseRadius < 40f) { self.baseRadius = 40f; } } } orig.Invoke(self); } internal void <CommandDropletFix>b__312_0(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown <>c__DisplayClass312_0 CS$<>8__locals0 = new <>c__DisplayClass312_0(); ILCursor val = new ILCursor(il); CS$<>8__locals0.methodInfo = typeof(PickupCatalog).GetMethod("GetPickupDef"); int num2 = default(int); int num = default(int); if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, (MethodBase)CS$<>8__locals0.methodInfo), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num) })) { val.Index += 3; val.EmitDelegate<Func<PickupDef, PickupDef>>((Func<PickupDef, PickupDef>)delegate(PickupDef pickupDef) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Invalid comparison between Unknown and I4 //IL_0053: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) if (Compat.ZetAspects && !AspectsResolved) { ResolveAspects(); } if ((int)pickupDef.itemIndex != -1 && (!Compat.ZetAspects || !AspectCommandGroupItems || !aspectItemIndexes.Contains(pickupDef.itemIndex))) { ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex); if (itemDef.ContainsTag((ItemTag)9)) { return null; } } if ((int)pickupDef.equipmentIndex != -1 && (!Compat.ZetAspects || !AspectCommandGroupEquip || !aspectEquipIndexes.Contains(pickupDef.equipmentIndex))) { EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(pickupDef.equipmentIndex); if (!equipmentDef.canDrop) { return null; } } return pickupDef; }); } else { Debug.LogWarning((object)"ZetTweaks - CommandDropletFix Failed!"); } } internal bool <CommandDropletFix>b__312_2(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal bool <CommandDropletFix>b__312_3(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal PickupDef <CommandDropletFix>b__312_4(PickupDef pickupDef) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Invalid comparison between Unknown and I4 //IL_0053: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) if (Compat.ZetAspects && !AspectsResolved) { ResolveAspects(); } if ((int)pickupDef.itemIndex != -1 && (!Compat.ZetAspects || !AspectCommandGroupItems || !aspectItemIndexes.Contains(pickupDef.itemIndex))) { ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex); if (itemDef.ContainsTag((ItemTag)9)) { return null; } } if ((int)pickupDef.equipmentIndex != -1 && (!Compat.ZetAspects || !AspectCommandGroupEquip || !aspectEquipIndexes.Contains(pickupDef.equipmentIndex))) { EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(pickupDef.equipmentIndex); if (!equipmentDef.canDrop) { return null; } } return pickupDef; } internal Option[] <CleanPickerOptionsHook>b__314_0(orig_GetOptionsFromPickupIndex orig, PickupIndex pickupIndex) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) Option[] options = orig.Invoke(pickupIndex); return CleanupOptions(options); } internal void <PickupTeleportHook>b__317_0(orig_TryZoneStart orig, MapZone self, Collider collider) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) if ((int)self.zoneType == 0 && ColliderPickup(collider)) { SpawnCard val = ScriptableObject.CreateInstance<SpawnCard>(); val.hullSize = (HullClassification)0; val.nodeGraphType = (GraphType)0; val.prefab = LegacyResourcesAPI.Load<GameObject>("SpawnCards/HelperPrefab"); DirectorPlacementRule val2 = new DirectorPlacementRule { placementMode = (PlacementMode)3, position = ((Component)collider).transform.position }; GameObject val3 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, val2, RoR2Application.rng)); if (Object.op_Implicit((Object)(object)val3)) { Debug.Log((object)"tp item back"); TeleportHelper.TeleportGameObject(((Component)collider).gameObject, val3.transform.position); Object.Destroy((Object)(object)val3); } Object.Destroy((Object)(object)val); } orig.Invoke(self, collider); } internal void <HandleDroneDeathHook>b__324_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0011: 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) ILCursor val = new ILCursor(il); val.Index = 0; val.Emit(OpCodes.Ldarg, 1); val.Emit(OpCodes.Ldarg, 0); val.EmitDelegate<Action<CharacterBody, CharacterMaster>>((Action<CharacterBody, CharacterMaster>)delegate(CharacterBody body, CharacterMaster master) { OnDroneBodyDeath(master, body); }); } internal void <HandleDroneDeathHook>b__324_1(CharacterBody body, CharacterMaster master) { OnDroneBodyDeath(master, body); } internal void <ChanceShrineAwakeHook>b__327_0(orig_Awake orig, ShrineChanceBehavior self) { bool flag = self.failureChance >= 0.945f; if (!flag) { self.maxPurchaseCount = ChanceShrineCountCfg.Value; self.costMultiplierPerPurchase = ChanceShrineCostMultCfg.Value; self.refreshTimer = ChanceShrineTimerCfg.Value; } orig.Invoke(self); if (!flag) { PurchaseInteraction purchaseInteraction = self.purchaseInteraction; if (Object.op_Implicit((Object)(object)purchaseInteraction)) { purchaseInteraction.cost = ChanceShrineCostCfg.Value; } else { Debug.LogWarning((object)"ZetTweaks - ChanceShrineAwakeHook : Could not set base cost!"); } } } internal void <ChanceShrineTimerHook>b__328_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld<ShrineChanceBehavior>(x, "refreshTimer") })) { val.Emit(OpCodes.Pop); val.EmitDelegate<Func<float>>((Func<float>)(() => ChanceShrineTimerCfg.Value)); } else { Debug.LogWarning((object)"ZetTweaks - ChanceShrineTimerHook Failed!"); } } internal bool <ChanceShrineTimerHook>b__328_1(Instruction x) { return ILPatternMatchingExt.MatchStfld<ShrineChanceBehavior>(x, "refreshTimer"); } internal float <ChanceShrineTimerHook>b__328_2() { return ChanceShrineTimerCfg.Value; } internal void <ChanceShrineDropHook>b__329_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00bd: 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_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MethodReference val3 = default(MethodReference); if (val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdsfld<PickupIndex>(x, "none"), (Instruction x) => ILPatternMatchingExt.MatchCall(x, ref val3), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 3) })) { val.Index += 4; ILLabel val2 = val.MarkLabel(); val.Emit(OpCodes.Ldarg, 0); val.Emit(OpCodes.Ldarg, 1); val.EmitDelegate<Func<ShrineChanceBehavior, Interactor, PickupIndex>>((Func<ShrineChanceBehavior, Interactor, PickupIndex>)((ShrineChanceBehavior self, Interactor interactor) => GenerateDrop(self, interactor))); val.Emit(OpCodes.Stloc, 0); val.Emit(OpCodes.Ldloc, 0); val.EmitDelegate<Func<PickupIndex, bool>>((Func<PickupIndex, bool>)((PickupIndex pickupIndex) => pickupIndex == PickupIndex.none)); val.Emit(OpCodes.Stloc, 3); val.Index = 0; if (val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Component>(x, "GetComponent"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 1) })) { if (val2 != null) { val.Index += 2; val.Emit(OpCodes.Br, val2.Target); } else { Debug.LogWarning((object)"ZetTweaks - ChanceShrineDropHook:Illabel is null!"); } } else { Debug.LogWarning((object)"ZetTweaks - ChanceShrineDropHook:Bypass Failed!"); } } else { Debug.LogWarning((object)"ZetTweaks - ChanceShrineDropHook:BypassSetup Failed!"); } } internal bool <ChanceShrineDropHook>b__329_1(Instruction x) { return ILPatternMatchingExt.MatchLdloc(x, 0); } internal bool <ChanceShrineDropHook>b__329_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld<PickupIndex>(x, "none"); } internal bool <ChanceShrineDropHook>b__329_3(Instruction x) { MethodReference val = default(MethodReference); return ILPatternMatchingExt.MatchCall(x, ref val); } internal bool <ChanceShrineDropHook>b__329_4(Instruction x) { return ILPatternMatchingExt.MatchStloc(x, 3); } internal PickupIndex <ChanceShrineDropHook>b__329_5(ShrineChanceBehavior self, Interactor interactor) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) return GenerateDrop(self, interactor); } internal bool <ChanceShrineDropHook>b__329_6(PickupIndex pickupIndex) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) return pickupIndex == PickupIndex.none; } internal bool <ChanceShrineDropHook>b__329_7(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Component>(x, "GetComponent"); } internal bool <ChanceShrineDropHook>b__329_8(Instruction x) { return ILPatternMatchingExt.MatchStloc(x, 1); } internal void <ChanceShrineColorHook>b__330_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<ShrineChanceBehavior>(x, "colorShrineRewardJackpot") })) { val.Index += 1; val.Emit(OpCodes.Ldarg, 0); val.Emit(OpCodes.Ldloc, 0); val.EmitDelegate<Func<Color, ShrineChanceBehavior, PickupIndex, Color>>((Func<Color, ShrineChanceBehavior, PickupIndex, Color>)((Color color, ShrineChanceBehavior self, PickupIndex pickupIndex) => (self.failureChance >= 0.945f) ? color : GetPickupColor(pickupIndex))); } else { Debug.LogWarning((object)"ZetTweaks - ChanceShrineColorHook:Jackpot Failed!"); } val.Index = 0; if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<ShrineChanceBehavior>(x, "colorShrineRewardNormal") })) { val.Index += 1; val.Emit(OpCodes.Ldarg, 0); val.Emit(OpCodes.Ldloc, 0); val.EmitDelegate<Func<Color, ShrineChanceBehavior, PickupIndex, Color>>((Func<Color, ShrineChanceBehavior, PickupIndex, Color>)((Color color, ShrineChanceBehavior self, PickupIndex pickupIndex) => (self.failureChance >= 0.945f) ? color : GetPickupColor(pickupIndex))); } else { Debug.LogWarning((object)"ZetTweaks - ChanceShrineColorHook:Normal Failed!"); } } internal bool <ChanceShrineColorHook>b__330_1(Instruction x) { return ILPatternMatchingExt.MatchLdfld<ShrineChanceBehavior>(x, "colorShrineRewardJackpot"); } internal Color <ChanceShrineColorHook>b__330_2(Color color, ShrineChanceBehavior self, PickupIndex pickupIndex) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_0024: Unknown result type (might be due to invalid IL or missing references) if (self.failureChance >= 0.945f) { return color; } return GetPickupColor(pickupIndex); } internal bool <ChanceShrineColorHook>b__330_3(Instruction x) { return ILPatternMatchingExt.MatchLdfld<ShrineChanceBehavior>(x, "colorShrineRewardNormal"); } internal Color <ChanceShrineColorHook>b__330_4(Color color, ShrineChanceBehavior self, PickupIndex pickupIndex) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_0024: Unknown result type (might be due to invalid IL or missing references) if (self.failureChance >= 0.945f) { return color; } return GetPickupColor(pickupIndex); } internal GameObject <.cctor>b__335_0() { return LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/DroneBackupMaster"); } internal GameObject <.cctor>b__335_1() { return LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/Drone1Master"); } internal GameObject <.cctor>b__335_2() { return LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/FlameDroneMaster"); } internal GameObject <.cctor>b__335_3() { return LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/DroneMissileMaster"); } internal GameObject <.cctor>b__335_4() { return LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/Turret1Master"); } internal GameObject <.cctor>b__335_5() { return LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/MegaDroneMaster"); } internal GameObject <.cctor>b__335_6() { return LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/EquipmentDroneMaster"); } internal GameObject <.cctor>b__335_7() { return LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/EngiTurretMaster"); } internal GameObject <.cctor>b__335_8() { return LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/EngiWalkerTurretMaster"); } internal GameObject <.cctor>b__335_9() { return LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/EngiBeamTurretMaster"); } internal GameObject <.cctor>b__335_10() { return LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/BeetleGuardAllyMaster"); } internal GameObject <.cctor>b__335_11() { return LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/roboBallGreenBuddyMaster"); } internal GameObject <.cctor>b__335_12() { return LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/roboBallRedBuddyMaster"); } internal SpawnCard <.cctor>b__335_13() { return (SpawnCard)(object)LegacyResourcesAPI.Load<InteractableSpawnCard>("spawncards/interactablespawncard/iscBrokenTurret1"); } internal SpawnCard <.cctor>b__335_14() { return (SpawnCard)(object)LegacyResourcesAPI.Load<InteractableSpawnCard>("spawncards/interactablespawncard/iscBrokenMegaDrone"); } internal SpawnCard <.cctor>b__335_15() { return (SpawnCard)(object)LegacyResourcesAPI.Load<InteractableSpawnCard>("spawncards/interactablespawncard/iscBrokenEquipmentDrone"); } } [CompilerGenerated] private sealed class <>c__DisplayClass290_0 { public ILLabel jumpTo; internal bool <SelfFocusHook>b__3(Instruction x) { return ILPatternMatchingExt.MatchBle(x, ref jumpTo); } } [CompilerGenerated] private sealed class <>c__DisplayClass291_0 { public ILLabel jumpTo; internal bool <SelfWatchHook>b__3(Instruction x) { return ILPatternMatchingExt.MatchBle(x, ref jumpTo); } } [CompilerGenerated] private sealed class <>c__DisplayClass312_0 { public MethodInfo methodInfo; internal bool <CommandDropletFix>b__1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, (MethodBase)methodInfo); } } private static readonly Lazy<GameObject> _backupDroneMaster = new Lazy<GameObject>((Func<GameObject>)(() => LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/DroneBackupMaster"))); private static readonly Lazy<GameObject> _drone1Master = new Lazy<GameObject>((Func<GameObject>)(() => LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/Drone1Master"))); private static readonly Lazy<GameObject> _flameDroneMaster = new Lazy<GameObject>((Func<GameObject>)(() => LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/FlameDroneMaster"))); private static readonly Lazy<GameObject> _missileDroneMaster = new Lazy<GameObject>((Func<GameObject>)(() => LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/DroneMissileMaster"))); private static readonly Lazy<GameObject> _turret1Master = new Lazy<GameObject>((Func<GameObject>)(() => LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/Turret1Master"))); private static readonly Lazy<GameObject> _megaDroneMaster = new Lazy<GameObject>((Func<GameObject>)(() => LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/MegaDroneMaster"))); private static readonly Lazy<GameObject> _equipmentDroneMaster = new Lazy<GameObject>((Func<GameObject>)(() => LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/EquipmentDroneMaster"))); private static readonly Lazy<GameObject> _engiTurretMaster = new Lazy<GameObject>((Func<GameObject>)(() => LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/EngiTurretMaster"))); private static readonly Lazy<GameObject> _engiWalkerTurretMaster = new Lazy<GameObject>((Func<GameObject>)(() => LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/EngiWalkerTurretMaster"))); private static readonly Lazy<GameObject> _engiBeamTurretMaster = new Lazy<GameObject>((Func<GameObject>)(() => LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/EngiBeamTurretMaster"))); private static readonly Lazy<GameObject> _beetleGuardAllyMaster = new Lazy<GameObject>((Func<GameObject>)(() => LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/BeetleGuardAllyMaster"))); private static readonly Lazy<GameObject> _roboBallGreenBuddyMaster = new Lazy<GameObject>((Func<GameObject>)(() => LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/roboBallGreenBuddyMaster"))); private static readonly Lazy<GameObject> _roboBallRedBuddyMaster = new Lazy<GameObject>((Func<GameObject>)(() => LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/roboBallRedBuddyMaster"))); private static readonly Lazy<SpawnCard> _turret1SpawnCard = new Lazy<SpawnCard>((Func<SpawnCard>)(() => (SpawnCard)(object)LegacyResourcesAPI.Load<InteractableSpawnCard>("spawncards/interactablespawncard/iscBrokenTurret1"))); private static readonly Lazy<SpawnCard> _megaDroneSpawnCard = new Lazy<SpawnCard>((Func<SpawnCard>)(() => (SpawnCard)(object)LegacyResourcesAPI.Load<InteractableSpawnCard>("spawncards/interactablespawncard/iscBrokenMegaDrone"))); private static readonly Lazy<SpawnCard> _equipDroneSpawnCard = new Lazy<SpawnCard>((Func<SpawnCard>)(() => (SpawnCard)(object)LegacyResourcesAPI.Load<InteractableSpawnCard>("spawncards/interactablespawncard/iscBrokenEquipmentDrone"))); internal static GameObject LunarEquipmentDropletPrefab; private static bool AspectsResolved = false; internal static bool AspectCommandGroupItems = false; internal static bool AspectCommandGroupEquip = false; internal static List<ItemIndex> aspectItemIndexes = new List<ItemIndex>(); internal static List<EquipmentIndex> aspectEquipIndexes = new List<EquipmentIndex>(); private static float VoidCellExitRadius = 15f; public static ConfigEntry<bool> EnableModuleCfg { get; set; } public static ConfigEntry<bool> FixSelfDamageCfg { get; set; } public static ConfigEntry<bool> FixMeanderTeleporterCfg { get; set; } public static ConfigEntry<bool> BazaarGestureCfg { get; set; } public static ConfigEntry<bool> BazaarPreventKickoutCfg { get; set; } public static ConfigEntry<float> VoidHealthRecoveryCfg { get; set; } public static ConfigEntry<float> VoidShieldRecoveryCfg { get; set; } public static ConfigEntry<int> RecolorLunarEquipmentCfg { get; set; } public static ConfigEntry<float> MoneyChestGivenCfg { get; set; } public static ConfigEntry<int> MoneyStageLimitCfg { get; set; } public static ConfigEntry<float> BloodShrineScaleCfg { get; set; } public static ConfigEntry<float> DirectorMoneyCfg { get; set; } public static ConfigEntry<int> DirectorStageLimitCfg { get; set; } public static ConfigEntry<bool> MultitudeMoneyCfg { get; set; } public static ConfigEntry<bool> BossDropTweakCfg { get; set; } public static ConfigEntry<bool> UnlockInteractablesCfg { get; set; } public static ConfigEntry<bool> EclipseHoldoutLimitCfg { get; set; } public static ConfigEntry<bool> ModifyHoldoutValueCfg { get; set; } public static ConfigEntry<float> TeleRadiusCfg { get; set; } public static ConfigEntry<float> TeleTimeCfg { get; set; } public static ConfigEntry<float> VoidRadiusCfg { get; set; } public static ConfigEntry<float> VoidTimeCfg { get; set; } public static ConfigEntry<float> VoidBossRadiusCfg { get; set; } public static ConfigEntry<float> VoidBossTimeCfg { get; set; } public static ConfigEntry<float> MassRadiusCfg { get; set; } public static ConfigEntry<float> MassTimeCfg { get; set; } public static ConfigEntry<float> ShipRadiusCfg { get; set; } public static ConfigEntry<float> ShipTimeCfg { get; set; } public static ConfigEntry<int> MoonHoldoutZonesCfg { get; set; } public static ConfigEntry<int> VoidBossHoldoutZonesCfg { get; set; } public static ConfigEntry<bool> CommandDropletFixCfg { get; set; } public static ConfigEntry<bool> CleanPickerOptionsCfg { get; set; } public static ConfigEntry<bool> TeleportLostDropletCfg { get; set; } public static ConfigEntry<bool> DroneFriendlyFireFixCfg { get; set; } public static ConfigEntry<float> DroneEquipmentDropCfg { get; set; } public static ConfigEntry<bool> DroneTC280AnywhereCfg { get; set; } public static ConfigEntry<bool> DroneEquipmentAnywhereCfg { get; set; } public static ConfigEntry<bool> DroneTC280RepurchasableCfg { get; set; } public static ConfigEntry<bool> DroneTurretRepurchasableCfg { get; set; } public static ConfigEntry<bool> ModifyChanceShrineCfg { get; set; } public static ConfigEntry<int> ChanceShrineCountCfg { get; set; } public static ConfigEntry<float> ChanceShrineTimerCfg { get; set; } public static ConfigEntry<int> ChanceShrineCostCfg { get; set; } public static ConfigEntry<float> ChanceShrineCostMultCfg { get; set; } public static ConfigEntry<int> ChanceShrineMaxFailCfg { get; set; } public static ConfigEntry<float> ChanceShrineFailureCfg { get; set; } public static ConfigEntry<float> ChanceShrineFailureMultCfg { get; set; } public static ConfigEntry<bool> ChanceShrineHackedLockCfg { get; set; } public static ConfigEntry<bool> ChanceShrineBypassDropTableCfg { get; set; } public static ConfigEntry<bool> ChanceShrineLunarConversionCfg { get; set; } public static ConfigEntry<float> ChanceShrineEquipmentCfg { get; set; } public static ConfigEntry<float> ChanceShrineEquipmentMultCfg { get; set; } public static ConfigEntry<float> ChanceShrineCommonCfg { get; set; } public static ConfigEntry<float> ChanceShrineCommonMultCfg { get; set; } public static ConfigEntry<float> ChanceShrineUncommonCfg { get; set; } public static ConfigEntry<float> ChanceShrineUncommonMultCfg { get; set; } public static ConfigEntry<float> ChanceShrineLegendaryCfg { get; set; } public static ConfigEntry<float> ChanceShrineLegendaryMultCfg { get; set; } internal static GameObject BackupDroneMaster => _backupDroneMaster.Value; internal static GameObject Drone1Master => _drone1Master.Value; internal static GameObject FlameDroneMaster => _flameDroneMaster.Value; internal static GameObject MissileDroneMaster => _missileDroneMaster.Value; internal static GameObject Turret1Master => _turret1Master.Value; internal static GameObject MegaDroneMaster => _megaDroneMaster.Value; internal static GameObject EquipmentDroneMaster => _equipmentDroneMaster.Value; internal static GameObject EngiTurretMaster => _engiTurretMaster.Value; internal static GameObject EngiWalkerTurretMaster => _engiWalkerTurretMaster.Value; internal static GameObject EngiBeamTurretMaster => _engiBeamTurretMaster.Value; internal static GameObject BeetleGuardAllyMaster => _beetleGuardAllyMaster.Value; internal static GameObject RoboBallGreenBuddyMaster => _roboBallGreenBuddyMaster.Value; internal static GameObject RoboBallRedBuddyMaster => _roboBallRedBuddyMaster.Value; internal static SpawnCard Turret1SpawnCard => _turret1SpawnCard.Value; internal static SpawnCard MegaDroneSpawnCard => _megaDroneSpawnCard.Value; internal static SpawnCard EquipDroneSpawnCard => _equipDroneSpawnCard.Value; internal static void SetupConfig() { ConfigFile configFile = ZetTweaksPlugin.ConfigFile; EnableModuleCfg = configFile.Bind<bool>("2a-Gameplay - Enable", "enableGameplayModule", true, "Enable Gameplay Module."); FixSelfDamageCfg = configFile.Bind<bool>("2b-Gameplay - Fixes", "fixSelfDamage", true, "Prevent Focus Crystal, Crowbar and DelicateWatch from increasing self damage."); FixMeanderTeleporterCfg = configFile.Bind<bool>("2b-Gameplay - Fixes", "endloopTeleporter", true, "Always spawn Primordial Teleporter after it first appears."); BazaarGestureCfg = configFile.Bind<bool>("2b-Gameplay - QOL", "disableBazaarGesture", true, "Prevent Gesture from firing equipment in Bazaar."); BazaarPreventKickoutCfg = configFile.Bind<bool>("2b-Gameplay - QOL", "disableBazaarKickout", true, "Prevent damaging the Newt from kicking players from the Bazaar."); VoidHealthRecoveryCfg = configFile.Bind<float>("2b-Gameplay - QOL", "voidHealthRecovery", 0.5f, "Recover health fraction when a voidcell is activated. 0 to disable."); VoidShieldRecoveryCfg = configFile.Bind<float>("2b-Gameplay - QOL", "voidShieldRecovery", 0.5f, "Recover shield fraction when a voidcell is activated. 0 to disable."); RecolorLunarEquipmentCfg = configFile.Bind<int>("2b-Gameplay - Tweak", "recolorLunarEquipment", 1, "Change the color of lunar equipment droplets. 0 = Disabled, 1 = AutoCompat, 2 = Force Enabled"); MoneyChestGivenCfg = configFile.Bind<float>("2c-Gameplay - Economy", "startingMoney", 1.25f, "Money given at stage start (measured in chests)."); MoneyStageLimitCfg = configFile.Bind<int>("2c-Gameplay - Economy", "stageMoneyLimit", 5, "Last stage to give start money. 0 to disable."); BloodShrineScaleCfg = configFile.Bind<float>("2c-Gameplay - Economy", "bloodShrineScale", 2f, "Minimum money given (measured in chests) when blood shrine takes 100% health. 0 to disable."); DirectorMoneyCfg = configFile.Bind<float>("2c-Gameplay - Economy", "directorMoney", 1.1f, "Combat director money wave amount multiplier."); DirectorStageLimitCfg = configFile.Bind<int>("2c-Gameplay - Economy", "stageDirectorLimit", 5, "Last stage to modify combat director money. 0 to disable."); MultitudeMoneyCfg = configFile.Bind<bool>("2c-Gameplay - Economy", "multitudeMoneyBoost", true, "Decaying boost to money from kills when multitudes is enabled."); BossDropTweakCfg = configFile.Bind<bool>("2d-Gameplay - TeleporterBoss", "tweakBossDropRewards", true, "Adjust Teleporter boss drop chance when creating ring of drops - reduced at start and increased near end."); UnlockInteractablesCfg = configFile.Bind<bool>("2d-Gameplay - TeleporterBoss", "bossUnlockInteractable", true, "Prevent Teleporter from locking outside interactables."); EclipseHoldoutLimitCfg = configFile.Bind<bool>("2e-Gameplay - HoldoutZone", "eclipseHoldoutLimiter", true, "Prevent Eclipse from shrinking small holdout zones."); ModifyHoldoutValueCfg = configFile.Bind<bool>("2e-Gameplay - HoldoutZone", "modifyHoldoutValues", true, "Enable or disable changing radius and charge times of holdout zones except eclipse limiter."); TeleRadiusCfg = configFile.Bind<float>("2e-Gameplay - HoldoutZone", "teleHoldoutRadius", 90f, "Base radius of teleporter holdout zone. Vanilla is 60"); TeleTimeCfg = configFile.Bind<float>("2e-Gameplay - HoldoutZone", "teleHoldoutTime", 90f, "Base duration of teleporter holdout zone. Vanilla is 90"); VoidRadiusCfg = configFile.Bind<float>("2e-Gameplay - HoldoutZone", "voidHoldoutRadius", 20f, "Base radius of void field holdout zone. Vanilla is 15"); VoidTimeCfg = configFile.Bind<float>("2e-Gameplay - HoldoutZone", "voidHoldoutTime", 45f, "Base duration of void field holdout zone. Vanilla is 60"); VoidBossRadiusCfg = configFile.Bind<float>("2e-Gameplay - HoldoutZone", "voidBossHoldoutRadius", 30f, "Base radius of deep void holdout zone. Vanilla is 20"); VoidBossTimeCfg = configFile.Bind<float>("2e-Gameplay - HoldoutZone", "voidBossHoldoutTime", 45f, "Base duration of deep void holdout zone. Vanilla is 60"); MassRadiusCfg = configFile.Bind<float>("2e-Gameplay - HoldoutZone", "massHoldoutRadius", 30f, "Base radius of pillar of mass holdout zone. Vanilla is 20"); MassTimeCfg = configFile.Bind<float>("2e-Gameplay - HoldoutZone", "massHoldoutTime", 45f, "Base duration of pillar of mass holdout zone. Vanilla is 60"); ShipRadiusCfg = configFile.Bind<float>("2e-Gameplay - HoldoutZone", "shipHoldoutRadius", 60f, "Base radius of rescue ship holdout zone. Vanilla is 40"); ShipTimeCfg = configFile.Bind<float>("2e-Gameplay - HoldoutZone", "shipHoldoutTime", 45f, "Base duration of rescue ship holdout zone. Vanilla is 60"); MoonHoldoutZonesCfg = configFile.Bind<int>("2e-Gameplay - HoldoutZone", "moonHoldoutZones", 3, "Pillars required to fight Mithrix. Range : 1 - 4"); VoidBossHoldoutZonesCfg = configFile.Bind<int>("2e-Gameplay - HoldoutZone", "voidBossHoldoutZones", 3, "Pillars required to fight Voidling. Range : 1 - 4"); CommandDropletFixCfg = configFile.Bind<bool>("2f-Gameplay - Droplet", "commandDropletFix", true, "No command droplet for items that don't give choices."); CleanPickerOptionsCfg = configFile.Bind<bool>("2f-Gameplay - Droplet", "cleanPickerOptions", true, "Remove disabled-unobtainable items from command options."); TeleportLostDropletCfg = configFile.Bind<bool>("2f-Gameplay - Droplet", "teleportLostDroplet", true, "Teleport pickup droplets that go out of bounds."); DroneFriendlyFireFixCfg = configFile.Bind<bool>("2H-Gameplay - Drone", "droneFriendlyFireFix", true, "Prevent most drones from targeting allies."); DroneEquipmentDropCfg = configFile.Bind<float>("2H-Gameplay - Drone", "droneEquipmentDrop", 0.25f, "Chance for equipment drones to drop their equipment. 1 = 100% chance"); DroneTC280RepurchasableCfg = configFile.Bind<bool>("2H-Gameplay - Drone", "droneTC280Repurchasable", true, "Make the TC280 repurchasable after it is destroyed."); DroneTurretRepurchasableCfg = configFile.Bind<bool>("2H-Gameplay - Drone", "droneTurretRepurchasable", true, "Make the Gunner Turret repurchasable after it is destroyed."); DroneTC280AnywhereCfg = configFile.Bind<bool>("2H-Gameplay - Drone", "droneTC280Anywhere", true, "Allow the TC-280 to spawn anywhere regular drones spawn."); DroneEquipmentAnywhereCfg = configFile.Bind<bool>("2H-Gameplay - Drone", "droneEquipmentAnywhere", true, "Allow Equipment Drones to spawn anywhere regular drones spawn."); ModifyChanceShrineCfg = configFile.Bind<bool>("2i-Gameplay - Shrine", "modifyChanceShrine", true, "Modify chance shrine behavior."); ChanceShrineCountCfg = configFile.Bind<int>("2i-Gameplay - Shrine", "chanceShrineCount", 2, "Maximum successful purchases from a chance shrine."); ChanceShrineTimerCfg = configFile.Bind<float>("2i-Gameplay - Shrine", "chanceShrineTimer", 1f, "Time between chance shrine uses. Vanilla is 2"); ChanceShrineCostCfg = configFile.Bind<int>("2i-Gameplay - Shrine", "chanceShrineCost", 17, "Base cost of chance shrine. Vanilla is 17"); ChanceShrineCostMultCfg = configFile.Bind<float>("2i-Gameplay - Shrine", "chanceShrineCostMult", 1.4f, "Cost multiplier every time chance shrine is used. Vanilla is 1.4"); ChanceShrineMaxFailCfg = configFile.Bind<int>("2i-Gameplay - Shrine", "chanceShrineMaxFail", 5, "Consecutive failure effects dont scale past this amount."); ChanceShrineFailureCfg = configFile.Bind<float>("2i-Gameplay - Shrine", "chanceShrineFailure", 0.45f, "Base fail chance of chance shrine. Vanilla is 0.45 = 45%"); ChanceShrineFailureMultCfg = configFile.Bind<float>("2i-Gameplay - Shrine", "chanceShrineFailureMult", 0.9f, "Fail chance multiplier for each consecutive chance shrine failure."); ChanceShrineHackedLockCfg = configFile.Bind<bool>("2i-Gameplay - Shrine", "chanceShrineHackedLock", true, "Lock consecutive failure count if price is zero."); ChanceShrineBypassDropTableCfg = configFile.Bind<bool>("2i-Gameplay - Shrine", "chanceShrineBypassDropTable", true, "Use custom item tier weights to roll items instead of the default drop table."); ChanceShrineLunarConversionCfg = configFile.Bind<bool>("2i-Gameplay - Shrine", "chanceShrineLunarConversion", true, "Allow Eulogy Zero to convert rewards to lunar when using custom weights."); ChanceShrineEquipmentCfg = configFile.Bind<float>("2i-Gameplay - Shrine", "chanceShrineEquipment", 9f, "Base equipment drop weight from shrine reward. vanilla is 9"); ChanceShrineEquipmentMultCfg = configFile.Bind<float>("2i-Gameplay - Shrine", "chanceShrineEquipmentMult", 0.75f, "Equipment drop weight multiplier for each consecutive chance shrine failure."); ChanceShrineCommonCfg = configFile.Bind<float>("2i-Gameplay - Shrine", "chanceShrineCommon", 36f, "Base common drop weight from shrine reward. vanilla is 36"); ChanceShrineCommonMultCfg = configFile.Bind<float>("2i-Gameplay - Shrine", "chanceShrineCommonMult", 0.75f, "Common drop weight multiplier for each consecutive chance shrine failure."); ChanceShrineUncommonCfg = configFile.Bind<float>("2i-Gameplay - Shrine", "chanceShrineUncommon", 9f, "Base uncommon drop weight from shrine reward. vanilla is 9"); ChanceShrineUncommonMultCfg = configFile.Bind<float>("2i-Gameplay - Shrine", "chanceShrineUncommonMult", 1.5f, "Uncommon drop weight multiplier for each consecutive chance shrine failure."); ChanceShrineLegendaryCfg = configFile.Bind<float>("2i-Gameplay - Shrine", "chanceShrineLegendary", 1f, "Base legendary drop weight from shrine reward. vanilla is 1"); ChanceShrineLegendaryMultCfg = configFile.Bind<float>("2i-Gameplay - Shrine", "chanceShrineLegendaryMult", 2f, "Legendary drop weight multiplier for each consecutive chance shrine failure."); } internal static void Init() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown if (EnableModuleCfg.Value) { if (FixMeanderTeleporterCfg.Value) { PlaceTeleporterHook(); } VoidRecoveryHook(); if (DirectorStageLimitCfg.Value > 0) { DirectorMoneyHook(); } if (MultitudeMoneyCfg.Value) { GoldFromKillHook(); } MoonBatteryMissionController.onInstanceChangedGlobal += ChangeRequiredBatteries; VoidStageMissionController.Start += new hook_Start(ChangeRequiredDeepVoidCells); if (DroneTC280AnywhereCfg.Value || DroneEquipmentAnywhereCfg.Value) { SceneDirector.onGenerateInteractableCardSelection += AddMissingDroneSpawnCards; } } } internal static void LateInit() { if (!EnableModuleCfg.Value) { return; } if (FixSelfDamageCfg.Value && !Compat.DisableSelfDamageFix) { SelfCrowbarHook(); if (!Compat.Risky) { SelfFocusHook(); } SelfWatchHook(); } if (BazaarGestureCfg.Value && !Compat.DisableBazaarGesture) { BazaarGestureHook(); } if (BazaarPreventKickoutCfg.Value && !Compat.DisableBazaarPreventKickout) { BazaarPreventKickoutHook(); } if (RecolorLunarEquipmentCfg.Value == 2 || (RecolorLunarEquipmentCfg.Value == 1 && !Compat.WolfoQol)) { RecolorLunarEquipment(); } if (MoneyStageLimitCfg.Value > 0 && !Compat.DisableStarterMoney) { SceneDirector.onPostPopulateSceneServer += GiveMoney; } if (BloodShrineScaleCfg.Value > 0f && !Compat.DisableBloodShrineScale) { ModifyBloodShrineReward(); } if (BossDropTweakCfg.Value && !Compat.DisableBossDropTweak) { BossRewardChanceHook(); } if (UnlockInteractablesCfg.Value || Compat.UnlockInteractables) { UnlockInteractablesHook(); } if (ModifyHoldoutValueCfg.Value || EclipseHoldoutLimitCfg.Value) { VoidCellHook(); HoldoutZoneHook(); } if (CommandDropletFixCfg.Value && !Compat.DisableCommandDropletFix) { CommandDropletFix(); } if (CleanPickerOptionsCfg.Value) { CleanPickerOptionsHook(); } if (TeleportLostDropletCfg.Value && !Compat.DisableTeleportLostDroplet) { PickupBackgroundCollision(); PickupTeleportHook(); } if (!Compat.ChenGradius) { if (DroneFriendlyFireFixCfg.Value) { Debug.LogWarning((object)"ZetTweaks - Modifying Drone AI"); ModifyDroneAI(); } HandleDroneDeathHook(); } if (!Compat.DisableChanceShrine && ModifyChanceShrineCfg.Value) { ChanceShrineAwakeHook(); ChanceShrineTimerHook(); ChanceShrineDropHook(); ChanceShrineColorHook(); } } private static void SelfCrowbarHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__289_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); ILLabel jumpTo = null; if (val2.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 22), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref jumpTo) })) { val2.Index += 3; val2.Emit(OpCodes.Ldarg, 0); val2.Emit(OpCodes.Ldloc, 1); val2.EmitDelegate<Func<HealthComponent, CharacterBody, bool>>((Func<HealthComponent, CharacterBody, bool>)((HealthComponent healthComponent, CharacterBody atkBody) => ((Object)(object)healthComponent.body == (Object)(object)atkBody) ? true : false)); val2.Emit(OpCodes.Brtrue, (object)jumpTo); } else { Debug.LogWarning((object)"ZetTweaks - SelfCrowbarHook Failed!"); } }; <>c.<>9__289_0 = val; obj = (object)val; } HealthComponent.TakeDamageProcess += (Manipulator)obj; } private static void SelfFocusHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__290_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); ILLabel jumpTo = null; if (val2.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 27), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref jumpTo) })) { val2.Index += 3; val2.Emit(OpCodes.Ldarg, 0); val2.Emit(OpCodes.Ldloc, 1); val2.EmitDelegate<Func<HealthComponent, CharacterBody, bool>>((Func<HealthComponent, CharacterBody, bool>)((HealthComponent healthComponent, CharacterBody atkBody) => ((Object)(object)healthComponent.body == (Object)(object)atkBody) ? true : false)); val2.Emit(OpCodes.Brtrue, (object)jumpTo); } else { Debug.LogWarning((object)"ZetTweaks - SelfFocusHook Failed!"); } }; <>c.<>9__290_0 = val; obj = (object)val; } HealthComponent.TakeDamageProcess += (Manipulator)obj; } private static void SelfWatchHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__291_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); ILLabel jumpTo = null; if (val2.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 28), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref jumpTo) })) { val2.Index += 3; val2.Emit(OpCodes.Ldarg, 0); val2.Emit(OpCodes.Ldloc, 1); val2.EmitDelegate<Func<HealthComponent, CharacterBody, bool>>((Func<HealthComponent, CharacterBody, bool>)((HealthComponent healthComponent, CharacterBody atkBody) => ((Object)(object)healthComponent.body == (Object)(object)atkBody) ? true : false)); val2.Emit(OpCodes.Brtrue, (object)jumpTo); } else { Debug.LogWarning((object)"ZetTweaks - SelfWatchHook Failed!"); } }; <>c.<>9__291_0 = val; obj = (object)val; } HealthComponent.TakeDamageProcess += (Manipulator)obj; } private static void PlaceTeleporterHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__292_0; if (obj == null) { hook_PlaceTeleporter val = delegate(orig_PlaceTeleporter orig, SceneDirector self) { if ((Object)(object)self.teleporterSpawnCard != (Object)null) { string text = ((Run.instance.NetworkstageClearCount >= Run.stagesPerLoop - 1) ? "iscLunarTeleporter" : "iscTeleporter"); SpawnCard val2 = (SpawnCard)(object)LegacyResourcesAPI.Load<InteractableSpawnCard>("spawncards/interactablespawncard/" + text); if (Object.op_Implicit((Object)(object)val2)) { self.teleporterSpawnCard = val2; } else { Debug.LogWarning((object)("ZetTweaks - interactablespawncard/" + text + " could not be found!")); } } orig.Invoke(self); }; <>c.<>9__292_0 = val; obj = (object)val; } SceneDirector.PlaceTeleporter += (hook_PlaceTeleporter)obj; } private static void BazaarGestureHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__293_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items).GetField("AutoCastEquipment")), (Instruction x) => ILPatternMatchingExt.MatchCall<Inventory>(x, "GetItemCount") })) { val2.Index += 2; val2.EmitDelegate<Func<int, int>>((Func<int, int>)((int count) => (!(SceneInfo.instance.sceneDef.nameToken == "MAP_BAZAAR_TITLE")) ? count : 0)); } else { Debug.LogWarning((object)"ZetTweaks - BazaarGestureHook Failed!"); } }; <>c.<>9__293_0 = val; obj = (object)val; } EquipmentSlot.MyFixedUpdate += (Manipulator)obj; } private static void BazaarPreventKickoutHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__294_0; if (obj == null) { hook_FixedUpdate val = delegate(orig_FixedUpdate orig, KickFromShop self) { ((EntityState)self).outer.SetNextStateToMain(); }; <>c.<>9__294_0 = val; obj = (object)val; } KickFromShop.FixedUpdate += (hook_FixedUpdate)obj; } private static void VoidRecoveryHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__295_0; if (obj == null) { hook_BeginRound val = delegate(orig_BeginRound orig, ArenaMissionController self) { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (NetworkServer.active) { float value = VoidHealthRecoveryCfg.Value; float value2 = VoidShieldRecoveryCfg.Value; if (value > 0f || value2 > 0f) { for (int i = 0; i < CharacterMaster.readOnlyInstancesList.Count; i++) { CharacterBody body = CharacterMaster.readOnlyInstancesList[i].GetBody(); if (Object.op_Implicit((Object)(object)body)) { HealthComponent healthComponent = body.healthComponent; if (!Compat.DisableVoidHealthHeal && value > 0f) { healthComponent.Heal(healthComponent.fullHealth * value, default(ProcChainMask), true); } if (value2 > 0f) { healthComponent.RechargeShield(healthComponent.fullShield * value2); } } } } } }; <>c.<>9__295_0 = val; obj = (object)val; } ArenaMissionController.BeginRound += (hook_BeginRound)obj; } private static void RecolorLunarEquipment() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: 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) CreateLunarEquipmentPrefab(); foreach (EquipmentIndex equipment in EquipmentCatalog.equipmentList) { EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(equipment); if (Object.op_Implicit((Object)(object)equipmentDef) && equipmentDef.isLunar && (!Compat.ZetAspects || !((Object)(object)equipmentDef == (Object)(object)Equipment.AffixLunar))) { ColorEquipmentDroplet(equipmentDef); } } } private static void CreateLunarEquipmentPrefab() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) LunarEquipmentDropletPrefab = ZetTweaksPlugin.ClonePrefab(LegacyResourcesAPI.Load<GameObject>("Prefabs/itempickups/LunarOrb"), "ZT_LunarEquipmentOrb"); TrailRenderer componentInChildren = ((Component)LunarEquipmentDropletPrefab.transform).GetComponentInChildren<TrailRenderer>(); componentInChildren.startColor = new Color(0.3f, 0.45f, 0.9f, 0f); componentInChildren.endColor = new Color(0.2f, 0.3f, 0.9f); } private static void ColorEquipmentDroplet(EquipmentDef equipDef) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)equipDef)) { PickupDef pickupDef = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(equipDef.equipmentIndex)); if (Object.op_Implicit((Object)(object)LunarEquipmentDropletPrefab)) { pickupDef.dropletDisplayPrefab = LunarEquipmentDropletPrefab; } pickupDef.baseColor = new Color(0.45f, 0.6f, 0.9f); pickupDef.darkColor = new Color(0.45f, 0.6f, 0.9f); } } private static void GiveMoney(SceneDirector director) { if (!Object.op_Implicit((Object)(object)Run.instance) || Run.instance.stageClearCount >= MoneyStageLimitCfg.Value) { return; } int difficultyScaledCost = Run.instance.GetDifficultyScaledCost(25); uint num = 1 + (uint)Mathf.Round((float)difficultyScaledCost * MoneyChestGivenCfg.Value); if (ShareSuiteCompat.Enabled && ShareSuiteCompat.moneyMethodFound) { ShareSuiteCompat.AddMoneyShareSuite((int)num); return; } foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { instance.master.GiveMoney(num); } } private static void DirectorMoneyHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__300_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "RoR2.CombatDirector/DirectorMoneyWave", "multiplier") })) { val2.EmitDelegate<Func<float, float>>((Func<float, float>)delegate(float value) { Run instance = Run.instance; if (Object.op_Implicit((Object)(object)instance) && instance.stageClearCount < DirectorStageLimitCfg.Value) { value *= DirectorMoneyCfg.Value; } return value; }); } else { Debug.LogWarning((object)"ZetTweaks - DirectorMoneyHook Failed!"); } }; <>c.<>9__300_0 = val; obj = (object)val; } CombatDirector.Awake += (Manipulator)obj; } private static void GoldFromKillHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__301_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<DeathRewards>(x, "get_goldReward"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 2) })) { val2.Index += 3; val2.Emit(OpCodes.Ldloc, 2); val2.EmitDelegate<Func<uint, uint>>((Func<uint, uint>)delegate(uint reward) { int participatingPlayerCount = Run.instance.participatingPlayerCount; int count = PlayerCharacterMasterController.instances.Count; if (participatingPlayerCount != count) { int num = participatingPlayerCount / count; float num2 = Mathf.Max(1f, (float)num - 1f); int num3 = num + 2; int stageClearCount = Run.instance.stageClearCount; float num4 = 0.5f + 0.5f / num2 * Math.Min(num2, count - 1); num4 *= (float)Math.Max(0, num3 - stageClearCount) / (float)num3; uint num5 = (uint)((float)reward * (num2 * num4 + 1f)); if (num5 > reward) { return num5; } } return reward; }); val2.Emit(OpCodes.Stloc, 2); } else { Debug.LogWarning((object)"ZetTweaks - GoldFromKillHook Failed!"); } }; <>c.<>9__301_0 = val; obj = (object)val; } DeathRewards.OnKilledServer += (Manipulator)obj; } private static void ModifyBloodShrineReward() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__302_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 1) })) { val2.Emit(OpCodes.Ldarg, 0); val2.EmitDelegate<Func<uint, ShrineBloodBehavior, uint>>((Func<uint, ShrineBloodBehavior, uint>)delegate(uint money, ShrineBloodBehavior shrine) { if (Object.op_Implicit((Object)(object)Run.instance)) { uint num = (uint)((float)Run.instance.GetDifficultyScaledCost(25) * ((float)shrine.purchaseInteraction.cost / 100f) * BloodShrineScaleCfg.Value); if (num > money) { return num; } } return money; }); } else { Debug.LogWarning((object)"ZetTweaks - ModifyBloodShrineReward Failed!"); } }; <>c.<>9__302_0 = val; obj = (object)val; } ShrineBloodBehavior.AddShrineStack += (Manipulator)obj; } private static void BossRewardChanceHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__303_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<BossGroup>(x, "bossDropChance") })) { val2.Emit(OpCodes.Ldarg, 0); val2.Emit(OpCodes.Ldloc, 8); val2.Emit(OpCodes.Ldloc, 2); val2.EmitDelegate<Func<float, BossGroup, int, int, float>>((Func<float, BossGroup, int, int, float>)delegate(float rng, BossGroup bossGroup, int i, int count) { if (bossGroup.forceTier3Reward) { return rng; } float num = ((float)i + 1f) / (float)count; int num2 = count - i; float num3 = 0f; if (num > 0.39f) { num3 = 0.05f; } if (num > 0.59f) { num3 = 0.1f; } if (num > 0.79f) { num3 = 0.2f; } if (num2 <= 4) { num3 = Mathf.Max(0.15f, num3); } if (num2 <= 2) { num3 = Mathf.Max(0.25f, num3); } Debug.LogWarning((object)("Drop Reward - " + i + " (" + (i + 1) + " of " + count + ") progress: " + num + " rng: " + rng + " chance: " + num3 + " - " + (rng <= num3))); return (rng <= num3) ? 0f : 1f; }); } else { Debug.LogWarning((object)"ZetTweaks - BossRewardChanceHook Failed!"); } }; <>c.<>9__303_0 = val; obj = (object)val; } BossGroup.DropRewards += (Manipulator)obj; } private static void UnlockInteractablesHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //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: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown object obj = <>c.<>9__304_0; if (obj == null) { hook_OnEnable val = delegate { }; <>c.<>9__304_0 = val; obj = (object)val; } OutsideInteractableLocker.OnEnable += (hook_OnEnable)obj; object obj2 = <>c.<>9__304_1; if (obj2 == null) { hook_OnDisable val2 = delegate { }; <>c.<>9__304_1 = val2; obj2 = (object)val2; } OutsideInteractableLocker.OnDisable += (hook_OnDisable)obj2; object obj3 = <>c.<>9__304_2; if (obj3 == null) { hook_FixedUpdate val3 = delegate { }; <>c.<>9__304_2 = val3; obj3 = (object)val3; } OutsideInteractableLocker.FixedUpdate += (hook_FixedUpdate)obj3; } private static void ChangeRequiredBatteries() { if (Object.op_Implicit((Object)(object)MoonBatteryMissionController.instance)) { MoonBatteryMissionController.instance._numRequiredBatteries = Mathf.Clamp(MoonHoldoutZonesCfg.Value, 1, 4); } } private static void ChangeRequiredDeepVoidCells(orig_Start orig, VoidStageMissionController self) { if (Object.op_Implicit((Object)(object)self) && NetworkServer.active) { self.batteryCount = Mathf.Clamp(VoidBossHoldoutZonesCfg.Value, 1, 4); } orig.Invoke(self); } private static void VoidCellHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //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: Expected O, but got Unknown object obj = <>c.<>9__308_0; if (obj == null) { hook_OnEnter val = delegate(orig_OnEnter orig, NullWardBaseState self) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Invalid comparison between Unknown and I4 //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Invalid comparison between Unknown and I4 //IL_005b: Unknown result type (might be due to invalid IL or missing references) float num2 = (ModifyHoldoutValueCfg.Value ? VoidRadiusCfg.Value : NullWardBaseState.wardRadiusOn); if (Object.op_Implicit((Object)(object)Run.instance) && EclipseHoldoutLimitCfg.Value) { bool flag = (int)Run.instance.selectedDifficulty >= 4; if ((int)ZetTweaksPlugin.EclipseArtifact != -1 && RunArtifactManager.instance.IsArtifactEnabled(ZetTweaksPlugin.EclipseArtifact)) { flag = true; } if (flag) { if (num2 <= 20f) { num2 *= 2f; } else if (num2 < 40f) { num2 = 40f; } } } NullWardBaseState.wardRadiusOn = num2; orig.Invoke(self); }; <>c.<>9__308_0 = val; obj = (object)val; } NullWardBaseState.OnEnter += (hook_OnEnter)obj; object obj2 = <>c.<>9__308_1; if (obj2 == null) { hook_OnExit val2 = delegate(orig_OnExit orig, Active self) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) HoldoutZoneController holdoutZoneController = self.holdoutZoneController; if (Object.op_Implicit((Object)(object)holdoutZoneController)) { VoidCellExitRadius = holdoutZoneController.currentRadius; ChildLocator childLocator = ((NullWardBaseState)self).childLocator; if (Object.op_Implicit((Object)(object)childLocator)) { Transform val3 = ((NullWardBaseState)self).childLocator.FindChild("CompleteEffect"); if (Object.op_Implicit((Object)(object)val3)) { float num = VoidCellExitRadius * 0.933f; val3.localScale = new Vector3(num, num, num); } } } orig.Invoke(self); }; <>c.<>9__308_1 = val2; obj2 = (object)val2; } Active.OnExit += (hook_OnExit)obj2; Complete.OnEnter += new Manipulator(ReplaceWardRadius); Complete.FixedUpdate += new Manipulator(ReplaceWardRadius); } private static void ReplaceWardRadius(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(NullWardBaseState).GetField("wardRadiusOn")) })) { val.Index += 1; val.Emit(OpCodes.Pop); val.EmitDelegate<Func<float>>((Func<float>)(() => Mathf.Max(10f, VoidCellExitRadius))); } } private static void HoldoutZoneHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__310_0; if (obj == null) { hook_Awake val = delegate(orig_Awake orig, HoldoutZoneController self) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Invalid comparison between Unknown and I4 //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Invalid comparison between Unknown and I4 //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (ModifyHoldoutValueCfg.Value) { ModifyHoldoutValues(self); } if (EclipseHoldoutLimitCfg.Value) { bool flag = (int)Run.instance.selectedDifficulty >= 4; if ((int)ZetTweaksPlugin.EclipseArtifact != -1 && RunArtifactManager.instance.IsArtifactEnabled(ZetTweaksPlugin.EclipseArtifact)) { flag = true; } if (flag) { if (self.baseRadius <= 20f) { self.baseRadius *= 2f; } else if (self.baseRadius < 40f) { self.baseRadius = 40f; } } } orig.Invoke(self); }; <>c.<>9__310_0 = val; obj = (object)val; } HoldoutZoneController.Awake += (hook_Awake)obj; } private static void ModifyHoldoutValues(HoldoutZoneController self) { SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); switch (Object.op_Implicit((Object)(object)sceneDefForCurrentScene) ? sceneDefForCurrentScene.baseSceneName : "") { case "arena": if (self.baseRadius == 15f && self.baseChargeDuration == 60f) { self.baseRadius = VoidRadiusCfg.Value; self.baseChargeDuration = VoidTimeCfg.Value; } break; case "voidstage": if (self.baseRadius == 20f && self.baseChargeDuration == 60f) { self.baseRadius = VoidBossRadiusCfg.Value; self.baseChargeDuration = VoidBossTimeCfg.Value; } break; case "moon2": if (self.baseRadius == 40f && self.baseChargeDuration == 60f) { self.baseRadius = ShipRadiusCfg.Value; self.baseChargeDuration = ShipTimeCfg.Value; } else if (self.baseRadius == 20f && self.baseChargeDuration == 60f) { self.baseRadius = MassRadiusCfg.Value; self.baseChargeDuration = MassTimeCfg.Value; } break; default: if (self.baseRadius == 60f && self.baseChargeDuration == 90f && !Compat.ReallyBigTeleporter) { self.baseRadius = TeleRadiusCfg.Value; self.baseChargeDuration = TeleTimeCfg.Value; } break; } } private static void CommandDropletFix() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__312_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown ILCursor val2 = new ILCursor(il); MethodInfo methodInfo = typeof(PickupCatalog).GetMethod("GetPickupDef"); int num2 = default(int); int num = default(int); if (val2.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, (MethodBase)methodInfo), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num) })) { val2.Index += 3; val2.EmitDelegate<Func<PickupDef, PickupDef>>((Func<PickupDef, PickupDef>)delegate(PickupDef pickupDef) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Invalid comparison between Unknown and I4 //IL_0053: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) if (Compat.ZetAspects && !AspectsResolved) { ResolveAspects(); } if ((int)pickupDef.itemIndex != -1 && (!Compat.ZetAspects || !AspectCommandGroupItems || !aspectItemIndexes.Contains(pickupDef.itemIndex))) { ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex); if (itemDef.ContainsTag((ItemTag)9)) { return null; } } if ((int)pickupDef.equipmentIndex != -1 && (!Compat.ZetAspects || !AspectCommandGroupEquip || !aspectEquipIndexes.Contains(pickupDef.equipmentIndex))) { EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(pickupDef.equipmentIndex); if (!equipmentDef.canDrop) { return null; } } return pickupDef; }); } else { Debug.LogWarning((object)"ZetTweaks - CommandDropletFix Failed!"); } }; <>c.<>9__312_0 = val; obj = (object)val; } PickupDropletController.CreatePickup += (Manipulator)obj; } private static void ResolveAspects() { BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic; BaseUnityPlugin instance = Chainloader.PluginInfos["com.TPDespair.ZetAspects"].Instance; Assembly assembly = Assembly.GetAssembly(((object)instance).GetType()); Type type = Type.GetType("TPDespair.ZetAspects.Configuration, " + assembly.FullName, throwOnError: false); if (type != null) { MethodInfo method = type.GetMethod("get_AspectCommandGroupItems", bindingAttr); if (method != null) { try { ConfigEntry<bool> val = (ConfigEntry<bool>)method.Invoke(null, null); AspectCommandGroupItems = val.Value; } catch (Exception ex) { Debug.LogError((object)ex); } } else { Debug.LogWarning((object)"[ZetTweaks - ResolveAspects] - Could Not Find Method : Configuration.get_AspectCommandGroupItems"); } method = type.GetMethod("get_AspectCommandGroupEquip", bindingAttr); if (method != null) { try { ConfigEntry<bool> val2 = (ConfigEntry<bool>)method.Invoke(null, null); AspectCommandGroupEquip = val2.Value; } catch (Exception ex2) { Debug.LogError((object)ex2); } } else { Debug.LogWarning((object)"[ZetTweaks - ResolveAspects] - Could Not Find Method : Configuration.get_AspectCommandGroupEquip"); } } else { Debug.LogWarning((object)"[ZetTweaks - ResolveAspects] Could Not Find Type : TPDespair.ZetAspects.Configuration"); } if (AspectCommandGroupItems || AspectCommandGroupEquip) { type = Type.GetType("TPDespair.ZetAspects.Catalog, " + assembly.FullName, throwOnError: false); if (type != null) { if (AspectCommandGroupItems) { FieldInfo field = type.GetField("aspectItemIndexes", bindingAttr); if (field != null) { try { aspectItemIndexes = (List<ItemIndex>)field.GetValue(null); } catch (Exception ex3) { Debug.LogError((object)ex3); } } else { Debug.LogWarning((object)"[ZetTweaks - ResolveAspects] - Could Not Find Field : Catalog.aspectItemIndexes"); } } if (AspectCommandGroupEquip) { FieldInfo field2 = type.GetField("aspectEquipIndexes", bindingAttr); if (field2 != null) { try { aspectEquipIndexes = (List<EquipmentIndex>)field2.GetValue(null); } catch (Exception ex4) { Debug.LogError((object)ex4); } } else { Debug.LogWarning((object)"[ZetTweaks - ResolveAspects] - Could Not Find Field : Catalog.aspectEquipIndexes"); } } } else { Debug.LogWarning((object)"[ZetTweaks - ResolveAspects] Could Not Find Type : TPDespair.ZetAspects.Catalog"); } } AspectsResolved = true; } private static void CleanPickerOptionsHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__314_0; if (obj == null) { hook_GetOptionsFromPickupIndex val = delegate(orig_GetOptionsFromPickupIndex orig, PickupIndex pickupIndex) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) Option[] options = orig.Invoke(pickupIndex); return CleanupOptions(options); }; <>c.<>9__314_0 = val; obj = (object)val; } PickupPickerController.GetOptionsFromPickupIndex += (hook_GetOptionsFromPickupIndex)obj; } private static Option[] CleanupOptions(Option[] options) { //IL_0013: 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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Invalid comparison between Unknown and I4 //IL_003c: 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_0050: Invalid comparison between Unknown and I4 //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) List<Option> list = new List<Option>(); for (int i = 0; i < options.Length; i++) { bool flag = true; Option val = options[i]; PickupDef pickupDef = PickupCatalog.GetPickupDef(val.pickupIndex); if ((int)pickupDef.itemIndex != -1) { ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex); if ((int)itemDef.tier == 5 && itemDef.ContainsTag((ItemTag)9)) { flag =