* Get overridden GRF for current GRF if present. * @return Overridden GRFFile if present, or nullptr. */
| 194 | * @return Overridden GRFFile if present, or nullptr. |
| 195 | */ |
| 196 | GRFFile *GetCurrentGRFOverride() |
| 197 | { |
| 198 | auto found = _grf_id_overrides.find(_cur_gps.grffile->grfid); |
| 199 | if (found != std::end(_grf_id_overrides)) { |
| 200 | GRFFile *grffile = GetFileByGRFID(found->second); |
| 201 | if (grffile != nullptr) return grffile; |
| 202 | } |
| 203 | return nullptr; |
| 204 | } |
| 205 | |
| 206 | /** |
| 207 | * Returns the engine associated to a certain internal_id, resp. allocates it. |
no test coverage detected