public static bool Prefix(VerbProperties __instance, Verb ownerVerb, Pawn attacker, ref float __result)
            {
                // Vanilla gun turret
                if (ownerVerb.Caster is Building_TurretGun gunTurret)
                {
                    __result = TurretExtensionsUtility.AdjustedTurretBurstWarmupTicks(gunTurret.def.building.turretBurstWarmupTime.SecondsToTicks(), gunTurret).TicksToSeconds() +
                               NonPublicMethods.Building_TurretGun_BurstCooldownTime(gunTurret) + ((__instance.burstShotCount - 1) * __instance.ticksBetweenBurstShots).TicksToSeconds();
                    return(false);
                }

                return(true);
            }
Beispiel #2
0
 public static void Postfix(Building_TurretGun __instance, ref int ___burstWarmupTicksLeft)
 {
     ___burstWarmupTicksLeft = TurretExtensionsUtility.AdjustedTurretBurstWarmupTicks(___burstWarmupTicksLeft, __instance);
 }