1
0
Fork 0

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

release/1.3
peter1138 2013-01-23 18:33:28 +00:00
parent f9e531d69c
commit eec1a0aa11
1 changed files with 2 additions and 0 deletions

View File

@ -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);