using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using HarmonyLib;
using Il2CppFemur;
using Il2CppGB.Game.Gameplay;
using MelonLoader;
using MelonLoader.Preferences;
using Microsoft.CodeAnalysis;
using PowerWalk;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(Mod), "PowerWalk", "1.0.0", "TheUltimateNuke", null)]
[assembly: MelonGame("Boneloaf", "Gang Beasts")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("PowerWalk")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+1c7162edbd70d1360f5d0bb12cfbe2b3d1a7ca0a")]
[assembly: AssemblyProduct("PowerWalk")]
[assembly: AssemblyTitle("PowerWalk")]
[assembly: AssemblyVersion("1.0.0.0")]
[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 PowerWalk
{
public class Mod : MelonMod
{
[HarmonyPatch(typeof(MovementHandeler_HumanoidMediumEctomorph), "RunCycleRotateBall")]
private static class MoveSpeedPatch
{
private static void Prefix(MovementHandeler_HumanoidMediumEctomorph __instance)
{
__instance._cycleModifer = MoveSpeed;
}
}
[HarmonyPatch(typeof(Actor), "UpdateState")]
private static class InputSpeedPatch
{
private static void Postfix(Actor __instance)
{
if (DisableInputSpamDecay)
{
__instance.inputSpamForceModifier = 1f;
}
}
}
private static readonly MelonPreferences_Category PowerWalkPrefCateg = MelonPreferences.CreateCategory("PowerWalk", "PowerWalk");
private static readonly MelonPreferences_Entry<float> _powerWalkMoveSpeedPref = PowerWalkPrefCateg.CreateEntry<float>("MoveSpeed", 1.5f, "Move Speed Multiplier", "How fast all beasts will move.", false, false, (ValueValidator)null, (string)null);
private static readonly MelonPreferences_Entry<float> _powerWalkJumpForceMultiplierPref = PowerWalkPrefCateg.CreateEntry<float>("JumpForceMultiplier", 1f, "Jump Force Multiplier", "How high all beasts will jump.", false, false, (ValueValidator)null, (string)null);
private static readonly MelonPreferences_Entry<bool> _powerWalkDisableInputSpamDecayPref = PowerWalkPrefCateg.CreateEntry<bool>("DisableInputSpamDecay", true, "Disable Input Spam Decay", "Whether to disable the force decay when punching or jumping too frequently.", false, false, (ValueValidator)null, (string)null);
public static Instance Logger => Melon<Mod>.Logger;
public static float PowerWalkJumpForceMultiplier
{
get
{
return _powerWalkJumpForceMultiplierPref.Value;
}
set
{
_powerWalkJumpForceMultiplierPref.Value = value;
GameplayModifiers.jumpForceMul = value;
}
}
public static bool DisableInputSpamDecay
{
get
{
return _powerWalkDisableInputSpamDecayPref.Value;
}
set
{
_powerWalkDisableInputSpamDecayPref.Value = value;
}
}
public static float MoveSpeed
{
get
{
return _powerWalkMoveSpeedPref.Value;
}
set
{
_powerWalkMoveSpeedPref.Value = value;
}
}
public override void OnInitializeMelon()
{
PowerWalkJumpForceMultiplier = _powerWalkJumpForceMultiplierPref.Value;
((MelonBase)this).LoggerInstance.Msg(ConsoleColor.Green, "Mod PowerWalk initialized!");
}
}
internal static class MyModInfo
{
public const string Author = "TheUltimateNuke";
public const string Name = "PowerWalk";
public const string Version = "1.0.0";
}
}