OpenTTD Source 20260311-master-g511d3794ce
StationNameInformation Struct Reference

Information to handle station action 0 property 24 correctly. More...

Public Member Functions

bool IsAvailable (StringID str) const
 Is the given station name available, and not already used?
void SetUsed (StringID str)
 Mark the given station name as used.

Data Fields

std::bitset< STR_SV_STNAME_FALLBACK - STR_SV_STNAME > used_names
 Used default station suffixes.
std::bitset< NUM_INDUSTRYTYPESindtypes
 Bit set indicating when an industry type has been found.

Detailed Description

Information to handle station action 0 property 24 correctly.

Definition at line 229 of file station_cmd.cpp.

Member Function Documentation

◆ IsAvailable()

bool StationNameInformation::IsAvailable ( StringID str) const
inline

Is the given station name available, and not already used?

Parameters
strThe station name to check.
Returns
true iff the name has not been used and is available.

Definition at line 238 of file station_cmd.cpp.

References IsInsideMM().

Referenced by GenerateStationName().

◆ SetUsed()

void StationNameInformation::SetUsed ( StringID str)
inline

Mark the given station name as used.

Parameters
strThe station name to mark used.

Definition at line 248 of file station_cmd.cpp.

References IsInsideMM().

Referenced by GenerateStationName().

Field Documentation

◆ indtypes

std::bitset<NUM_INDUSTRYTYPES> StationNameInformation::indtypes

Bit set indicating when an industry type has been found.

Definition at line 231 of file station_cmd.cpp.

Referenced by GenerateStationName().

◆ used_names

std::bitset<STR_SV_STNAME_FALLBACK - STR_SV_STNAME> StationNameInformation::used_names

Used default station suffixes.

Definition at line 230 of file station_cmd.cpp.


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