Decompiled source of Cookies Vision Utilities v1.0.6

CookiesVisionUtilities.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 HarmonyLib;
using Steamworks.Data;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Cookies Vision Utilities")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Cookies Vision Utilities")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e32034b3-aa40-435d-80b4-640b8867e81e")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
public static class NonGamePatches
{
	[HarmonyPatch(typeof(Lobby), "SetData")]
	[HarmonyPrefix]
	public static void SetLobbyData_Prefix(ref string key, ref string value)
	{
		if (key == "name" && !value.StartsWith("[CookiesVision]") && !value.StartsWith("[CV]"))
		{
			if (value.Length > 15)
			{
				value = "[CV] " + value;
			}
			else
			{
				value = "[CookiesVision] " + value;
			}
		}
	}
}
namespace CookiesVisionUtilities;

[BepInPlugin("ChocolateCookies.CookiesVisionUtilities", "Cookies Vision Utilities", "1.0.5")]
public class Plugin : BaseUnityPlugin
{
	private const string modGUID = "ChocolateCookies.CookiesVisionUtilities";

	private const string modName = "Cookies Vision Utilities";

	private const string modVersion = "1.0.5";

	private readonly Harmony _harmony = new Harmony("ChocolateCookies.CookiesVisionUtilities");

	private void Awake()
	{
		_harmony.PatchAll(typeof(NonGamePatches));
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin ChocolateCookies.CookiesVisionUtilities is loaded!");
	}
}