diff options
author | rubidium <rubidium@openttd.org> | 2009-02-21 21:38:46 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-02-21 21:38:46 +0000 |
commit | 49ab7c3b50b1fb050b39f685fa0248f179edbd46 (patch) | |
tree | bd6e98d536f3af86eeb6ff7ef8cae4ec6ebdd097 | |
parent | c50e837db89d5fbebcaf10c5932f9485c586e171 (diff) | |
download | openttd-49ab7c3b50b1fb050b39f685fa0248f179edbd46.tar.xz |
(svn r15550) -Fix [FS#2654]: bogus secondary error message when dynamiting industries/unmoveables; "X is in the way" isn't helpful at all in that case.
-rw-r--r-- | src/industry_cmd.cpp | 2 | ||||
-rw-r--r-- | src/unmovable_cmd.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index d1c215624..a8fe22914 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -423,7 +423,7 @@ static CommandCost ClearTile_Industry(TileIndex tile, DoCommandFlag flags) ((indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER) || HasBit(GetIndustryTileSpec(GetIndustryGfx(tile))->slopes_refused, 5)))) { SetDParam(0, indspec->name); - return_cmd_error(STR_4800_IN_THE_WAY); + return_cmd_error(flags & DC_AUTO ? STR_4800_IN_THE_WAY : INVALID_STRING_ID); } if (flags & DC_EXEC) { diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp index 4b7eea254..04be24e2d 100644 --- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -264,7 +264,7 @@ static CommandCost ClearTile_Unmovable(TileIndex tile, DoCommandFlag flags) if (_current_company == OWNER_WATER) { return DestroyCompanyHQ(GetTileOwner(tile), DC_EXEC); } else { - return_cmd_error(STR_5804_COMPANY_HEADQUARTERS_IN); + return_cmd_error(flags & DC_AUTO ? STR_5804_COMPANY_HEADQUARTERS_IN : INVALID_STRING_ID); } } @@ -274,7 +274,7 @@ static CommandCost ClearTile_Unmovable(TileIndex tile, DoCommandFlag flags) /* checks if you're allowed to remove unmovable things */ if (_game_mode != GM_EDITOR && _current_company != OWNER_WATER && ((flags & DC_AUTO || !_cheats.magic_bulldozer.value)) ) - return_cmd_error(STR_5800_OBJECT_IN_THE_WAY); + return_cmd_error(flags & DC_AUTO ? STR_5800_OBJECT_IN_THE_WAY : INVALID_STRING_ID); if (IsStatue(tile)) { if (flags & DC_AUTO) return_cmd_error(STR_5800_OBJECT_IN_THE_WAY); |