OpenTTD Source 20250205-master-gfd85ab1e2c
CargoFilterCriteria Namespace Reference

Special cargo filter criteria. More...

Variables

static constexpr CargoType CF_ANY = NUM_CARGO
 Show all items independent of carried cargo (i.e. no filtering)
 
static constexpr CargoType CF_NONE = NUM_CARGO + 1
 Show only items which do not carry cargo (e.g. train engines)
 
static constexpr CargoType CF_ENGINES = NUM_CARGO + 2
 Show only engines (for rail vehicles only)
 
static constexpr CargoType CF_FREIGHT = NUM_CARGO + 3
 Show only vehicles which carry any freight (non-passenger) cargo.
 
static constexpr CargoType CF_NO_RATING = NUM_CARGO + 4
 Show items with no rating (station list)
 
static constexpr CargoType CF_SELECT_ALL = NUM_CARGO + 5
 Select all items (station list)
 
static constexpr CargoType CF_EXPAND_LIST = NUM_CARGO + 6
 Expand list to show all items (station list)
 

Detailed Description

Special cargo filter criteria.

These are used by user interface code only and must not be assigned to any entity. Not all values are valid for every UI filter.

Variable Documentation

◆ CF_ANY

◆ CF_ENGINES

constexpr CargoType CargoFilterCriteria::CF_ENGINES = NUM_CARGO + 2
staticconstexpr

Show only engines (for rail vehicles only)

Definition at line 96 of file cargo_type.h.

Referenced by CargoAndEngineFilter().

◆ CF_EXPAND_LIST

constexpr CargoType CargoFilterCriteria::CF_EXPAND_LIST = NUM_CARGO + 6
staticconstexpr

Expand list to show all items (station list)

Definition at line 101 of file cargo_type.h.

Referenced by CompanyStationsWindow::OnDropdownSelect().

◆ CF_FREIGHT

constexpr CargoType CargoFilterCriteria::CF_FREIGHT = NUM_CARGO + 3
staticconstexpr

Show only vehicles which carry any freight (non-passenger) cargo.

Definition at line 97 of file cargo_type.h.

Referenced by BaseVehicleListWindow::BuildCargoDropDownList(), and CargoFilterSingle().

◆ CF_NO_RATING

constexpr CargoType CargoFilterCriteria::CF_NO_RATING = NUM_CARGO + 4
staticconstexpr

Show items with no rating (station list)

Definition at line 99 of file cargo_type.h.

Referenced by CompanyStationsWindow::OnDropdownSelect().

◆ CF_NONE

◆ CF_SELECT_ALL

constexpr CargoType CargoFilterCriteria::CF_SELECT_ALL = NUM_CARGO + 5
staticconstexpr

Select all items (station list)

Definition at line 100 of file cargo_type.h.

Referenced by CompanyStationsWindow::OnDropdownSelect().