Open Alicecomma opened 6 years ago
XML: RulePackDefs should be written as indicated. See "RulePackDefs/DamageEvent_CookOff.xml" C#: new RulePackDefs should be referenced instead of vanilla RulePackDefs. See "Projectiles/BulletCE.cs":
//The following code excludes turrets etcetera from having cook off projectile impacts recorded in their combat log.
//If it is necessary to add cook off to turret logs, a new BattleLogEntry_ must be created, because BattleLogEntry_DamageTaken,
//which is the only method capable of handling cookoff and only using pawns, can not take !(hitThing is Pawn).
if (cookOff && hitThing is Pawn)
{
logEntry =
new BattleLogEntry_DamageTaken(
(Pawn)hitThing,
DefDatabase<RulePackDef>.GetNamed("DamageEvent_CookOff"));
Find.BattleLog.Add(logEntry);
}
This can be done for many of the verbs and under several circumstances.