diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-10-03 21:13:32 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | a38bbefe1b28ac59b2a9fef45765fa3890cde32e (patch) | |
tree | 8d842f88a25db5ce231ce5bdb0d39914b7e2ed70 /src/industry_gui.cpp | |
parent | 549caca39cebc8c988f4e51d79d353cab4646d58 (diff) | |
download | openttd-a38bbefe1b28ac59b2a9fef45765fa3890cde32e.tar.xz |
Codechange: Untangle command code, flags and error string for DoCommand*.
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r-- | src/industry_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index e78b6853d..cfdd2c6ca 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -224,7 +224,7 @@ void SortIndustryTypes() * @param p2 Additional data of the #CMD_BUILD_INDUSTRY command. * @param cmd Unused. */ -void CcBuildIndustry(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd) +void CcBuildIndustry(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, Commands cmd) { if (result.Succeeded()) return; @@ -678,7 +678,7 @@ public: case WID_DPI_FUND_WIDGET: { if (this->selected_type != INVALID_INDUSTRYTYPE) { if (_game_mode != GM_EDITOR && _settings_game.construction.raw_industry_construction == 2 && GetIndustrySpec(this->selected_type)->IsRawIndustry()) { - DoCommandP(CMD_BUILD_INDUSTRY | CMD_MSG(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY), 0, this->selected_type, InteractiveRandom()); + DoCommandP(CMD_BUILD_INDUSTRY, STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY, 0, this->selected_type, InteractiveRandom()); this->HandleButtonClick(WID_DPI_FUND_WIDGET); } else { HandlePlacePushButton(this, WID_DPI_FUND_WIDGET, SPR_CURSOR_INDUSTRY, HT_RECT); @@ -715,13 +715,13 @@ public: Backup<bool> old_generating_world(_generating_world, true, FILE_LINE); _ignore_restrictions = true; - DoCommandP(CMD_BUILD_INDUSTRY | CMD_MSG(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY), &CcBuildIndustry, tile, (layout_index << 8) | this->selected_type, seed); + DoCommandP(CMD_BUILD_INDUSTRY, STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY, &CcBuildIndustry, tile, (layout_index << 8) | this->selected_type, seed); cur_company.Restore(); old_generating_world.Restore(); _ignore_restrictions = false; } else { - success = DoCommandP(CMD_BUILD_INDUSTRY | CMD_MSG(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY), tile, (layout_index << 8) | this->selected_type, seed); + success = DoCommandP(CMD_BUILD_INDUSTRY, STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY, tile, (layout_index << 8) | this->selected_type, seed); } /* If an industry has been built, just reset the cursor and the system */ |