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

Method GetCargoTypes

src/graph_gui.cpp:1883–1891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1881 }
1882
1883 CargoTypes GetCargoTypes(WindowNumber window_number) const override
1884 {
1885 CargoTypes cargo_types{};
1886 const Town *t = Town::Get(window_number);
1887 for (const auto &s : t->supplied) {
1888 if (IsValidCargoType(s.cargo)) SetBit(cargo_types, s.cargo);
1889 }
1890 return cargo_types;
1891 }
1892
1893 CargoTypes &GetExcludedCargoTypes() const override
1894 {

Callers 1

InitializeWindowMethod · 0.45

Calls 2

IsValidCargoTypeFunction · 0.85
SetBitFunction · 0.85

Tested by

no test coverage detected