Codechange: Use enum class and EnumBitSet for various order flags. (#14783)

This commit is contained in:
Peter Nelson
2025-12-06 12:29:11 +00:00
committed by dP
parent c26a9827b8
commit ab20a16ed2
20 changed files with 362 additions and 344 deletions
+1 -1
View File
@@ -233,7 +233,7 @@ CommandCost CmdClearOrderBackup(DoCommandFlags flags, TileIndex tile, ClientID u
for (OrderBackup *ob : OrderBackup::Iterate()) {
for (Order &order : ob->orders) {
OrderType ot = order.GetType();
if (ot == OT_GOTO_DEPOT && (order.GetDepotActionType() & ODATFB_NEAREST_DEPOT) != 0) continue;
if (ot == OT_GOTO_DEPOT && order.GetDepotActionType().Test(OrderDepotActionFlag::NearestDepot)) continue;
if (ot == OT_GOTO_DEPOT && hangar && !IsHangarTile(ob->tile)) continue; // Not an aircraft? Can't have a hangar order.
if (ot == OT_IMPLICIT || (IsHangarTile(ob->tile) && ot == OT_GOTO_DEPOT && !hangar)) ot = OT_GOTO_STATION;
if (ot == type && order.GetDestination() == destination) {