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 29da3c76e..b66d4f8bf 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -219,17 +219,16 @@ void SortIndustryTypes() /** * Command callback. In case of failure to build an industry, show an error message. - * @param result Result of the command. * @param cmd Unused. + * @param result Result of the command. * @param tile Tile where the industry is placed. - * @param p1 Additional data of the #CMD_BUILD_INDUSTRY command. - * @param p2 Additional data of the #CMD_BUILD_INDUSTRY command. - * @param text Unused. + * @param data Additional data of the #CMD_BUILD_INDUSTRY command. */ -void CcBuildIndustry(const CommandCost &result, Commands cmd, TileIndex tile, uint32 p1, uint32 p2, const std::string &text) +void CcBuildIndustry(Commands cmd, const CommandCost &result, TileIndex tile, const CommandDataBuffer &data) { if (result.Succeeded()) return; + auto [tile_, p1, p2, text] = EndianBufferReader::ToValue<CommandTraits<CMD_BUILD_INDUSTRY>::Args>(data); uint8 indtype = GB(p1, 0, 8); if (indtype < NUM_INDUSTRYTYPES) { const IndustrySpec *indsp = GetIndustrySpec(indtype); |