public static void AddDamage(FragmentIntegrity __instance, float damage) { var qsbFragment = __instance.GetWorldObject <QSBFragment>(); qsbFragment.SendMessage(new FragmentDamageMessage(damage)); }
public static void Detach_Postfix(DetachableFragment __instance, FragmentIntegrity __state) => __instance._fragmentIntegrity = __state;
public static void Detach_Prefix(DetachableFragment __instance, out FragmentIntegrity __state) => // this gets set to null in Detach, so store it here and and then restore it in postfix __state = __instance._fragmentIntegrity;