public static DamageDef GetDamageDef(this Verb verb) { if (verb.verbProps.LaunchesProjectile) { return(verb.GetProjectile()?.projectile.damageDef); } return(verb.verbProps.meleeDamageDef); }
public static bool UsesExplosiveProjectiles(this Verb verb) { ThingDef projectile = verb.GetProjectile(); if (projectile != null) { return(projectile.projectile.explosionRadius > 0f); } return(false); }
public static DamageDef GetDamageDef(this Verb verb) { if (verb.verbProps.LaunchesProjectile) { ThingDef projectile = verb.GetProjectile(); if (projectile != null) { return(projectile.projectile.damageDef); } return(null); } return(verb.verbProps.meleeDamageDef); }
public static DamageDef GetDamageDef(this Verb verb) { DamageDef result; if (verb.verbProps.LaunchesProjectile) { ThingDef projectile = verb.GetProjectile(); if (projectile != null) { result = projectile.projectile.damageDef; } else { result = null; } } else { result = verb.verbProps.meleeDamageDef; } return(result); }
public static bool ProjectileFliesOverhead(this Verb verb) { ThingDef projectile = verb.GetProjectile(); return(projectile != null && projectile.projectile.flyOverhead); }
public static bool IsIncendiary(this Verb verb) { ThingDef projectile = verb.GetProjectile(); return(projectile != null && projectile.projectile.ai_IsIncendiary); }
public static bool ProjectileFliesOverhead(this Verb verb) { return(verb.GetProjectile()?.projectile.flyOverhead ?? false); }
public static bool IsIncendiary(this Verb verb) { return(verb.GetProjectile()?.projectile.ai_IsIncendiary ?? false); }