diff options
Diffstat (limited to 'src/station.cpp')
-rw-r--r-- | src/station.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/station.cpp b/src/station.cpp index 9ef44a280..416403048 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -400,16 +400,15 @@ CommandCost StationRect::BeforeAddTile(TileIndex tile, StationRectMode mode) return CommandCost(); } -bool StationRect::BeforeAddRect(TileIndex tile, int w, int h, StationRectMode mode) +CommandCost StationRect::BeforeAddRect(TileIndex tile, int w, int h, StationRectMode mode) { if (mode == ADD_FORCE || (w <= _settings_game.station.station_spread && h <= _settings_game.station.station_spread)) { /* Important when the old rect is completely inside the new rect, resp. the old one was empty. */ CommandCost ret = this->BeforeAddTile(tile, mode); if (ret.Succeeded()) ret = this->BeforeAddTile(TILE_ADDXY(tile, w - 1, h - 1), mode); - if (ret.Succeeded()) return true; - ret.SetGlobalErrorMessage(); + return ret; } - return false; + return CommandCost(); } /** |