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.Configuration;
using Microsoft.CodeAnalysis;
using On.RoR2;
using RoR2;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("MovementTweaks")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MovementTweaks")]
[assembly: AssemblyTitle("MovementTweaks")]
[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 MovementTweaks
{
[BepInPlugin("com.Nuxlar.MovementTweaks", "MovementTweaks", "1.0.0")]
public class MovementTweaks : BaseUnityPlugin
{
public static ConfigEntry<float> extraLevelSpeed;
public static ConfigEntry<int> extraJumps;
private static ConfigFile MTConfig { get; set; }
public void Awake()
{
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Expected O, but got Unknown
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Expected O, but got Unknown
MTConfig = new ConfigFile(Paths.ConfigPath + "\\com.Nuxlar.TCTweaks.cfg", true);
extraLevelSpeed = MTConfig.Bind<float>("General", "Extra Level Speed", 0.1f, "How much extra speed on level up should be added. Vanilla: 0");
extraJumps = MTConfig.Bind<int>("General", "Extra Jumps", 1, "How many extra base jumps should be added.");
CharacterMaster.OnBodyStart += new hook_OnBodyStart(TweakMovement);
}
private void TweakMovement(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body)
{
orig.Invoke(self, body);
if (body.isPlayerControlled)
{
body.levelMoveSpeed = extraLevelSpeed.Value;
body.baseJumpCount = extraJumps.Value + 1;
if (((Object)body).name == "MercBody(Clone)")
{
body.baseJumpCount = extraJumps.Value + 2;
}
}
}
}
}