summaryrefslogtreecommitdiff
path: root/src/dock_gui.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-01-07 22:28:08 +0100
committerPatric Stout <github@truebrain.nl>2021-01-08 16:43:51 +0100
commit85a49a0d3605b83b911c57c6e5cc9d8b79365131 (patch)
tree5c98121072bc62f49e89c1636fa675df404df6be /src/dock_gui.cpp
parenta6aec252b1987d11e09f2778e481ae3d6fb916fa (diff)
downloadopenttd-85a49a0d3605b83b911c57c6e5cc9d8b79365131.tar.xz
Change: always allow to click on the toolbar icons for road/rail/dock/airport
This change allows a user to see what is available and what will become available before it is available, instead of only disabling the button with no further explanation. It also always allows building roads and canals, even if no vehicles are available for road / water. For rail/road/tram, a dropdown with available types is shown. If none are available, it reads "None". If the type is not yet available, it is greyed out. For dock/airport, this always open the toolbar, but building airports, docks, and depots buttons are disabled till vehicles are available for those. Road is the only exception, with the primary road always being available. Here too, stations and depots are disabled till vehicles become available. It does mean you can now always build roads to for example help towns grow.
Diffstat (limited to 'src/dock_gui.cpp')
-rw-r--r--src/dock_gui.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp
index 30a60e74f..7e2d61857 100644
--- a/src/dock_gui.cpp
+++ b/src/dock_gui.cpp
@@ -144,17 +144,14 @@ struct BuildDocksToolbarWindow : Window {
break;
case WID_DT_DEPOT: // Build depot button
- if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
if (HandlePlacePushButton(this, WID_DT_DEPOT, SPR_CURSOR_SHIP_DEPOT, HT_RECT)) ShowBuildDocksDepotPicker(this);
break;
case WID_DT_STATION: // Build station button
- if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
if (HandlePlacePushButton(this, WID_DT_STATION, SPR_CURSOR_DOCK, HT_SPECIAL)) ShowBuildDockStationPicker(this);
break;
case WID_DT_BUOY: // Build buoy button
- if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
HandlePlacePushButton(this, WID_DT_BUOY, SPR_CURSOR_BUOY, HT_RECT);
break;