using 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 BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("CloverPitTicketCountSpeedUp")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+bba6d68fc29482f5c8f47523605efbda002da2c9")]
[assembly: AssemblyProduct("CloverPitTicketCountSpeedUp")]
[assembly: AssemblyTitle("CloverPitTicketCountSpeedUp")]
[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 CloverPitTicketCountSpeedUp
{
public static class Logging
{
public static ManualLogSource Logger => Plugin.Log;
public static void Log(LogLevel level, object message)
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
Logger.Log(level, message);
}
public static void LogInfo(object message)
{
Logger.LogInfo(message);
}
public static void LogDebug(object message)
{
Logger.LogDebug(message);
}
public static void LogWarning(object message)
{
Logger.LogWarning(message);
}
public static void LogError(object message)
{
Logger.LogError(message);
}
public static void LogFatal(object message)
{
Logger.LogFatal(message);
}
}
[BepInPlugin("Thalrod.cloverpit.CloverPitTicketCountSpeedUp", "CloverPit Ticket Count Speed Up", "1.0.2")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
public const string PluginGuid = "Thalrod.cloverpit.CloverPitTicketCountSpeedUp";
public const string PluginName = "CloverPit Ticket Count Speed Up";
public const string PluginVer = "1.0.2";
internal static ManualLogSource Log;
internal static readonly Harmony Harmony = new Harmony("Thalrod.cloverpit.CloverPitTicketCountSpeedUp");
internal const string MainContentFolder = "CloverPitTicketCountSpeedUp_Content";
private void Awake()
{
Log = ((BaseUnityPlugin)this).Logger;
}
private void OnEnable()
{
Harmony.PatchAll();
LogInfo("Loaded CloverPit Ticket Count Speed Up v1.0.2!");
}
private void OnDisable()
{
Harmony.UnpatchSelf();
LogInfo("Unloaded CloverPit Ticket Count Speed Up!");
}
private void Update()
{
}
internal static void LogInfo(string message)
{
ManualLogSource log = Log;
if (log != null)
{
log.LogInfo((object)message);
}
}
internal static void LogWarn(string message)
{
ManualLogSource log = Log;
if (log != null)
{
log.LogWarning((object)message);
}
}
internal static void LogError(string message)
{
ManualLogSource log = Log;
if (log != null)
{
log.LogError((object)message);
}
}
}
[HarmonyPatch(typeof(GeneralUiScript), "Update")]
public class TicketSpeedPatch
{
private static void Prefix(ref long ___ticketsOld)
{
long num = GameplayData.CloverTicketsGet();
long num2 = num - ___ticketsOld;
if (Math.Abs(num2) > 1000000)
{
___ticketsOld += num2 / 5;
}
}
}
}