(svn r24936) -Fix [FS#5446]: Don't allow order refit to be set for no-load orders.

pull/155/head
peter1138 12 years ago
parent d30409c535
commit f0cf9952e5

@ -1613,6 +1613,8 @@ CommandCost CmdOrderRefit(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
/* Automatic refit cargo is only supported for goto station orders. */
if (cargo == CT_AUTO_REFIT && !order->IsType(OT_GOTO_STATION)) return CMD_ERROR;
if (order->GetLoadType() & OLFB_NO_LOAD) return CMD_ERROR;
if (flags & DC_EXEC) {
order->SetRefit(cargo, subtype);

Loading…
Cancel
Save