| 131 | } |
| 132 | |
| 133 | static void TrainDepotMoveVehicle(const Vehicle *wagon, VehicleID sel, const Vehicle *head) |
| 134 | { |
| 135 | const Vehicle *v = Vehicle::Get(sel); |
| 136 | |
| 137 | if (v == wagon) return; |
| 138 | |
| 139 | if (wagon == nullptr) { |
| 140 | if (head != nullptr) wagon = head->Last(); |
| 141 | } else { |
| 142 | wagon = wagon->Previous(); |
| 143 | if (wagon == nullptr) return; |
| 144 | } |
| 145 | |
| 146 | if (wagon == v) return; |
| 147 | |
| 148 | Command<CMD_MOVE_RAIL_VEHICLE>::Post(STR_ERROR_CAN_T_MOVE_VEHICLE, v->tile, v->index, wagon == nullptr ? VehicleID::Invalid() : wagon->index, _ctrl_pressed); |
| 149 | } |
| 150 | |
| 151 | static VehicleCellSize _base_block_sizes_depot[VEH_COMPANY_END]; ///< Cell size for vehicle images in the depot view. |
| 152 | static VehicleCellSize _base_block_sizes_purchase[VEH_COMPANY_END]; ///< Cell size for vehicle images in the purchase list. |
no test coverage detected