(svn r19701) -Fix [FS#3787]: Check for industry availability more thoroughly and cancel object placement when selecting not available industries.

This commit is contained in:
frosch
2010-04-23 21:47:03 +00:00
parent 7a56196d98
commit ca9a015984
3 changed files with 13 additions and 2 deletions

View File

@@ -1764,6 +1764,10 @@ CommandCost CmdBuildIndustry(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
return CMD_ERROR;
}
if (_game_mode != GM_EDITOR && !CheckIfCallBackAllowsAvailability(it, IACT_USERCREATION)) {
return CMD_ERROR;
}
Industry *ind = NULL;
if (_game_mode != GM_EDITOR && _settings_game.construction.raw_industry_construction == 2 && indspec->IsRawIndustry()) {
if (flags & DC_EXEC) {