mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-06-23 05:29:49 +01:00
(svn r24936) -Fix [FS#5446]: Don't allow order refit to be set for no-load orders.
This commit is contained in:
parent
f9e531d69c
commit
eec1a0aa11
@ -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…
Reference in New Issue
Block a user