using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using SOD.Common.BepInEx;
using SOD.Common.BepInEx.Configuration;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("fasterelevatorsbeta")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("fasterelevatorsbeta")]
[assembly: AssemblyTitle("fasterelevatorsbeta")]
[assembly: AssemblyVersion("1.0.0.0")]
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 FasterElevators
{
public interface IConfigBindings
{
[Binding(8.5f, "The maximum speed of the elevators (Vanilla default : 3.5)", "ElevatorConfig.maxSpeed")]
float maxSpeed { get; set; }
[Binding(2.5f, "The acceleration of the elevators (Vanilla default : 0.9)", "ElevatorConfig.acceleration")]
float acceleration { get; set; }
[Binding(0.5f, "The cooldown of the elevators before you can use them again (INSANELY ANNOYING)(Vanilla default : 4.5)", "ElevatorConfig.cooldown")]
float cooldown { get; set; }
}
[BepInPlugin("truedartt.fasterelevators", "Faster Elevators Beta", "0.1.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class FasterElevators : PluginController<FasterElevators, IConfigBindings>
{
[HarmonyPatch(typeof(Elevator), "ElevatorUpdate")]
public class FasterElevatorsCore
{
public static void Postfix(Elevator __instance)
{
__instance.preset.elevatorAcceleration = ((PluginController<FasterElevators, IConfigBindings>)(object)PluginController<FasterElevators, IConfigBindings>.Instance).Config.acceleration;
__instance.preset.elevatorMaxSpeed = ((PluginController<FasterElevators, IConfigBindings>)(object)PluginController<FasterElevators, IConfigBindings>.Instance).Config.maxSpeed;
__instance.preset.liftDelay = ((PluginController<FasterElevators, IConfigBindings>)(object)PluginController<FasterElevators, IConfigBindings>.Instance).Config.cooldown;
}
}
public override void Load()
{
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Expected O, but got Unknown
PluginController<FasterElevators, IConfigBindings>.Log.LogInfo((object)("maxSpeed :" + base.Config.maxSpeed));
PluginController<FasterElevators, IConfigBindings>.Log.LogInfo((object)("acceleration :" + base.Config.acceleration));
PluginController<FasterElevators, IConfigBindings>.Log.LogInfo((object)("cooldown :" + base.Config.cooldown));
try
{
Harmony val = new Harmony("truedartt.fasterelevators");
val.PatchAll();
}
catch
{
PluginController<FasterElevators, IConfigBindings>.Log.LogFatal((object)"Harmony dont work help");
}
PluginController<FasterElevators, IConfigBindings>.Log.LogInfo((object)"harmony works");
}
}
}