Decompiled source of Leathal Broadcast v1.0.0

leathal_broadcast.dll

Decompiled 6 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 HarmonyLib;
using LethalAPI.LibTerminal;
using LethalAPI.LibTerminal.Attributes;
using LethalAPI.LibTerminal.Models;
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("leathal_broadcast")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("leathal_broadcast")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("1a448165-2cd9-4343-993f-732d7c4ff584")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace leathal_broadcast;

[BepInPlugin("TSD.leathal_broadcast", "Leathal Broadcast", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private const string modGUID = "TSD.leathal_broadcast";

	private const string modName = "Leathal Broadcast";

	private const string modVersion = "1.0.0";

	private readonly Harmony harmony = new Harmony("TSD.leathal_broadcast");

	private static Plugin Instance;

	private TerminalModRegistry Commands;

	internal ManualLogSource mls;

	[TerminalCommand("cast", false)]
	public string Broadcast([RemainingText] string content)
	{
		HUDManager.Instance.DisplayTip("Man in the chair says:", content, false, false, "LC_Tip1");
		return "Broadcasting Message To ALl Players: \n" + content;
	}

	private void Awake()
	{
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = this;
		}
		mls = Logger.CreateLogSource("TSD.leathal_broadcast");
		mls.LogInfo((object)"Leathal Broadcast is locked and loaded!");
		Commands = TerminalRegistry.CreateTerminalRegistry();
		Commands.RegisterFrom<Plugin>();
		harmony.PatchAll(typeof(Plugin));
	}
}