diff options
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r-- | src/industry_gui.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index b66d4f8bf..8bd4dc574 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -228,8 +228,7 @@ void CcBuildIndustry(Commands cmd, const CommandCost &result, TileIndex tile, co { if (result.Succeeded()) return; - auto [tile_, p1, p2, text] = EndianBufferReader::ToValue<CommandTraits<CMD_BUILD_INDUSTRY>::Args>(data); - uint8 indtype = GB(p1, 0, 8); + auto [tile_, indtype, first_layout, fund, seed] = EndianBufferReader::ToValue<CommandTraits<CMD_BUILD_INDUSTRY>::Args>(data); if (indtype < NUM_INDUSTRYTYPES) { const IndustrySpec *indsp = GetIndustrySpec(indtype); if (indsp->enabled) { @@ -679,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()) { - Command<CMD_BUILD_INDUSTRY>::Post(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY, 0, this->selected_type, InteractiveRandom(), {}); + Command<CMD_BUILD_INDUSTRY>::Post(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY, 0, this->selected_type, 0, false, InteractiveRandom()); this->HandleButtonClick(WID_DPI_FUND_WIDGET); } else { HandlePlacePushButton(this, WID_DPI_FUND_WIDGET, SPR_CURSOR_INDUSTRY, HT_RECT); @@ -716,13 +715,13 @@ public: Backup<bool> old_generating_world(_generating_world, true, FILE_LINE); _ignore_restrictions = true; - Command<CMD_BUILD_INDUSTRY>::Post(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY, &CcBuildIndustry, tile, (layout_index << 8) | this->selected_type, seed, {}); + Command<CMD_BUILD_INDUSTRY>::Post(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY, &CcBuildIndustry, tile, this->selected_type, layout_index, false, seed); cur_company.Restore(); old_generating_world.Restore(); _ignore_restrictions = false; } else { - success = Command<CMD_BUILD_INDUSTRY>::Post(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY, tile, (layout_index << 8) | this->selected_type, seed, {}); + success = Command<CMD_BUILD_INDUSTRY>::Post(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY, tile, this->selected_type, layout_index, false, seed); } /* If an industry has been built, just reset the cursor and the system */ |