equal
deleted
inserted
replaced
145 } |
145 } |
146 } |
146 } |
147 |
147 |
148 static void PlaceRail_Station(TileIndex tile) |
148 static void PlaceRail_Station(TileIndex tile) |
149 { |
149 { |
150 if (_remove_button_clicked) |
150 if (_remove_button_clicked) { |
151 DoCommandP(tile, 0, 0, CcPlaySound1E, CMD_REMOVE_FROM_RAILROAD_STATION | CMD_MSG(STR_CANT_REMOVE_PART_OF_STATION)); |
151 DoCommandP(tile, 0, 0, CcPlaySound1E, CMD_REMOVE_FROM_RAILROAD_STATION | CMD_MSG(STR_CANT_REMOVE_PART_OF_STATION)); |
152 else if (_railstation.dragdrop) { |
152 } else if (_railstation.dragdrop) { |
153 VpStartPlaceSizing(tile, VPM_X_AND_Y_LIMITED); |
153 VpStartPlaceSizing(tile, VPM_X_AND_Y_LIMITED); |
154 VpSetPlaceSizingLimit(_patches.station_spread); |
154 VpSetPlaceSizingLimit(_patches.station_spread); |
155 } else { |
155 } else { |
156 DoCommandP(tile, |
156 DoCommandP(tile, |
157 _railstation.orientation | (_railstation.numtracks << 8) | (_railstation.platlength << 16), |
157 _railstation.orientation | (_railstation.numtracks << 8) | (_railstation.platlength << 16), |
468 |
468 |
469 if ((e->place.userdata >> 4) == GUI_PlaceProc_ConvertRailArea >> 4) |
469 if ((e->place.userdata >> 4) == GUI_PlaceProc_ConvertRailArea >> 4) |
470 DoCommandP(end_tile, start_tile, _cur_railtype, CcPlaySound10, CMD_CONVERT_RAIL | CMD_MSG(STR_CANT_CONVERT_RAIL)); |
470 DoCommandP(end_tile, start_tile, _cur_railtype, CcPlaySound10, CMD_CONVERT_RAIL | CMD_MSG(STR_CANT_CONVERT_RAIL)); |
471 } else if (e->place.userdata == VPM_X_AND_Y_LIMITED) { |
471 } else if (e->place.userdata == VPM_X_AND_Y_LIMITED) { |
472 HandleStationPlacement(start_tile, end_tile); |
472 HandleStationPlacement(start_tile, end_tile); |
473 } else |
473 } else { |
474 DoRailroadTrack(e->place.userdata & 1); |
474 DoRailroadTrack(e->place.userdata & 1); |
|
475 } |
475 } |
476 } |
476 break; |
477 break; |
477 |
478 |
478 case WE_ABORT_PLACE_OBJ: |
479 case WE_ABORT_PLACE_OBJ: |
479 UnclickWindowButtons(w); |
480 UnclickWindowButtons(w); |