Changeset - r11197:f993c6adbf59
[Not reviewed]
master
0 2 0
rubidium - 15 years ago 2009-02-21 21:38:46
rubidium@openttd.org
(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.
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -420,13 +420,13 @@ static CommandCost ClearTile_Industry(Ti
 
			!_cheats.magic_bulldozer.value) ||
 
			((flags & DC_AUTO) != 0) ||
 
			(_current_company == OWNER_WATER &&
 
				((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) {
 
		AI::BroadcastNewEvent(new AIEventIndustryClose(i->index));
 
		delete i;
 
	}
src/unmovable_cmd.cpp
Show inline comments
 
@@ -261,23 +261,23 @@ static Foundation GetFoundation_Unmovabl
 
static CommandCost ClearTile_Unmovable(TileIndex tile, DoCommandFlag flags)
 
{
 
	if (IsCompanyHQ(tile)) {
 
		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);
 
		}
 
	}
 

	
 
	if (IsOwnedLand(tile)) {
 
		return DoCommand(tile, 0, 0, flags, CMD_SELL_LAND_AREA);
 
	}
 

	
 
	/* 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);
 

	
 
		TownID town = GetStatueTownID(tile);
 
		ClrBit(GetTown(town)->statues, GetTileOwner(tile));
0 comments (0 inline, 0 general)