using System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using IL.RoR2; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using R2API; 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("ArtifactOfHaste")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+cbad8f369a14cd5f5cf1d434bdcb59990a90b8eb")] [assembly: AssemblyProduct("ArtifactOfHaste")] [assembly: AssemblyTitle("ArtifactOfHaste")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace ArtifactOfHaste { internal class Artifact : ArtifactBase { [CompilerGenerated] private static class <>O { public static Action <0>__SetTimescaleRunStart; public static Action <1>__RevertTimescaleRunEnd; public static ArtifactStateChangeDelegate <2>__SetTimescaleArtifactEnabled; public static ArtifactStateChangeDelegate <3>__SetTimescaleArtifactDisabled; public static Manipulator <4>__ScaleRunStopwatch; } private static float runStopwatchMult = 1f; private const float newTimescale = 1.2f; public override string artifactName => "Artifact of Haste"; public override string artifactLangTokenName => "ARTIFACT_OF_HASTE"; public override string artifactDescription => "The game plays 20% faster."; public override Sprite artifactEnabledIcon => Assets.assetBundle.LoadAsset("iconEnabled.png"); public override Sprite artifactDisabledIcon => Assets.assetBundle.LoadAsset("iconDisabled.png"); public override void ApplyLogic() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown Run.onRunStartGlobal += SetTimescaleRunStart; Run.onRunDestroyGlobal += RevertTimescaleRunEnd; object obj = <>O.<2>__SetTimescaleArtifactEnabled; if (obj == null) { ArtifactStateChangeDelegate val = SetTimescaleArtifactEnabled; <>O.<2>__SetTimescaleArtifactEnabled = val; obj = (object)val; } RunArtifactManager.onArtifactEnabledGlobal += (ArtifactStateChangeDelegate)obj; object obj2 = <>O.<3>__SetTimescaleArtifactDisabled; if (obj2 == null) { ArtifactStateChangeDelegate val2 = SetTimescaleArtifactDisabled; <>O.<3>__SetTimescaleArtifactDisabled = val2; obj2 = (object)val2; } RunArtifactManager.onArtifactDisabledGlobal += (ArtifactStateChangeDelegate)obj2; object obj3 = <>O.<4>__ScaleRunStopwatch; if (obj3 == null) { Manipulator val3 = ScaleRunStopwatch; <>O.<4>__ScaleRunStopwatch = val3; obj3 = (object)val3; } Run.FixedUpdate += (Manipulator)obj3; } private static void SetTimescaleRunStart(Run _) { if (ArtifactBase.artifactEnabled) { SetTimescale(); } } private static void RevertTimescaleRunEnd(Run _) { RevertTimescale(); } private static void SetTimescaleArtifactEnabled(RunArtifactManager runArtifactManager, ArtifactDef artifactDef) { if ((Object)(object)artifactDef == (Object)(object)ArtifactBase.artifactDef && (Object)(object)Run.instance != (Object)null) { SetTimescale(); } } private static void SetTimescaleArtifactDisabled(RunArtifactManager runArtifactManager, ArtifactDef artifactDef) { if ((Object)(object)artifactDef == (Object)(object)ArtifactBase.artifactDef) { RevertTimescale(); } } private static void ScaleRunStopwatch(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt