public override void PreApplyDamage(ref DamageInfo dinfo, out bool absorbed) { if (dinfo.Instigator is Pawn) { this.Map.GetComponent <MapComponent_MapEvents>().LastAttacked = Find.TickManager.TicksGame; } PurpleIvyMoteMaker.ThrowToxicGas(this.Position.ToVector3Shifted() + Gen.RandomHorizontalVector(1f), this.Map, 1f); base.PreApplyDamage(ref dinfo, out absorbed); }
public override void TickRare() { base.TickRare(); pumpfreq--; if (pumpfreq <= 0) { PurpleIvyMoteMaker.ThrowToxicGas(base.Position.ToVector3Shifted(), this.Map, 1f); pumpfreq = 3; } }
protected override void ExplosionVisualEffectCenter(Explosion explosion) { for (int i = 0; i < 4; i++) { PurpleIvyMoteMaker.ThrowToxicGas(explosion.Position.ToVector3Shifted() + Gen.RandomHorizontalVector(explosion.radius * 0.7f), explosion.Map, 1f); } //if (this.def.explosionInteriorMote != null) //{ // int num = Mathf.RoundToInt(3.14159274f * explosion.radius * explosion.radius / 6f); // for (int j = 0; j < num; j++) // { // MoteMaker.ThrowExplosionInteriorMote(explosion.Position.ToVector3Shifted() + Gen.RandomHorizontalVector(explosion.radius * 0.7f), explosion.Map, this.def.explosionInteriorMote); // } //} }
public override void Tick() { if (this.contents.SingleContainedThing is Building_Meteorite) { PurpleIvyMoteMaker.ThrowToxicGas(DrawPos, this.Map, 1f); PurpleIvyMoteMaker.ThrowLightningGlow(DrawPos, this.Map, 1f); } else if (this.contents.SingleContainedThing is AlienQueen) { MoteMaker.ThrowSmoke(DrawPos, this.Map, 3f); PurpleIvyMoteMaker.ThrowLightningGlow(DrawPos, this.Map, 3f); } this.ticksToImpact--; if (this.ticksToImpact <= 0) { this.PodImpact(); } if (!this.soundPlayed && this.ticksToImpact < 100) { this.soundPlayed = true; MeteorIncoming.LandSound.PlayOneShot(new TargetInfo(base.Position, base.Map, false)); } }