quantum-space-buddies/QSB/LogSync/Patches/LogPatches.cs

25 lines
573 B
C#
Raw Normal View History

using HarmonyLib;
2021-12-25 05:28:41 +00:00
using QSB.LogSync.Messages;
using QSB.Messaging;
2020-12-19 10:56:25 +00:00
using QSB.Patches;
namespace QSB.LogSync.Patches
2020-12-19 10:56:25 +00:00
{
[HarmonyPatch]
2020-12-19 10:56:25 +00:00
public class LogPatches : QSBPatch
{
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
[HarmonyPostfix]
[HarmonyPatch(typeof(ShipLogManager), nameof(ShipLogManager.RevealFact))]
2021-06-18 20:54:32 +00:00
public static void ShipLogManager_RevealFact(string id, bool saveGame, bool showNotification, bool __result)
2020-12-19 10:56:25 +00:00
{
if (!__result)
{
return;
}
2021-06-18 21:38:32 +00:00
2021-12-25 05:28:41 +00:00
new RevealFactMessage(id, saveGame, showNotification).Send();
2020-12-19 10:56:25 +00:00
}
}
}