private ProductionFacility GetFacilityByBaseAndType(long baseEid, ProductionFacilityType facilityType)
 {
     return(Facilities.FirstOrDefault(f => f.Parent == baseEid && f.FacilityType == facilityType));
 }
 public ErrorCodes GetFacility(long baseEid, ProductionFacilityType facilityType, out ProductionFacility facility)
 {
     facility = GetFacilityByBaseAndType(baseEid, facilityType);
     return(facility == null ? ErrorCodes.ProductionFacilityNotFound : ErrorCodes.NoError);
 }