mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
21 lines
560 B
C#
21 lines
560 B
C#
using BetterAmongUs.Modules;
|
|
using BetterAmongUs.Patches.Gameplay.UI.Settings;
|
|
using HarmonyLib;
|
|
|
|
namespace BetterAmongUs.Managers;
|
|
|
|
[HarmonyPatch]
|
|
internal static class PrivateOnlyLobbyManager
|
|
{
|
|
[HarmonyPatch(typeof(PlayerControl))]
|
|
[HarmonyPatch(nameof(PlayerControl.Die))]
|
|
[HarmonyPostfix]
|
|
internal static void PlayerControlDie_Postfix(PlayerControl __instance)
|
|
{
|
|
if (GameState.IsPrivateOnlyLobby && BetterGameSettings.RemovePetOnDeath.GetBool())
|
|
{
|
|
__instance.RpcSetPet(PetData.EmptyId);
|
|
}
|
|
}
|
|
}
|