protected virtual void Explode()
        {
            this.Destroy(DestroyMode.Vanish);
            ProjectilePropertiesCR propsCR     = def.projectile as ProjectilePropertiesCR;
            ThingDef preExplosionSpawnThingDef = this.def.projectile.preExplosionSpawnThingDef;
            float    explosionSpawnChance      = this.def.projectile.explosionSpawnChance;

            GenExplosion.DoExplosion(base.Position,
                                     this.def.projectile.explosionRadius,
                                     this.def.projectile.damageDef,
                                     this.launcher,
                                     this.def.projectile.soundExplode,
                                     this.def,
                                     this.equipmentDef,
                                     this.def.projectile.postExplosionSpawnThingDef,
                                     this.def.projectile.explosionSpawnChance,
                                     1,
                                     propsCR == null ? false : propsCR.damageAdjacentTiles,
                                     preExplosionSpawnThingDef,
                                     this.def.projectile.explosionSpawnChance,
                                     1);
            ThrowBigExplode(base.Position.ToVector3Shifted() + Gen.RandomHorizontalVector(def.projectile.explosionRadius * 0.7f), def.projectile.explosionRadius * 0.6f);
            CompExplosiveCR comp = this.TryGetComp <CompExplosiveCR>();

            if (comp != null)
            {
                comp.Explode(launcher, this.Position);
            }
        }
        protected virtual void Explode()
        {
            this.Destroy(DestroyMode.Vanish);
            ProjectilePropertiesCR propsCR     = def.projectile as ProjectilePropertiesCR;
            ThingDef preExplosionSpawnThingDef = this.def.projectile.preExplosionSpawnThingDef;

            GenExplosion.DoExplosion(base.Position,
                                     this.def.projectile.explosionRadius,
                                     this.def.projectile.damageDef,
                                     this.launcher,
                                     this.def.projectile.soundExplode,
                                     this.def,
                                     this.equipmentDef,
                                     this.def.projectile.postExplosionSpawnThingDef,
                                     this.def.projectile.explosionSpawnChance,
                                     propsCR == null ? false : propsCR.damageAdjacentTiles,
                                     preExplosionSpawnThingDef,
                                     this.def.projectile.explosionSpawnChance);

            CompExplosiveCR comp = this.TryGetComp <CompExplosiveCR>();

            if (comp != null)
            {
                comp.Explode(launcher);
            }
        }
Ejemplo n.º 3
0
        //Unmodified
        protected virtual void Impact(Thing hitThing)
        {
            CompExplosiveCR comp = this.TryGetComp <CompExplosiveCR>();

            if (comp != null && launcher != null && this.Position.IsValid)
            {
                comp.Explode(launcher, Position, Find.VisibleMap);
            }
            Destroy(DestroyMode.Vanish);
        }
Ejemplo n.º 4
0
        //Unmodified
        protected virtual void Impact(Thing hitThing)
        {
            CompExplosiveCR comp = this.TryGetComp <CompExplosiveCR>();

            if (comp != null)
            {
                comp.Explode(this.launcher);
            }
            this.Destroy(DestroyMode.Vanish);
        }
Ejemplo n.º 5
0
        protected virtual void Explode()
        {
            Map map = base.Map;

            this.Destroy(DestroyMode.Vanish);
            ProjectilePropertiesCR propsCR     = def.projectile as ProjectilePropertiesCR;
            ThingDef preExplosionSpawnThingDef = this.def.projectile.preExplosionSpawnThingDef;
            float    explosionSpawnChance      = this.def.projectile.explosionSpawnChance;

            GenExplosion.DoExplosion(base.Position,
                                     map,
                                     this.def.projectile.explosionRadius,
                                     this.def.projectile.damageDef,
                                     this.launcher,
                                     this.def.projectile.soundExplode,
                                     this.def,
                                     this.equipmentDef,
                                     this.def.projectile.postExplosionSpawnThingDef,
                                     this.def.projectile.explosionSpawnChance,
                                     1,
                                     false, // propsCR == null ? false : propsCR.damageAdjacentTiles,
                                     preExplosionSpawnThingDef,
                                     explosionSpawnChance,
                                     1);

            if (map != null && base.Position.IsValid)
            {
                ThrowBigExplode(base.Position.ToVector3Shifted() + Gen.RandomHorizontalVector(def.projectile.explosionRadius * 0.5f), base.Map, def.projectile.explosionRadius * 0.4f);
            }

            CompExplosiveCR comp = this.TryGetComp <CompExplosiveCR>();

            if (comp != null && this.launcher != null && this.Position.IsValid)
            {
                comp.Explode(launcher, this.Position, Find.VisibleMap);
            }
        }