public static bool HasAttachment(this Thing t, ThingDef def)
 {
     return(t.GetAttachment(def) != null);
 }