* Show the content list window with all missing grfs from the given list. * @param list The list of grfs to check for missing / not exactly matching ones. */
| 1503 | * @param list The list of grfs to check for missing / not exactly matching ones. |
| 1504 | */ |
| 1505 | void ShowMissingContentWindow(const GRFConfigList &list) |
| 1506 | { |
| 1507 | /* Only show the things in the current list, or everything when nothing's selected */ |
| 1508 | ContentVector cv; |
| 1509 | for (const auto &c : list) { |
| 1510 | if (c->status != GCS_NOT_FOUND && !c->flags.Test(GRFConfigFlag::Compatible)) continue; |
| 1511 | |
| 1512 | auto ci = std::make_unique<ContentInfo>(); |
| 1513 | ci->type = CONTENT_TYPE_NEWGRF; |
| 1514 | ci->state = ContentInfo::State::DoesNotExist; |
| 1515 | ci->name = c->GetName(); |
| 1516 | ci->unique_id = std::byteswap(c->ident.grfid); |
| 1517 | ci->md5sum = c->flags.Test(GRFConfigFlag::Compatible) ? c->original_md5sum : c->ident.md5sum; |
| 1518 | cv.push_back(std::move(ci)); |
| 1519 | } |
| 1520 | ShowNetworkContentListWindow(cv.empty() ? nullptr : &cv, CONTENT_TYPE_NEWGRF); |
| 1521 | } |
| 1522 | |
| 1523 | Listing NewGRFWindow::last_sorting = {false, 0}; |
| 1524 | Filtering NewGRFWindow::last_filtering = {false, 0}; |