mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(svn r15709) -Change [FS#2729]: be a tad more specific about the fact that you're building incompatible tracks when building incompatible track types on the same tile.
This commit is contained in:
parent
2e6e2457f1
commit
aea8e7291e
@ -319,15 +319,14 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u
|
||||
|
||||
switch (GetTileType(tile)) {
|
||||
case MP_RAILWAY:
|
||||
if (!CheckTileOwnership(tile)) return CMD_ERROR;
|
||||
|
||||
if (!IsCompatibleRail(GetRailType(tile), railtype)) return_cmd_error(STR_1001_IMPOSSIBLE_TRACK_COMBINATION);
|
||||
|
||||
if (!CheckTrackCombination(tile, trackbit, flags) ||
|
||||
!EnsureNoTrainOnTrack(tile, track)) {
|
||||
return CMD_ERROR;
|
||||
}
|
||||
if (!IsTileOwner(tile, _current_company) ||
|
||||
!IsCompatibleRail(GetRailType(tile), railtype)) {
|
||||
/* Get detailed error message */
|
||||
return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
|
||||
}
|
||||
|
||||
ret = CheckRailSlope(tileh, trackbit, GetTrackBits(tile), tile);
|
||||
if (CmdFailed(ret)) return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user