// Token: 0x06004F05 RID: 20229 RVA: 0x001A99DC File Offset: 0x001A7BDC public override void Impact() { for (int i = 0; i < 6; i++) { AdeptusMoteMaker.ThrowDustPuff(base.Position.ToVector3Shifted() + Gen.RandomHorizontalVector(1f), base.Map, 1.2f); } // MoteMaker.ThrowLightningGlow(base.Position.ToVector3Shifted(), base.Map, 2f); GenClamor.DoClamor(this, 15f, ClamorDefOf.Impact); if (this.def.skyfaller.CausesExplosion) { GenExplosion.DoExplosion(base.Position, base.Map, this.def.skyfaller.explosionRadius, this.def.skyfaller.explosionDamage, null, GenMath.RoundRandom((float)this.def.skyfaller.explosionDamage.defaultDamage * this.def.skyfaller.explosionDamageFactor), -1f, null, null, null, null, null, 0f, 1, false, null, 0f, 1, 0f, false, null, (!this.def.skyfaller.damageSpawnedThings) ? this.innerContainer.ToList <Thing>() : null); } this.SpawnThings(); this.innerContainer.ClearAndDestroyContents(DestroyMode.Vanish); CellRect cellRect = this.OccupiedRect(); for (int i = 0; i < cellRect.Area * this.def.skyfaller.motesPerCell; i++) { AdeptusMoteMaker.ThrowDustPuff(cellRect.RandomVector3, base.Map, 2f); } if (this.def.skyfaller.MakesShrapnel) { SkyfallerShrapnelUtility.MakeShrapnel(base.Position, base.Map, this.shrapnelDirection, this.def.skyfaller.shrapnelDistanceFactor, this.def.skyfaller.metalShrapnelCountRange.RandomInRange, this.def.skyfaller.rubbleShrapnelCountRange.RandomInRange, true); } if (this.def.skyfaller.cameraShake > 0f && base.Map == Find.CurrentMap) { Find.CameraDriver.shaker.DoShake(this.def.skyfaller.cameraShake); } if (this.def.skyfaller.impactSound != null) { this.def.skyfaller.impactSound.PlayOneShot(SoundInfo.InMap(new TargetInfo(base.Position, base.Map, false), MaintenanceType.None)); } this.Destroy(DestroyMode.Vanish); }
protected virtual void Impact() { if (def.skyfaller.CausesExplosion) { GenExplosion.DoExplosion(Position, Map, def.skyfaller.explosionRadius, def.skyfaller.explosionDamage, null, GenMath.RoundRandom(def.skyfaller.explosionDamage.defaultDamage * def.skyfaller.explosionDamageFactor), -1f, null, null, null, null, null, 0f, 1, false, null, 0f, 1, 0f, false, null, (!def.skyfaller.damageSpawnedThings) ? vehicle.inventory.innerContainer.ToList() : null); } //this.SpawnThings(); CellRect cellRect = this.OccupiedRect(); for (int i = 0; i < cellRect.Area * def.skyfaller.motesPerCell; i++) { MoteMaker.ThrowDustPuff(cellRect.RandomVector3, Map, 2f); } if (def.skyfaller.MakesShrapnel) { SkyfallerShrapnelUtility.MakeShrapnel(Position, Map, shrapnelDirection, def.skyfaller.shrapnelDistanceFactor, def.skyfaller.metalShrapnelCountRange.RandomInRange, def.skyfaller.rubbleShrapnelCountRange.RandomInRange, true); } if (def.skyfaller.cameraShake > 0f && Map == Find.CurrentMap) { Find.CameraDriver.shaker.DoShake(def.skyfaller.cameraShake); } if (def.skyfaller.impactSound != null) { def.skyfaller.impactSound.PlayOneShot(SoundInfo.InMap(new TargetInfo(Position, Map, false), MaintenanceType.None)); } FinalizeLanding(); }
// Token: 0x06000052 RID: 82 RVA: 0x000045CC File Offset: 0x000027CC public void JPImpact() { if (def.skyfaller.CausesExplosion) { GenExplosion.DoExplosion(Position, Map, def.skyfaller.explosionRadius, def.skyfaller.explosionDamage, null, GenMath.RoundRandom(def.skyfaller.explosionDamage.defaultDamage * def.skyfaller.explosionDamageFactor)); } for (var num = innerContainer.Count - 1; num >= 0; num--) { GenPlace.TryPlaceThing(innerContainer[num], Position, Map, ThingPlaceMode.Near, delegate(Thing thing, int _) { PawnUtility.RecoverFromUnwalkablePositionOrKill(thing.Position, thing.Map); if (thing.def.Fillage == FillCategory.Full && def.skyfaller.CausesExplosion && thing.Position.InHorDistOf(Position, def.skyfaller.explosionRadius)) { Map.terrainGrid.Notify_TerrainDestroyed(thing.Position); } }); } innerContainer.ClearAndDestroyContents(); var cellRect = this.OccupiedRect(); for (var i = 0; i < cellRect.Area * def.skyfaller.motesPerCell; i++) { FleckMaker.ThrowDustPuff(cellRect.RandomVector3, Map, 2f); } if (def.skyfaller.MakesShrapnel) { SkyfallerShrapnelUtility.MakeShrapnel(Position, Map, shrapnelDirection, def.skyfaller.shrapnelDistanceFactor, def.skyfaller.metalShrapnelCountRange.RandomInRange, def.skyfaller.rubbleShrapnelCountRange.RandomInRange, true); } if (def.skyfaller.cameraShake > 0f && Map == Find.CurrentMap) { Find.CameraDriver.shaker.DoShake(def.skyfaller.cameraShake); } def.skyfaller.impactSound?.PlayOneShot(SoundInfo.InMap(new TargetInfo(Position, Map))); Destroy(); }
// prefix // - wants instance, result and count // - wants to change count // - returns a boolean that controls if original is executed (true) or not (false) public static Boolean DropPodIncomingImpactPrefix(ref DropPodIncoming __instance) { Log.Message("Dp incoming called."); if (__instance.Map.GetComponent <ShieldManagerMapComp>().WillDropPodBeIntercepted(__instance)) // if the droppod is being intercepted, prevent it from spawning the contents. { __instance.innerContainer.ClearAndDestroyContents(DestroyMode.Vanish); SkyfallerShrapnelUtility.MakeShrapnel(__instance.Position, __instance.Map, __instance.shrapnelDirection, __instance.def.skyfaller.shrapnelDistanceFactor, 3, 0, true); Find.CameraDriver.shaker.DoShake(__instance.def.skyfaller.cameraShake); SoundStarter.PlayOneShot(DamageDefOf.Bomb.soundExplosion, SoundInfo.InMap(new TargetInfo(__instance.Position, __instance.Map))); __instance.Destroy(DestroyMode.Vanish); return(false); } //Retuen False so the origional method is not executed, overriting the false result. return(true); }
public override void Impact() { if (Payload != null) { if (Payload.projectile.explosionDelay == 0) { this.Explode(); return; } this.landed = true; this.ticksToDetonation = Payload.projectile.explosionDelay; GenExplosion.NotifyNearbyPawnsOfDangerousExplosive(this, Payload.projectile.damageDef, this.launcher.Faction); } else if (this.def.skyfaller.CausesExplosion) { // Log.Message("CausesExplosion"); GenExplosion.DoExplosion(base.Position, base.Map, this.def.skyfaller.explosionRadius, this.def.skyfaller.explosionDamage, null, GenMath.RoundRandom((float)this.def.skyfaller.explosionDamage.defaultDamage * this.def.skyfaller.explosionDamageFactor), -1f, null, null, null, null, null, 0f, 1, false, null, 0f, 1, 0f, false, null, (!this.def.skyfaller.damageSpawnedThings) ? this.innerContainer.ToList <Thing>() : null); } // this.SpawnThings(); this.innerContainer.ClearAndDestroyContents(DestroyMode.Vanish); CellRect cellRect = this.OccupiedRect(); for (int i = 0; i < cellRect.Area * this.def.skyfaller.motesPerCell; i++) { AdeptusMoteMaker.ThrowDustPuff(cellRect.RandomVector3, base.Map, 2f); } if (this.def.skyfaller.MakesShrapnel) { SkyfallerShrapnelUtility.MakeShrapnel(base.Position, base.Map, this.shrapnelDirection, this.def.skyfaller.shrapnelDistanceFactor, this.def.skyfaller.metalShrapnelCountRange.RandomInRange, this.def.skyfaller.rubbleShrapnelCountRange.RandomInRange, true); } if (this.def.skyfaller.cameraShake > 0f && base.Map == Find.CurrentMap) { Find.CameraDriver.shaker.DoShake(this.def.skyfaller.cameraShake); } if (this.def.skyfaller.impactSound != null) { this.def.skyfaller.impactSound.PlayOneShot(SoundInfo.InMap(new TargetInfo(base.Position, base.Map, false), MaintenanceType.None)); } this.Destroy(DestroyMode.Vanish); }
// Token: 0x06000052 RID: 82 RVA: 0x000045CC File Offset: 0x000027CC public void JPImpact() { if (this.def.skyfaller.CausesExplosion) { GenExplosion.DoExplosion(base.Position, base.Map, this.def.skyfaller.explosionRadius, this.def.skyfaller.explosionDamage, null, GenMath.RoundRandom((float)this.def.skyfaller.explosionDamage.defaultDamage * this.def.skyfaller.explosionDamageFactor), -1f, null, null, null, null, null, 0f, 1, false, null, 0f, 1, 0f, false, null, null); } for (int num = this.innerContainer.Count - 1; num >= 0; num--) { GenPlace.TryPlaceThing(this.innerContainer[num], base.Position, base.Map, ThingPlaceMode.Near, delegate(Thing thing, int count) { PawnUtility.RecoverFromUnwalkablePositionOrKill(thing.Position, thing.Map); if (thing.def.Fillage == FillCategory.Full && this.def.skyfaller.CausesExplosion && thing.Position.InHorDistOf(base.Position, this.def.skyfaller.explosionRadius)) { base.Map.terrainGrid.Notify_TerrainDestroyed(thing.Position); } }, null, default); } this.innerContainer.ClearAndDestroyContents(0); CellRect cellRect = GenAdj.OccupiedRect(this); for (int i = 0; i < cellRect.Area * this.def.skyfaller.motesPerCell; i++) { MoteMaker.ThrowDustPuff(cellRect.RandomVector3, base.Map, 2f); } if (this.def.skyfaller.MakesShrapnel) { SkyfallerShrapnelUtility.MakeShrapnel(base.Position, base.Map, this.shrapnelDirection, this.def.skyfaller.shrapnelDistanceFactor, this.def.skyfaller.metalShrapnelCountRange.RandomInRange, this.def.skyfaller.rubbleShrapnelCountRange.RandomInRange, true); } if (this.def.skyfaller.cameraShake > 0f && base.Map == Find.CurrentMap) { Find.CameraDriver.shaker.DoShake(this.def.skyfaller.cameraShake); } if (this.def.skyfaller.impactSound != null) { SoundStarter.PlayOneShot(this.def.skyfaller.impactSound, SoundInfo.InMap(new TargetInfo(base.Position, base.Map, false), 0)); } this.Destroy(0); }