| 223 | return UnitCommand{ unit, UnitCommandTypes::Cancel_Addon }; |
| 224 | } |
| 225 | UnitCommand UnitCommand::cancelTrain(Unit unit, int slot) |
| 226 | { |
| 227 | UnitCommand c{ unit, slot >= 0 ? UnitCommandTypes::Cancel_Train_Slot : UnitCommandTypes::Cancel_Train }; |
| 228 | c.extra = slot; |
| 229 | return c; |
| 230 | } |
| 231 | UnitCommand UnitCommand::cancelMorph(Unit unit) |
| 232 | { |
| 233 | return UnitCommand{ unit, UnitCommandTypes::Cancel_Morph }; |