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

Function FormatCompanyManagerFaceCode

src/company_cmd.cpp:1479–1483  ·  view source on GitHub ↗

* Get a face code representation of a company manager face. * @param cmf The company manager face. * @return String containing face code. */

Source from the content-addressed store, hash-verified

1477 * @return String containing face code.
1478 */
1479std::string FormatCompanyManagerFaceCode(const CompanyManagerFace &cmf)
1480{
1481 uint32_t masked_face_bits = MaskCompanyManagerFaceBits(cmf, GetCompanyManagerFaceVars(cmf.style));
1482 return fmt::format("{}:{}", cmf.style_label, masked_face_bits);
1483}
1484
1485/**
1486 * Parse a face code into a company manager face.

Callers 1

OnClickMethod · 0.85

Calls 3

formatFunction · 0.50

Tested by

no test coverage detected