* Marks the tiles of the station as dirty. * * @ingroup dirty */
| 245 | * @ingroup dirty |
| 246 | */ |
| 247 | void Station::MarkTilesDirty(bool cargo_change) const |
| 248 | { |
| 249 | if (this->train_station.tile == INVALID_TILE) return; |
| 250 | |
| 251 | /* cargo_change is set if we're refreshing the tiles due to cargo moving |
| 252 | * around. */ |
| 253 | if (cargo_change) { |
| 254 | /* Don't waste time updating if there are no custom station graphics |
| 255 | * that might change. Even if there are custom graphics, they might |
| 256 | * not change. Unfortunately we have no way of telling. */ |
| 257 | if (this->speclist.empty()) return; |
| 258 | } |
| 259 | |
| 260 | for (TileIndex tile : this->train_station) { |
| 261 | if (this->TileBelongsToRailStation(tile)) { |
| 262 | MarkTileDirtyByTile(tile); |
| 263 | } |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | /* virtual */ uint Station::GetPlatformLength(TileIndex tile) const |
| 268 | { |
no test coverage detected