MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetEntryString

Method GetEntryString

src/station_gui.cpp:1709–1720  ·  view source on GitHub ↗

* Select the correct string for an entry referring to the specified station. * @param station Station the entry is showing cargo for. * @param here String to be shown if the entry refers to the same station as this station GUI belongs to. * @param other_station String to be shown if the entry refers to a specific other station. * @param any String to be shown if the entry refers to "any st

Source from the content-addressed store, hash-verified

1707 * @return One of the three given strings or STR_STATION_VIEW_RESERVED, depending on what station the entry refers to.
1708 */
1709 StringID GetEntryString(StationID station, StringID here, StringID other_station, StringID any) const
1710 {
1711 if (station == this->window_number) {
1712 return here;
1713 } else if (station == StationID::Invalid()) {
1714 return any;
1715 } else if (station == NEW_STATION) {
1716 return STR_STATION_VIEW_RESERVED;
1717 } else {
1718 return other_station;
1719 }
1720 }
1721
1722 StringID GetGroupingString(Grouping grouping, StationID station) const
1723 {

Callers 1

GetGroupingStringMethod · 0.95

Calls 1

InvalidFunction · 0.85

Tested by

no test coverage detected