mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-19 18:35:48 +01:00
(svn r15069) -Change (r14919): Make distant-join less intelligent but more transparent to the user by always showing the selection window, even if there is only one option to choose from. (PhilSophus)
This commit is contained in:
parent
2e30efb530
commit
9ca1e15f51
@ -1226,16 +1226,11 @@ static bool StationJoinerNeeded(CommandContainer cmd, int w, int h)
|
|||||||
/* Now check if we could build there */
|
/* Now check if we could build there */
|
||||||
if (CmdFailed(DoCommand(&cmd, CommandFlagsToDCFlags(GetCommandFlags(cmd.cmd))))) return false;
|
if (CmdFailed(DoCommand(&cmd, CommandFlagsToDCFlags(GetCommandFlags(cmd.cmd))))) return false;
|
||||||
|
|
||||||
/* First test for adjacent station */
|
/* Test for adjacent station or station below selection.
|
||||||
FindStationsNearby(cmd.tile, w, h, false);
|
* If adjacent-stations is disabled and we are building next to a station, do not show the selection window.
|
||||||
int neighbour_station_count = _stations_nearby_list.Length();
|
* but join the other station immediatelly. */
|
||||||
/* Now test for stations fully within station spread */
|
const Station *st = FindStationsNearby(cmd.tile, w, h, false);
|
||||||
const Station *st = FindStationsNearby(cmd.tile, w, h, true);
|
return st == NULL && (_settings_game.station.adjacent_stations || _stations_nearby_list.Length() == 0);
|
||||||
if (_settings_game.station.adjacent_stations) {
|
|
||||||
return (neighbour_station_count == 0 || _stations_nearby_list.Length() > 1) && st == NULL;
|
|
||||||
} else {
|
|
||||||
return neighbour_station_count == 0 && _stations_nearby_list.Length() > 0 && st == NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user