Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of FalseSonLaserLock v1.0.2
FalseSonLaserLock.dll
Decompiled 7 months agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using EntityStates; using EntityStates.FalseSonBoss; using EntityStates.MeridianEvent; using EntityStates.PrimeMeridian; using IL.EntityStates.FalseSonBoss; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates.FalseSonBoss; using On.EntityStates.MeridianEvent; using On.EntityStates.PrimeMeridian; using RoR2; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("FalseSonLaserLock")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+e6e7601ea149ab9bc92fdef79d9cdc2e5d17330d")] [assembly: AssemblyProduct("FalseSonLaserLock")] [assembly: AssemblyTitle("FalseSonLaserLock")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace R2API.Utils { [AttributeUsage(AttributeTargets.Assembly)] public class ManualNetworkRegistrationAttribute : Attribute { } } namespace FalseSonLaserLock { [BepInPlugin("com.Moffein.FalseSonLaserLock", "FalseSonLaserLock", "1.0.2")] public class FalseSonLaserLockPlugin : BaseUnityPlugin { private static int activeLasers; private static int meridianPhase3Count; private void Awake() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown Stage.onStageStartGlobal += Stage_onStageStartGlobal; LunarGazeLaserFire.OnEnter += new hook_OnEnter(LunarGazeLaserFire_OnEnter); LunarGazeLaserFire.OnExit += new hook_OnExit(LunarGazeLaserFire_OnExit); LunarGazeLaserCharge.OnEnter += new hook_OnEnter(LunarGazeLaserCharge_OnEnter); LunarGazeLaserCharge.OnExit += new hook_OnExit(LunarGazeLaserCharge_OnExit); LunarGazeLaserEnd.OnEnter += new hook_OnEnter(LunarGazeLaserEnd_OnEnter); LunarGazeLaserEnd.OnExit += new hook_OnExit(LunarGazeLaserEnd_OnExit); Phase3.OnEnter += new hook_OnEnter(Phase3_OnEnter); Phase3.OnExit += new hook_OnExit(Phase3_OnExit); LunarGazeLeap.OnEnter += new hook_OnEnter(LunarGazeLeap_OnEnter); FissureSlam.FixedUpdate += new Manipulator(FissureSlam_FixedUpdate); } private void LunarGazeLeap_OnEnter(orig_OnEnter orig, LunarGazeLeap self) { //IL_0165: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!Object.op_Implicit((Object)(object)((EntityState)self).skillLocator) || !((EntityState)self).isAuthority) { return; } if (Object.op_Implicit((Object)(object)((EntityState)self).skillLocator.secondary)) { bool flag = false; if (((EntityState)self).skillLocator.secondary.stock > 0) { flag = true; ((EntityState)self).skillLocator.secondary.stock = 0; } if (((EntityState)self).skillLocator.secondary.cooldownRemaining < 12f || flag) { ((EntityState)self).skillLocator.secondary.rechargeStopwatch = ((EntityState)self).skillLocator.secondary.finalRechargeInterval - 12f; } } if (Object.op_Implicit((Object)(object)((EntityState)self).skillLocator.special)) { bool flag2 = false; if (((EntityState)self).skillLocator.special.stock > 0) { flag2 = true; ((EntityState)self).skillLocator.special.stock = 0; } if (((EntityState)self).skillLocator.special.cooldownRemaining < 12f || flag2) { ((EntityState)self).skillLocator.special.rechargeStopwatch = ((EntityState)self).skillLocator.special.finalRechargeInterval - 12f; } } if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.AddTimedBuffAuthority(Buffs.Slow50.buffIndex, 12f); } } private void Phase3_OnExit(orig_OnExit orig, Phase3 self) { meridianPhase3Count--; orig.Invoke(self); } private void Phase3_OnEnter(orig_OnEnter orig, Phase3 self) { orig.Invoke(self); meridianPhase3Count++; } public static bool IsLaserActive() { return activeLasers > 0; } private void FissureSlam_FixedUpdate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(FissureSlam), "enableColumns") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<bool, FissureSlam, bool>>((Func<bool, FissureSlam, bool>)((bool enableColumns, FissureSlam self) => enableColumns && !IsLaserActive())); } else { Debug.LogError((object)"FalseSonLaserLock: Failed to lock Fissure Slam projectiles."); } } private void LunarGazeLaserFire_OnExit(orig_OnExit orig, LunarGazeLaserFire self) { if (meridianPhase3Count > 0) { LightningStormController.SetStormActive(true); } orig.Invoke(self); activeLasers = Mathf.Max(0, activeLasers - 1); } private void LunarGazeLaserFire_OnEnter(orig_OnEnter orig, LunarGazeLaserFire self) { orig.Invoke(self); if (meridianPhase3Count > 0) { LightningStormController.SetStormActive(false); } activeLasers++; } private void LunarGazeLaserEnd_OnExit(orig_OnExit orig, LunarGazeLaserEnd self) { if (meridianPhase3Count > 0) { LightningStormController.SetStormActive(true); } orig.Invoke(self); activeLasers = Mathf.Max(0, activeLasers - 1); } private void LunarGazeLaserEnd_OnEnter(orig_OnEnter orig, LunarGazeLaserEnd self) { orig.Invoke(self); if (meridianPhase3Count > 0) { LightningStormController.SetStormActive(false); } activeLasers++; } private void LunarGazeLaserCharge_OnExit(orig_OnExit orig, LunarGazeLaserCharge self) { if (meridianPhase3Count > 0) { LightningStormController.SetStormActive(true); } orig.Invoke(self); activeLasers = Mathf.Max(0, activeLasers - 1); } private void LunarGazeLaserCharge_OnEnter(orig_OnEnter orig, LunarGazeLaserCharge self) { orig.Invoke(self); if (meridianPhase3Count > 0) { LightningStormController.SetStormActive(false); } activeLasers++; } private void Stage_onStageStartGlobal(Stage obj) { meridianPhase3Count = 0; activeLasers = 0; } } }