From f60c349576a38ce16d0514d43b90d3e1cec4e71a Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Sun, 20 Jun 2021 10:19:52 +0100 Subject: [PATCH] add fireevent for component repair tick --- QSB/ShipSync/Patches/ShipPatches.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/QSB/ShipSync/Patches/ShipPatches.cs b/QSB/ShipSync/Patches/ShipPatches.cs index 258c53c2..2b023100 100644 --- a/QSB/ShipSync/Patches/ShipPatches.cs +++ b/QSB/ShipSync/Patches/ShipPatches.cs @@ -22,6 +22,7 @@ namespace QSB.ShipSync.Patches Prefix(nameof(ShipComponent_SetDamaged)); Prefix(nameof(ShipHull_FixedUpdate)); Prefix(nameof(ShipDamageController_OnImpact)); + Postfix(nameof(ShipComponent_RepairTick)); } public static bool HatchController_OnPressInteract() @@ -187,5 +188,11 @@ namespace QSB.ShipSync.Patches public static bool ShipDamageController_OnImpact() => ShipManager.Instance.HasAuthority; + + public static bool ShipComponent_RepairTick(ShipComponent __instance, float ____repairFraction) + { + QSBEventManager.FireEvent(EventNames.QSBComponentRepairTick, __instance, ____repairFraction); + return true; + } } }