Codechange: change DestinationID into class with conversion helpers

A DestinationID is either a DepotID or StationID, where the aircraft hangar
being conceptually a depot is actually a StationID. When making those types
stronger, a lot of casts would need to be added, but this shows the intent
much better.
This commit is contained in:
Rubidium
2025-02-02 21:48:07 +01:00
committed by rubidium42
parent 8ca03a3766
commit e937c4dcfd
23 changed files with 84 additions and 64 deletions
+1 -1
View File
@@ -734,7 +734,7 @@ static uint32_t VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *objec
case 0x08: break; // not implemented
case 0x09: break; // not implemented
case 0x0A: return v->current_order.MapOldOrder();
case 0x0B: return v->current_order.GetDestination();
case 0x0B: return v->current_order.GetDestination().value;
case 0x0C: return v->GetNumOrders();
case 0x0D: return v->cur_real_order_index;
case 0x0E: break; // not implemented