(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, ..)
This commit is contained in:
KUDr
2006-11-17 19:31:44 +00:00
parent 532271ba65
commit f2cda44d2e
39 changed files with 127 additions and 39 deletions

View File

@@ -1358,6 +1358,9 @@ int32 DoConvertStationRail(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;
if (exec) {
SetRailType(tile, totype);
MarkTileDirtyByTile(tile);