static internal void RemovePartFailure(Part p) { FailedPart fp = new FailedPart(p); if (failedParts.ContainsKey(fp)) { var i1 = failedParts[fp] - 1; if (i1 > 0) { failedParts[fp] = i1; } else { failedParts.Remove(fp); } } else { Log.Error("RemovePartFailure, failedParts does NOT contain key: " + p.vessel.id.ToString() + ":" + p.persistentId.ToString()); } }
public bool Equals(FailedPart obj) { return(obj != null && obj.PartId == this.PartId); }