2021-10-15 20:06:51 +00:00
|
|
|
|
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;
|
|
|
|
|
|
2020-12-31 12:10:55 +00:00
|
|
|
|
namespace QSB.LogSync.Patches
|
2020-12-19 10:56:25 +00:00
|
|
|
|
{
|
2021-10-15 20:06:51 +00:00
|
|
|
|
[HarmonyPatch]
|
2020-12-19 10:56:25 +00:00
|
|
|
|
public class LogPatches : QSBPatch
|
|
|
|
|
{
|
|
|
|
|
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
|
|
|
|
|
2021-10-15 20:06:51 +00:00
|
|
|
|
[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
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|