@@ -1383,19 +1383,21 @@ CommandCost CmdSellRailWagon(DoCommandFl
if (ret.Failed()) {
/* Restore the train we had. */
RestoreTrainBackup(original);
return ret;
}
if (first->orders.list == NULL && !OrderList::CanAllocateItem()) {
return_cmd_error(STR_ERROR_NO_MORE_SPACE_FOR_ORDERS);
CommandCost cost(EXPENSES_NEW_VEHICLES);
for (Train *t = sell_head; t != NULL; t = t->Next()) cost.AddCost(-t->value);
/* do it? */
if (flags & DC_EXEC) {
/* First normalise the sub types of the chain. */
NormaliseSubtypes(new_head);
if (v == first && v->IsEngine() && !sell_chain && new_head != NULL && new_head->IsFrontEngine()) {
Status change: