Decompiled source of WeightlessCompany v1.0.0

BepInEx/plugins/WeightlessCompany.dll

Decompiled a year 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 GameNetcodeStuff;
using HarmonyLib;
using UnityEngine;
using WeightlessCompany.Patches;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("WeightlessCompany")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("WeightlessCompany")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c80c0725-649f-4399-a48d-0423def480c9")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace WeightlessCompany
{
	[BepInPlugin("Brew.WeightlessCompany", "WeightlessCompany", "1.0.0")]
	public class WCBase : BaseUnityPlugin
	{
		private const string modGUID = "Brew.WeightlessCompany";

		private const string modName = "WeightlessCompany";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("Brew.WeightlessCompany");

		private static WCBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Brew.WeightlessCompany");
			mls.LogInfo((object)"Weightless Company has initialised.");
			harmony.PatchAll(typeof(WCBase));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
		}
	}
}
namespace WeightlessCompany.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void updatePatch(ref float ___carryWeight)
		{
			___carryWeight = 1f;
		}
	}
}