Skip to content

Commit

Permalink
Change: Allow tram toolbar to open when tram tracks are available, ev…
Browse files Browse the repository at this point in the history
…en if no vehicles available yet.
  • Loading branch information
PeterN committed Feb 7, 2019
1 parent dd3f636 commit 06ea99c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/road_gui.cpp
Expand Up @@ -312,8 +312,6 @@ struct BuildRoadToolbarWindow : Window {
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_ROAD);
DeleteWindowById(WC_BUS_STATION, TRANSPORT_ROAD);
DeleteWindowById(WC_TRUCK_STATION, TRANSPORT_ROAD);

if (this->roadtype_identifier.IsTram()) delete this;
}
}

Expand Down Expand Up @@ -716,7 +714,7 @@ struct BuildRoadToolbarWindow : Window {
*/
static EventState RoadTramToolbarGlobalHotkeys(int hotkey, RoadTypeIdentifier last_build)
{
if (last_build.basetype == ROADTYPE_TRAM && (_game_mode != GM_NORMAL || !CanBuildRoadTypeInfrastructure(last_build, _local_company))) return ES_NOT_HANDLED;
if (last_build.basetype == ROADTYPE_TRAM && (_game_mode != GM_NORMAL || !HasRoadTypeAvail(_local_company, last_build))) return ES_NOT_HANDLED;

Window *w = NULL;
switch (_game_mode) {
Expand Down

0 comments on commit 06ea99c

Please sign in to comment.