25 lines
573 B
C#
Raw Normal View History

using HarmonyLib;
2021-12-24 21:28:41 -08: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 21:54:32 +01: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 22:38:32 +01:00
2021-12-24 21:28:41 -08:00
new RevealFactMessage(id, saveGame, showNotification).Send();
2020-12-19 10:56:25 +00:00
}
}
}