using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using LC_API.ServerAPI;
using TMPro;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("NoPenalty")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Increase the max players in Lethal Company")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyInformationalVersion("1.0.1")]
[assembly: AssemblyProduct("NoPenalty")]
[assembly: AssemblyTitle("NoPenalty")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.1.0")]
[module: UnverifiableCode]
namespace NoPenalty
{
[BepInPlugin("NoPenalty", "NoPenalty", "1.0.1")]
public class Plugin : BaseUnityPlugin
{
private Harmony harmonymain;
private void Awake()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
harmonymain = new Harmony("NoPenalty");
harmonymain.PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)"NoPenalty has loaded!!!");
}
private void OnDestroy()
{
ModdedServer.SetServerModdedOnly();
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "NoPenalty";
public const string PLUGIN_NAME = "NoPenalty";
public const string PLUGIN_VERSION = "1.0.1";
}
}
namespace PermUnlockables.Patches
{
[HarmonyPatch]
internal class PenaltyPatches
{
[HarmonyPatch(typeof(HUDManager), "ApplyPenalty")]
[HarmonyPrefix]
public static bool ApplyPenalty()
{
return false;
}
[HarmonyPatch(typeof(HUDManager), "Awake")]
[HarmonyPostfix]
public static void ResizeLists2(ref HUDManager __instance)
{
((Component)((TMP_Text)__instance.statsUIElements.penaltyTotal).transform.parent.parent).gameObject.SetActive(false);
}
}
}