/// <summary> /// Hash the docking ports. /// </summary> public override int GetHashCode() { int hash = part.GetHashCode() ^ port.GetHashCode(); if (shield != null) { hash ^= shield.GetHashCode(); } if (portNameModule != null) { hash ^= portNameModule.GetHashCode(); } if (portNameField != null) { hash ^= portNameField.GetHashCode(); } return(hash); }
/// <summary> /// Hash code for the object. /// </summary> public override int GetHashCode() { return(Part.GetHashCode() ^ module.GetHashCode()); }
public static string GetID(this PartModule part_module) => part_module == null ? "_part_module" : string.Format("{0}:{1}[{2:X}]", part_module.part.GetID(), part_module.ClassName, part_module.GetHashCode());
public static string GetID(this PartModule part_module) => part_module == null ? "_part_module" : $"{GetID(part_module.part)}:{part_module.GetType().Name}[{part_module.GetHashCode():X}]";