15 #include "../../track_type.h" 16 #include "../../direction_type.h" 17 #include "../../vehicle_type.h" 18 #include "../pathfinder_type.h" FindDepotData NPFTrainFindNearestDepot(const Train *v, int max_penalty)
Used when user sends train to the nearest depot or if train needs servicing using NPF...
Track
These are used to specify a single track.
TrackBits
Bitfield corresponding to Track.
Buses, trucks and trams belong to this class.
Track NPFTrainChooseTrack(const Train *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, bool reserve_track, struct PBSTileInfo *target)
Finds the best path for given train using NPF.
Trackdir
Enumeration for tracks and directions.
DiagDirection
Enumeration for diagonal directions.
Trackdir NPFRoadVehicleChooseTrack(const RoadVehicle *v, TileIndex tile, DiagDirection enterdir, TrackdirBits trackdirs, bool &path_found)
Finds the best path for given road vehicle using NPF.
All ships have this type.
Track NPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found)
Finds the best path for given ship using NPF.
'Train' is either a loco or a wagon.
This struct contains information about the end of a reserved path.
bool NPFTrainFindNearestSafeTile(const Train *v, TileIndex tile, Trackdir td, bool override_railtype)
Try to extend the reserved path of a train to the nearest safe tile using NPF.
uint32 TileIndex
The index/ID of a Tile.
Helper container to find a depot.
bool NPFTrainCheckReverse(const Train *v)
Returns true if it is better to reverse the train before leaving station using NPF.
TrackdirBits
Enumeration of bitmasks for the TrackDirs.
bool NPFShipCheckReverse(const Ship *v)
Returns true if it is better to reverse the ship before leaving depot using NPF.
FindDepotData NPFRoadVehicleFindNearestDepot(const RoadVehicle *v, int max_penalty)
Used when user sends road vehicle to the nearest depot or if road vehicle needs servicing using NPF...