public void Notify_BulletImpactNearby(BulletImpactData impactData)
 {
     for (int i = 0; i < wornApparel.Count; i++)
     {
         wornApparel[i].Notify_BulletImpactNearby(impactData);
     }
 }
Esempio n. 2
0
        private void NotifyImpact(Thing hitThing, Map map, IntVec3 position)
        {
            BulletImpactData bulletImpactData = default(BulletImpactData);

            bulletImpactData.bullet         = this;
            bulletImpactData.hitThing       = hitThing;
            bulletImpactData.impactPosition = position;
            BulletImpactData impactData = bulletImpactData;

            hitThing?.Notify_BulletImpactNearby(impactData);
            int num = 9;

            for (int i = 0; i < num; i++)
            {
                IntVec3 c = position + GenRadial.RadialPattern[i];
                if (!c.InBounds(map))
                {
                    continue;
                }
                List <Thing> thingList = c.GetThingList(map);
                for (int j = 0; j < thingList.Count; j++)
                {
                    if (thingList[j] != hitThing)
                    {
                        thingList[j].Notify_BulletImpactNearby(impactData);
                    }
                }
            }
        }
        public override void Notify_BulletImpactNearby(BulletImpactData impactData)
        {
            base.Notify_BulletImpactNearby(impactData);
            Pawn wearer = base.Wearer;

            if (!wearer.Dead && !impactData.bullet.def.projectile.damageDef.isExplosive && CompProjectileInterceptor.InterceptsProjectile(BroadshieldProjectileInterceptorProperties(), impactData.bullet) && impactData.bullet.Launcher != null && impactData.bullet.Launcher.HostileTo(base.Wearer) && !wearer.IsColonist && wearer.Spawned && !NearbyActiveBroadshield())
            {
                Verb_DeployBroadshield.Deploy(this.TryGetComp <CompReloadable>());
            }
        }
        public override void Notify_BulletImpactNearby(BulletImpactData impactData)
        {
            base.Notify_BulletImpactNearby(impactData);
            Pawn wearer = base.Wearer;

            if (!wearer.Dead && !impactData.bullet.def.projectile.damageDef.isExplosive && impactData.bullet.Launcher is Building_Turret && impactData.bullet.Launcher != null && impactData.bullet.Launcher.HostileTo(base.Wearer) && !wearer.IsColonist && wearer.Spawned)
            {
                Gas gas = wearer.Position.GetGas(wearer.Map);
                if (gas == null || !gas.def.gas.blockTurretTracking)
                {
                    Verb_SmokePop.Pop(this.TryGetComp <CompReloadable>());
                }
            }
        }