Decompiled source of CruiserZooms v1.0.0

HolyCruiser.dll

Decompiled 6 hours ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using HolyCruiser.patches;
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("HolyCruiser")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HolyCruiser")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("ec5cb953-5853-4d2b-a4de-e52f6411481e")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
[BepInPlugin("plantain.HolyCruiser", "HolyCruiser", "1.0.0")]
public class HolyCruiserBase : BaseUnityPlugin
{
	private const string ModGUID = "plantain.HolyCruiser";

	private const string ModName = "HolyCruiser";

	private const string ModVersion = "1.0.0";

	private readonly Harmony harmony = new Harmony("plantain.HolyCruiser");

	private static HolyCruiserBase Instance;

	internal ManualLogSource mls;

	private void Awake()
	{
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = this;
			harmony.PatchAll(typeof(HolyCruiserBase));
		}
		mls = Logger.CreateLogSource("plantain.HolyCruiser");
		mls.LogInfo((object)"The nigger police");
		harmony.PatchAll(typeof(HolyCruiserBase));
		harmony.PatchAll(typeof(VehicleControllerPatch));
	}
}
namespace HolyCruiser
{
	internal class YourCarControllerClass
	{
	}
}
namespace HolyCruiser.patches
{
	[HarmonyPatch(typeof(VehicleController))]
	public static class VehicleControllerPatch
	{
		[HarmonyPatch("FixedUpdate")]
		[HarmonyPostfix]
		public static void ForceSpeedValues(VehicleController __instance)
		{
			__instance.carAcceleration = 5000000f;
			__instance.carMaxSpeed = 7000000f;
			__instance.brakeSpeed = 2500000f;
			SetPrivateField(__instance, "MaxEngineRPM", 500000000f);
			SetPrivateField(__instance, "MinEngineRPM", 15000000f);
			Debug.Log((object)$"\ud83d\ude80 Speed Reinforced: MaxSpeed={__instance.carMaxSpeed}, Accel={__instance.carAcceleration}");
		}

		private static void SetPrivateField(VehicleController instance, string fieldName, object value)
		{
			FieldInfo field = typeof(VehicleController).GetField(fieldName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
			if (field != null)
			{
				field.SetValue(instance, value);
				Debug.Log((object)$"\ud83d\udfe2 {fieldName} set to {value}");
			}
			else
			{
				Debug.LogError((object)("❌ " + fieldName + " field not found in VehicleController."));
			}
		}
	}
}