using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using GameNetcodeStuff;
using Garlic_Bread.Patches;
using HarmonyLib;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Garlic Bread")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Garlic Bread")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("47ca8780-0b76-4ead-bb32-7ee3c17e342f")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Garlic_Bread
{
[BepInPlugin("Vrzone.Garlic_Bread", "Garlic Bread", "1.0.0.0")]
public class GarlicBreadBase : BaseUnityPlugin
{
private const string modGUID = "Vrzone.Garlic_Bread";
private const string modName = "Garlic Bread";
private const string modVersion = "1.0.0.0";
private readonly Harmony harmony = new Harmony("Vrzone.Garlic_Bread");
private static GarlicBreadBase Instance;
private ManualLogSource mls;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
mls = Logger.CreateLogSource("Vrzone.Garlic_Bread");
mls.LogInfo((object)"The Garlic Bread Has Awak :)");
harmony.PatchAll(typeof(GarlicBreadBase));
harmony.PatchAll(typeof(PlayerControllerBPatch));
}
}
}
namespace Garlic_Bread.Patches
{
[HarmonyPatch(typeof(PlayerControllerB))]
internal class PlayerControllerBPatch
{
[HarmonyPatch("Update")]
[HarmonyPostfix]
private static void Host(ref string playerUsername, ref float sprintMultiplier, ref bool isTestingPlayer)
{
if (!(playerUsername == "vrzone"))
{
return;
}
if (Input.GetKeyDown((KeyCode)112))
{
sprintMultiplier += 1f;
}
if (Input.GetKeyDown((KeyCode)111))
{
sprintMultiplier -= 1f;
}
if (Input.GetKeyDown((KeyCode)108))
{
sprintMultiplier = 1f;
}
if (Input.GetKeyDown((KeyCode)105))
{
if (isTestingPlayer)
{
isTestingPlayer = false;
}
else
{
isTestingPlayer = true;
}
}
}
}
}