Add vehicle function to get first vehicle in tile hash for tile

This commit is contained in:
Jonathan G Rennison
2024-06-27 22:00:27 +01:00
parent af11b76877
commit 4cb3b10f55
3 changed files with 33 additions and 0 deletions

View File

@@ -82,6 +82,8 @@ inline bool HasVehicleOnPos(TileIndex tile, VehicleType type, void *data, Vehicl
return VehicleFromPos(tile, type, data, proc, true) != nullptr;
}
Vehicle *GetFirstVehicleOnPos(TileIndex tile, VehicleType type);
/**
* Find a vehicle from a specific location. It will call proc for ALL vehicles
* on the tile and YOU must make SURE that the "best one" is stored in the