equal
deleted
inserted
replaced
2565 r = DoCommandByTile(c, p->attr, 0, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_ROAD_DEPOT); |
2565 r = DoCommandByTile(c, p->attr, 0, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_ROAD_DEPOT); |
2566 goto clear_town_stuff; |
2566 goto clear_town_stuff; |
2567 } else if (p->mode == 1) { |
2567 } else if (p->mode == 1) { |
2568 if (_want_road_truck_station) { |
2568 if (_want_road_truck_station) { |
2569 // Truck station |
2569 // Truck station |
2570 r = DoCommandByTile(c, p->attr, 0, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_TRUCK_STATION); |
2570 r = DoCommandByTile(c, p->attr, RS_TRUCK, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_ROAD_STOP); |
2571 } else { |
2571 } else { |
2572 // Bus station |
2572 // Bus station |
2573 r = DoCommandByTile(c, p->attr, 0, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_BUS_STATION); |
2573 r = DoCommandByTile(c, p->attr, RS_BUS, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_ROAD_STOP); |
2574 } |
2574 } |
2575 clear_town_stuff:; |
2575 clear_town_stuff:; |
2576 |
2576 |
2577 if (r == CMD_ERROR) return CMD_ERROR; |
2577 if (r == CMD_ERROR) return CMD_ERROR; |
2578 total_cost += r; |
2578 total_cost += r; |
3625 |
3625 |
3626 // Go through all stations and delete those that aren't in use |
3626 // Go through all stations and delete those that aren't in use |
3627 used=in_use; |
3627 used=in_use; |
3628 FOR_ALL_STATIONS(st) { |
3628 FOR_ALL_STATIONS(st) { |
3629 if (st->xy != 0 && st->owner == _current_player && !*used && |
3629 if (st->xy != 0 && st->owner == _current_player && !*used && |
3630 ((tile = st->bus_tile) != 0 || |
3630 ( (st->bus_stops != NULL && (tile = st->bus_stops->xy) != 0) || |
3631 (tile = st->lorry_tile) != 0 || |
3631 (st->truck_stops != NULL && (tile = st->truck_stops->xy)) != 0 || |
3632 (tile = st->train_tile) != 0 || |
3632 (tile = st->train_tile) != 0 || |
3633 (tile = st->dock_tile) != 0 || |
3633 (tile = st->dock_tile) != 0 || |
3634 (tile = st->airport_tile) != 0)) { |
3634 (tile = st->airport_tile) != 0)) { |
3635 DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR); |
3635 DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR); |
3636 } |
3636 } |