* Change the company manager's face. * @param flags operation to perform * @param style The style of the company manager face. * @param bits The bits of company manager face. * @return the cost of this operation or an error */
| 1055 | * @return the cost of this operation or an error |
| 1056 | */ |
| 1057 | CommandCost CmdSetCompanyManagerFace(DoCommandFlags flags, uint style, uint32_t bits) |
| 1058 | { |
| 1059 | CompanyManagerFace tmp_face{style, bits, {}}; |
| 1060 | if (!IsValidCompanyManagerFace(tmp_face)) return CMD_ERROR; |
| 1061 | |
| 1062 | if (flags.Test(DoCommandFlag::Execute)) { |
| 1063 | CompanyManagerFace &cmf = Company::Get(_current_company)->face; |
| 1064 | SetCompanyManagerFaceStyle(cmf, style); |
| 1065 | cmf.bits = tmp_face.bits; |
| 1066 | |
| 1067 | MarkWholeScreenDirty(); |
| 1068 | } |
| 1069 | return CommandCost(); |
| 1070 | } |
| 1071 | |
| 1072 | /** |
| 1073 | * Update liveries for a company. This is called when the LS_DEFAULT scheme is changed, to update schemes with colours |
nothing calls this directly
no test coverage detected