this.ticksToDetonation=ExplosiveDef.explosionDelay;// Use ExplosiveDef for explosionDelay
GenExplosion.NotifyNearbyPawnsOfDangerousExplosive(this,ExplosiveDef.damageDef??DamageDefOf.Bomb,this.launcher.Faction,this.launcher);// Use ExplosiveDef for damageDef
}
}
protectedvirtualvoidExplode()
{
Mapmap=base.Map;
// ModExtension_Cone modExtension = this.def.GetModExtension<ModExtension_Cone>(); // Not used in this explosive logic
this.DoExplosion(map);// Call the helper DoExplosion with map
// Cone explosion logic (if needed, based on ModExtension_Cone) - Currently not implemented for this class
// effecter.Trigger(new TargetInfo(base.Position, map, false), new TargetInfo(base.Position, map, false), -1);
// effecter.Cleanup();
// }
// }
this.Destroy(DestroyMode.Vanish);
}
protectedvoidDoExplosion(Mapmap)
{
IntVec3position=base.Position;
floatexplosionRadius=ExplosiveDef.explosionRadius;// Use ExplosiveDef for explosionRadius
DamageDefdamageDef=ExplosiveDef.damageDef??DamageDefOf.Bomb;// Use ExplosiveDef for damageDef
Thinglauncher=this.launcher;
intdamageAmount=this.DamageAmount;
floatarmorPenetration=this.ArmorPenetration;
SoundDefsoundExplode=ExplosiveDef.soundExplode;// Use ExplosiveDef for soundExplode
ThingDefequipmentDef=this.equipmentDef;
ThingDefdef=this.def;// This is the projectile's ThingDef
Thingthing=this.intendedTarget.Thing;
ThingDefpostExplosionSpawnThingDef=ExplosiveDef.postExplosionSpawnThingDef;// Use ExplosiveDef for postExplosionSpawnThingDef
ThingDefpostExplosionSpawnThingDefWater=ExplosiveDef.postExplosionSpawnThingDefWater;// Use ExplosiveDef for postExplosionSpawnThingDefWater
floatpostExplosionSpawnChance=ExplosiveDef.postExplosionSpawnChance;// Use ExplosiveDef for postExplosionSpawnChance
intpostExplosionSpawnThingCount=ExplosiveDef.postExplosionSpawnThingCount;// Use ExplosiveDef for postExplosionSpawnThingCount
GasType?postExplosionGasType=ExplosiveDef.gasType;// Use ExplosiveDef for gasType
ThingDefpreExplosionSpawnThingDef=ExplosiveDef.preExplosionSpawnThingDef;// Use ExplosiveDef for preExplosionSpawnThingDef
floatpreExplosionSpawnChance=ExplosiveDef.preExplosionSpawnChance;// Use ExplosiveDef for preExplosionSpawnChance
intpreExplosionSpawnThingCount=ExplosiveDef.preExplosionSpawnThingCount;// Use ExplosiveDef for preExplosionSpawnThingCount
boolapplyDamageToExplosionCellsNeighbors=ExplosiveDef.applyDamageToExplosionCellsNeighbors;// Use ExplosiveDef for applyDamageToExplosionCellsNeighbors
floatexplosionChanceToStartFire=ExplosiveDef.explosionChanceToStartFire;// Use ExplosiveDef for explosionChanceToStartFire
boolexplosionDamageFalloff=ExplosiveDef.explosionDamageFalloff;// Use ExplosiveDef for explosionDamageFalloff
float?direction=newfloat?(this.origin.AngleToFlat(this.destination));// This remains from original logic
floatscreenShakeFactor=ExplosiveDef.screenShakeFactor;// Use ExplosiveDef for screenShakeFactor
booldoExplosionVFX=ExplosiveDef.doExplosionVFX;// Use ExplosiveDef for doExplosionVFX
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.