Don't use occupancy of unload and leave empty orders for occupancy average

This commit is contained in:
Jonathan G Rennison
2023-04-09 23:34:29 +01:00
parent c0f7ab8071
commit 359fe89d2f
4 changed files with 25 additions and 3 deletions

View File

@@ -2381,7 +2381,13 @@ public:
uint8 occupancy = order->GetOccupancy();
if (occupancy > 0) {
SetDParam(0, occupancy - 1);
DrawString(ir.left, ir.right, y, STR_ORDERS_OCCUPANCY_PERCENT, (i == this->selected_order) ? TC_WHITE : TC_BLACK);
TextColour colour;
if (order->UseOccupancyValueForAverage()) {
colour = (i == this->selected_order) ? TC_WHITE : TC_BLACK;
} else {
colour = ((i == this->selected_order) ? TC_SILVER : TC_GREY) | TC_NO_SHADE;
}
DrawString(ir.left, ir.right, y, STR_ORDERS_OCCUPANCY_PERCENT, colour);
}
y += line_height;