public override bool Matches(Thing t) { if (t == null) { return(false); } if (!CanEverMatch(t.def)) { return(false); } if (RottableFilter.Matches(t.def)) { // See if this is fully rotted at which point it cannot get any worse and we can put it in this zone Debugger.Break(); return(false); } if (MustCoverDoesntRot.Matches(t.def)) { return(false); } return(true); }
internal static bool Matches(ThingDef thingDef) { if (thingDef == null) { return(false); } if (RottableFilter.Matches(thingDef)) { return(false); } if (thingDef.CanEverDeteriorate) { float rate = thingDef.GetStatValueAbstract(StatDefOf.DeteriorationRate); if (rate > 0.0) { return(true); } else { // This is stuff like chunks (granit, marble, etc.) return(false); } } return(false); }