public static bool PawnUsesWeaponMadeOf(this Pawn p, List <string> parameters) { if (p.equipment == null || p.equipment.Primary.DestroyedOrNull()) { return(false); } ThingWithComps w = p.equipment.Primary; return(w.ThingIsMadeOfStuff(parameters) || w.ThingHasIngredient(parameters)); }