diff options
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r-- | src/newgrf_industrytiles.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index 3315de46e..ae5dca45c 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -303,20 +303,8 @@ CommandCost PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind if (callback_res != 0) return CommandCost(); return_cmd_error(STR_ERROR_SITE_UNSUITABLE); } - if (callback_res == 0x400) return CommandCost(); - - CommandCost res; - switch (callback_res) { - case 0x401: res = CommandCost(STR_ERROR_SITE_UNSUITABLE); break; - case 0x402: res = CommandCost(STR_ERROR_CAN_ONLY_BE_BUILT_IN_RAINFOREST); break; - case 0x403: res = CommandCost(STR_ERROR_CAN_ONLY_BE_BUILT_IN_DESERT); break; - default: res = CommandCost(GetGRFStringID(its->grf_prop.grffile->grfid, 0xD000 + callback_res)); break; - } - - /* Copy some parameters from the registers to the error message text ref. stack */ - res.UseTextRefStack(4); - return res; + return GetErrorMessageFromLocationCallbackResult(callback_res, its->grf_prop.grffile->grfid, STR_ERROR_SITE_UNSUITABLE); } /* Simple wrapper for GetHouseCallback to keep the animation unified. */ |