Codechange: Redefine some cargo-related values in terms of CargoID instead of CargoType.
Values used as special filter types are now defined as offsets from NUM_CARGO instead of confusingly reusing CARGO_NO_REFIT/CARGO_AUTO_REFIT types.
This commit is contained in:

committed by
Peter Nelson

parent
952d111b94
commit
400ae65ff2
@@ -749,10 +749,10 @@ private:
|
||||
{
|
||||
if (_ctrl_pressed) {
|
||||
/* Cancel refitting */
|
||||
Command<CMD_ORDER_REFIT>::Post(this->vehicle->tile, this->vehicle->index, this->OrderGetSel(), CT_NO_REFIT);
|
||||
Command<CMD_ORDER_REFIT>::Post(this->vehicle->tile, this->vehicle->index, this->OrderGetSel(), CARGO_NO_REFIT);
|
||||
} else {
|
||||
if (i == 1) { // Auto-refit to available cargo type.
|
||||
Command<CMD_ORDER_REFIT>::Post(this->vehicle->tile, this->vehicle->index, this->OrderGetSel(), CT_AUTO_REFIT);
|
||||
Command<CMD_ORDER_REFIT>::Post(this->vehicle->tile, this->vehicle->index, this->OrderGetSel(), CARGO_AUTO_REFIT);
|
||||
} else {
|
||||
ShowVehicleRefitWindow(this->vehicle, this->OrderGetSel(), this, auto_refit);
|
||||
}
|
||||
|
Reference in New Issue
Block a user