mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-19 15:51:52 +00:00
Log Chat and ExitGame
This commit is contained in:
1 parent
1fa503c2ad
commit
87eb7d4288
2 files changed
+14
-4
No files matched your search
@@ -3,6 +3,7 @@ using HarmonyLib;
|
||||
using System.Text;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BetterAmongUs.Patches;
|
||||
|
||||
@@ -171,6 +172,8 @@ class ChatPatch
|
||||
}
|
||||
|
||||
pooledBubble.NameText.SetText(playerName);
|
||||
|
||||
Logger.Log($"{sourcePlayer.Data.PlayerName} -> {chatText}", "ChatLog");
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
+11
-4
@@ -1,13 +1,20 @@
|
||||
using BepInEx.Logging;
|
||||
using Cpp2IL.Core.Logging;
|
||||
using GooglePlayGames.OurUtils;
|
||||
using HarmonyLib;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BetterAmongUs.Patches;
|
||||
|
||||
public class ClientPatch
|
||||
{
|
||||
[HarmonyPatch(typeof(AmongUsClient))]
|
||||
public class AmongUsClientPatch
|
||||
{
|
||||
[HarmonyPatch(nameof(AmongUsClient.ExitGame))]
|
||||
[HarmonyPostfix]
|
||||
public static void ExitGame_Postfix([HarmonyArgument(0)] DisconnectReasons reason)
|
||||
{
|
||||
Logger.Log($"Client has left game for: {Enum.GetName(reason)}", "AmongUsClientPatch");
|
||||
}
|
||||
}
|
||||
[HarmonyPatch(typeof(CosmeticsLayer))]
|
||||
public class CosmeticsLayerPatch
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user