equal
deleted
inserted
replaced
1356 // tile is not a railroad station? |
1356 // tile is not a railroad station? |
1357 if (!IsRailwayStation(tile)) return CMD_ERROR; |
1357 if (!IsRailwayStation(tile)) return CMD_ERROR; |
1358 |
1358 |
1359 if (GetRailType(tile) == totype) return CMD_ERROR; |
1359 if (GetRailType(tile) == totype) return CMD_ERROR; |
1360 |
1360 |
|
1361 // 'hidden' elrails can't be downgraded to normal rail when elrails are disabled |
|
1362 if (_patches.disable_elrails && totype == RAILTYPE_RAIL && GetRailType(tile) == RAILTYPE_ELECTRIC) return CMD_ERROR; |
|
1363 |
1361 if (exec) { |
1364 if (exec) { |
1362 SetRailType(tile, totype); |
1365 SetRailType(tile, totype); |
1363 MarkTileDirtyByTile(tile); |
1366 MarkTileDirtyByTile(tile); |
1364 YapfNotifyTrackLayoutChange(tile, GetRailStationTrack(tile)); |
1367 YapfNotifyTrackLayoutChange(tile, GetRailStationTrack(tile)); |
1365 } |
1368 } |