quantum-space-buddies/QSB/LogSync/Patches/LogPatches.cs
2022-03-02 19:46:33 -08:00

24 lines
556 B
C#

using HarmonyLib;
using QSB.LogSync.Messages;
using QSB.Messaging;
using QSB.Patches;
namespace QSB.LogSync.Patches;
[HarmonyPatch]
public class LogPatches : QSBPatch
{
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
[HarmonyPostfix]
[HarmonyPatch(typeof(ShipLogManager), nameof(ShipLogManager.RevealFact))]
public static void ShipLogManager_RevealFact(string id, bool saveGame, bool showNotification, bool __result)
{
if (!__result)
{
return;
}
new RevealFactMessage(id, saveGame, showNotification).Send();
}
}