internal static void Postfix(ref float __result, GameObject target) { Vehicle vehicle = target.GetComponent <Vehicle>(); if (vehicle != null) // Target is vehicle { __result = VehicleUpgrader.ReduceIncomingDamage(vehicle, __result); } }
internal static void Postfix(ref CrushDamage __instance) { var seamoth = __instance.GetComponentInParent <SeaMoth>(); var exosuit = __instance.GetComponentInParent <Exosuit>(); if (seamoth != null) { VehicleUpgrader.UpgradeSeaMoth(seamoth); } else if (exosuit != null) { VehicleUpgrader.UpgradeExosuit(exosuit); } }
internal static void Postfix(ref float __result, GameObject target) { var vehicle = target.GetComponent <Vehicle>(); if (vehicle != null) // Target is vehicle { var vehicleUpgrader = VehicleUpgrader.GetUpgrader(vehicle); if (vehicleUpgrader == null) { return; } __result = vehicleUpgrader.GeneralDamageReduction * __result; } }
internal static void Postfix(ref Exosuit __instance, TechType techType) { VehicleUpgrader.GetUpgrader(__instance)?.UpgradeVehicle(techType); }
internal static void Postfix(ref Vehicle __instance) { VehicleUpgrader.UpgradeVehicle(__instance); }
internal static void Postfix(Vehicle __instance, TechType techType) { VehicleUpgrader.UpgradeVehicle(__instance, techType); }
internal static void Postfix(ref SeaMoth __instance) { VehicleUpgrader.UpgradeSeaMoth(__instance); }
internal static void Postfix(ref Exosuit __instance, TechType techType) { VehicleUpgrader.UpgradeExosuit(__instance, techType); }