private static void ArmorReroute(Pawn pawn, ref DamageInfo dinfo)
        {
            var newDinfo = ArmorUtilityCE.GetAfterArmorDamage(dinfo, pawn, dinfo.HitPart, out armorAbsorbed);

            if (dinfo.HitPart != newDinfo.HitPart)
            {
                if (pawn.Spawned)
                {
                    LessonAutoActivator.TeachOpportunity(CE_ConceptDefOf.CE_ArmorSystem, OpportunityType.Critical);                 // Inform the player about armor deflection
                }
            }
            dinfo = newDinfo;
        }
Пример #2
0
        private static readonly int[] ArmorBlockNullOps = { 1, 3, 4, 5, 6 };  // Lines in armor block that need to be nulled out

        private static void ArmorReroute(Pawn pawn, ref DamageInfo dinfo, out bool deflectedByArmor, out bool diminishedByArmor)
        {
            var newDinfo = ArmorUtilityCE.GetAfterArmorDamage(dinfo, pawn, dinfo.HitPart, out deflectedByArmor, out diminishedByArmor, out shieldAbsorbed);

            if (dinfo.HitPart != newDinfo.HitPart)
            {
                if (pawn.Spawned)
                {
                    LessonAutoActivator.TeachOpportunity(CE_ConceptDefOf.CE_ArmorSystem, OpportunityType.Critical);                 // Inform the player about armor deflection
                }
            }
            Patch_CheckDuplicateDamageToOuterParts.lastHitPartHealth = pawn.health.hediffSet.GetPartHealth(newDinfo.HitPart);

            dinfo = newDinfo;
        }