miuu-room-code-obscurer/Patches/DiscordManagerPatches.cs

16 lines
356 B
C#
Raw Permalink Normal View History

2023-09-02 22:26:45 -04:00
using HarmonyLib;
using System;
namespace RoomCodeObscurer.Patches
{
[HarmonyPatch(typeof(DiscordManager), nameof(DiscordManager.SetPresence))]
internal class DiscordManagerSetPrecencePatch
{
static void Prefix(ref string state, ref string detail)
{
if (detail == "Playing Multiplayer")
state = CopyCodeMP.GetCodeDisplay(state);
}
}
}