diff options
author | KUDr <kudr@openttd.org> | 2006-11-17 19:31:44 +0000 |
---|---|---|
committer | KUDr <kudr@openttd.org> | 2006-11-17 19:31:44 +0000 |
commit | f2cda44d2e3c55069279ad3e03aeb5d2a7f0f35c (patch) | |
tree | 9c7682092cc873482f869cd11ccca7d20fe73bc2 /tunnelbridge_cmd.c | |
parent | 532271ba65c994ee8bc93752b515b8fc918b6ab5 (diff) | |
download | openttd-f2cda44d2e3c55069279ad3e03aeb5d2a7f0f35c.tar.xz |
(svn r7195) -Feature: [FS#297, optional elrails] New patches/vehicles option 'disable electrified railways'.
(original patch by maedhros, ideas: peter1138, Darkvater, Rubidium, Patrick, Eddi|zuHause, ..)
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r-- | tunnelbridge_cmd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index 17b803628..a1db8f866 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -772,6 +772,9 @@ int32 DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec) if (GetRailType(tile) == totype) return CMD_ERROR; + // 'hidden' elrails can't be downgraded to normal rail when elrails are disabled + if (_patches.disable_elrails && totype == RAILTYPE_RAIL && GetRailType(tile) == RAILTYPE_ELECTRIC) return CMD_ERROR; + endtile = CheckTunnelBusy(tile, &length); if (endtile == INVALID_TILE) return CMD_ERROR; |