using System.Reflection;
using NitroxClient.GameLogic;
using NitroxModel.Helper;
namespace NitroxPatcher.Patches.Dynamic;
///
/// would seem like the correct method to patch, but adding to its postfix will
/// execute before is finished working. Both owners and non-owners will be able to repair damage points on a ship.
///
public sealed partial class CyclopsDamagePoint_OnRepair_Patch : NitroxPatch, IDynamicPatch
{
public static readonly MethodInfo TARGET_METHOD = Reflect.Method((CyclopsDamagePoint t) => t.OnRepair());
public static void Postfix(CyclopsDamagePoint __instance)
{
// If the amount is high enough, it'll heal full
Resolve().OnDamagePointRepaired(__instance.GetComponentInParent(), __instance, 999);
}
}