| 607 | } |
| 608 | |
| 609 | CommandCost StationRect::BeforeAddRect(TileIndex tile, int w, int h, StationRectMode mode) |
| 610 | { |
| 611 | if (mode == ADD_FORCE || (w <= _settings_game.station.station_spread && h <= _settings_game.station.station_spread)) { |
| 612 | /* Important when the old rect is completely inside the new rect, resp. the old one was empty. */ |
| 613 | CommandCost ret = this->BeforeAddTile(tile, mode); |
| 614 | if (ret.Succeeded()) ret = this->BeforeAddTile(TileAddXY(tile, w - 1, h - 1), mode); |
| 615 | return ret; |
| 616 | } |
| 617 | return CommandCost(); |
| 618 | } |
| 619 | |
| 620 | /** |
| 621 | * Check whether station tiles of the given station id exist in the given rectangle |
no test coverage detected