Decompiled source of XeiCompany v1.0.1

XeiCompany.dll

Decompiled 10 months 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 XeiCompany.Patches;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("XeiCompany")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("XeiCompany")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("741a7c7e-0248-41ac-8d70-e30c37f3bf16")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace XeiCompany
{
	[BepInPlugin("Xeirel.XeiCompany", "Xei Company", "1.0.0.0")]
	public class XeiCompanyBase : BaseUnityPlugin
	{
		private const string modGUID = "Xeirel.XeiCompany";

		private const string modName = "Xei Company";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("Xeirel.XeiCompany");

		private static XeiCompanyBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Xeirel.XeiCompany");
			mls.LogInfo((object)"XeiCompany Has Awaken...");
			mls.LogInfo((object)"XeiCompany Has Awaken...");
			mls.LogInfo((object)"XeiCompany Has Awaken...");
			mls.LogInfo((object)"XeiCompany Has Awaken...");
			mls.LogInfo((object)"XeiCompany Has Awaken...");
			mls.LogInfo((object)"XeiCompany Has Awaken...");
			harmony.PatchAll(typeof(XeiCompanyBase));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
			harmony.PatchAll(typeof(PlayerControllerGUIPatch));
		}
	}
}
namespace XeiCompany.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void carryWeightPatch(ref float ___carryWeight)
		{
			___carryWeight = 1f;
		}
	}
	internal class PlayerControllerGUIPatch
	{
		[HarmonyPatch("OnGUI")]
		[HarmonyPostfix]
		private static void OnGUIPatch()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(10f, 10f, 200f, 20f);
			string text = "XeiCompany Loaded.";
			GUIStyle label = GUI.skin.label;
			GUI.Label(val, text, label);
		}
	}
}