* Obtain a NewGRF file by its grfID * @param grfid The grfID to obtain the file for * @return The file. */
| 102 | * @return The file. |
| 103 | */ |
| 104 | GRFFile *GetFileByGRFID(uint32_t grfid) |
| 105 | { |
| 106 | auto it = std::ranges::find(_grf_files, grfid, &GRFFile::grfid); |
| 107 | if (it != std::end(_grf_files)) return &*it; |
| 108 | return nullptr; |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * Obtain a NewGRF file by its filename |
no test coverage detected