mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-26 09:35:26 +00:00
add fireevent for component repair tick
This commit is contained in:
parent
a66892f70b
commit
f60c349576
@ -22,6 +22,7 @@ namespace QSB.ShipSync.Patches
|
|||||||
Prefix(nameof(ShipComponent_SetDamaged));
|
Prefix(nameof(ShipComponent_SetDamaged));
|
||||||
Prefix(nameof(ShipHull_FixedUpdate));
|
Prefix(nameof(ShipHull_FixedUpdate));
|
||||||
Prefix(nameof(ShipDamageController_OnImpact));
|
Prefix(nameof(ShipDamageController_OnImpact));
|
||||||
|
Postfix(nameof(ShipComponent_RepairTick));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool HatchController_OnPressInteract()
|
public static bool HatchController_OnPressInteract()
|
||||||
@ -187,5 +188,11 @@ namespace QSB.ShipSync.Patches
|
|||||||
|
|
||||||
public static bool ShipDamageController_OnImpact()
|
public static bool ShipDamageController_OnImpact()
|
||||||
=> ShipManager.Instance.HasAuthority;
|
=> ShipManager.Instance.HasAuthority;
|
||||||
|
|
||||||
|
public static bool ShipComponent_RepairTick(ShipComponent __instance, float ____repairFraction)
|
||||||
|
{
|
||||||
|
QSBEventManager.FireEvent(EventNames.QSBComponentRepairTick, __instance, ____repairFraction);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user