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 IL.RoR2;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.RoR2;
using RoR2;
using RoR2.ContentManagement;
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.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("MinerJump")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MinerJump")]
[assembly: AssemblyTitle("MinerJump")]
[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 MinerJump
{
[BepInPlugin("com.kingoblivion.minerjump", "Miner Jump", "1.0.0")]
public class MinerJumpPlugin : BaseUnityPlugin
{
private static Sprite PickupIcon;
private void Awake()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Expected O, but got Unknown
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Expected O, but got Unknown
ItemCatalog.Init += new hook_Init(ModifyItem);
CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart);
}
private void ModifyItem(orig_Init orig)
{
ItemDef[] itemDefs = ContentManager.itemDefs;
foreach (ItemDef val in itemDefs)
{
if (val.nameToken == "ITEM_WITCHES_RING_NAME")
{
val.tier = (ItemTier)1;
}
}
orig.Invoke();
}
private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body)
{
orig.Invoke(self, body);
if (((Object)body).name == "MinerBody(Clone)")
{
body.baseJumpCount++;
}
}
}
}
namespace RenameMe
{
[BepInPlugin("NotKing.CombatTimeChange", "CombatTimeChange", "1.0.0")]
public class Main : BaseUnityPlugin
{
public const string PluginGUID = "NotKing.CombatTimeChange";
public const string PluginAuthor = "NotKing";
public const string PluginName = "CombatTimeChange";
public const string PluginVersion = "1.0.0";
public static ManualLogSource modLogger;
public void Awake()
{
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Expected O, but got Unknown
modLogger = ((BaseUnityPlugin)this).Logger;
CharacterBody.FixedUpdate += new Manipulator(CharacterBody_FixedUpdate);
}
private void CharacterBody_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_005f: 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>[2]
{
(Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "outOfCombatStopwatch"),
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f)
}))
{
val.Emit(OpCodes.Ldarg_0);
val.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)((float orig, CharacterBody self) => 3f));
}
else
{
modLogger.LogError((object)"Failed to apply Out of Combat Timer hook");
}
}
}
}