OpenTTD Source 20241224-master-gf74b0cf984
FindDepotData Struct Reference

Helper container to find a depot. More...

#include <pathfinder_type.h>

Public Member Functions

 FindDepotData (TileIndex tile=INVALID_TILE, uint best_length=UINT_MAX, bool reverse=false)
 Create an instance of this structure.
 

Data Fields

TileIndex tile
 The tile of the depot.
 
uint best_length
 The distance towards the depot in penalty, or UINT_MAX if not found.
 
bool reverse
 True if reversing is necessary for the train to get to this depot.
 

Detailed Description

Helper container to find a depot.

Definition at line 38 of file pathfinder_type.h.

Constructor & Destructor Documentation

◆ FindDepotData()

FindDepotData::FindDepotData ( TileIndex  tile = INVALID_TILE,
uint  best_length = UINT_MAX,
bool  reverse = false 
)
inline

Create an instance of this structure.

Parameters
tilethe tile of the depot
best_lengththe distance towards the depot, or UINT_MAX if not found
reversewhether we need to reverse first.

Definition at line 49 of file pathfinder_type.h.

Field Documentation

◆ best_length

uint FindDepotData::best_length

The distance towards the depot in penalty, or UINT_MAX if not found.

Definition at line 40 of file pathfinder_type.h.

Referenced by CheckIfTrainNeedsService(), RoadVehicle::FindClosestDepot(), and Train::FindClosestDepot().

◆ reverse

bool FindDepotData::reverse

True if reversing is necessary for the train to get to this depot.

Definition at line 41 of file pathfinder_type.h.

Referenced by Train::FindClosestDepot().

◆ tile

TileIndex FindDepotData::tile

The tile of the depot.

Definition at line 39 of file pathfinder_type.h.

Referenced by CheckIfTrainNeedsService(), RoadVehicle::FindClosestDepot(), and Train::FindClosestDepot().


The documentation for this struct was generated from the following file: