Codechange: strongly type VehicleID
This commit is contained in:
@@ -44,7 +44,7 @@ ScriptVehicleList_Station::ScriptVehicleList_Station(StationID station_id)
|
||||
FindVehiclesWithOrder(
|
||||
[is_deity, owner](const Vehicle *v) { return is_deity || v->owner == owner; },
|
||||
[station_id](const Order *order) { return (order->IsType(OT_GOTO_STATION) || order->IsType(OT_GOTO_WAYPOINT)) && order->GetDestination() == station_id; },
|
||||
[this](const Vehicle *v) { this->AddItem(v->index); }
|
||||
[this](const Vehicle *v) { this->AddItem(v->index.base()); }
|
||||
);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ ScriptVehicleList_Depot::ScriptVehicleList_Depot(TileIndex tile)
|
||||
FindVehiclesWithOrder(
|
||||
[is_deity, owner, type](const Vehicle *v) { return (is_deity || v->owner == owner) && v->type == type; },
|
||||
[dest](const Order *order) { return order->IsType(OT_GOTO_DEPOT) && order->GetDestination() == dest; },
|
||||
[this](const Vehicle *v) { this->AddItem(v->index); }
|
||||
[this](const Vehicle *v) { this->AddItem(v->index.base()); }
|
||||
);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ ScriptVehicleList_SharedOrders::ScriptVehicleList_SharedOrders(VehicleID vehicle
|
||||
if (!ScriptVehicle::IsPrimaryVehicle(vehicle_id)) return;
|
||||
|
||||
for (const Vehicle *v = Vehicle::Get(vehicle_id)->FirstShared(); v != nullptr; v = v->NextShared()) {
|
||||
this->AddItem(v->index);
|
||||
this->AddItem(v->index.base());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user