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

23 lines
665 B
C#
Raw Normal View History

2020-12-19 10:56:25 +00:00
using QSB.Events;
using QSB.Patches;
namespace QSB.LogSync.Patches
2020-12-19 10:56:25 +00:00
{
public class LogPatches : QSBPatch
{
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
public static void RevealFact(string id, bool saveGame, bool showNotification, bool __result)
{
if (!__result)
{
return;
}
2021-02-10 19:34:41 +00:00
QSBEventManager.FireEvent(EventNames.QSBRevealFact, id, saveGame, showNotification);
2020-12-19 10:56:25 +00:00
}
2021-03-13 10:17:52 +00:00
public override void DoPatches() => QSBCore.HarmonyHelper.AddPostfix<ShipLogManager>("RevealFact", typeof(LogPatches), nameof(RevealFact));
2021-02-09 17:18:01 +00:00
2021-03-13 10:17:52 +00:00
public override void DoUnpatches() => QSBCore.HarmonyHelper.Unpatch<ShipLogManager>("RevealFact");
2020-12-19 10:56:25 +00:00
}
}