src/industry_cmd.cpp
changeset 7989 2b4dc1946521
parent 7987 aa9239ef92f6
child 8030 135a60c84e95
equal deleted inserted replaced
7988:fa2cce262aa9 7989:2b4dc1946521
  1236 				refused_slope |= IsSlopeRefused(tileh, its->slopes_refused);
  1236 				refused_slope |= IsSlopeRefused(tileh, its->slopes_refused);
  1237 			}
  1237 			}
  1238 
  1238 
  1239 			if (ind_behav & (INDUSTRYBEH_ONLY_INTOWN | INDUSTRYBEH_TOWN1200_MORE)) {
  1239 			if (ind_behav & (INDUSTRYBEH_ONLY_INTOWN | INDUSTRYBEH_TOWN1200_MORE)) {
  1240 				if (!IsTileType(cur_tile, MP_HOUSE)) {
  1240 				if (!IsTileType(cur_tile, MP_HOUSE)) {
  1241 					_error_message = STR_INDUSTRY_MUST_BE_BUILT_ON_HOUSE;
  1241 					_error_message = STR_029D_CAN_ONLY_BE_BUILT_IN_TOWNS;
  1242 					return false;
  1242 					return false;
  1243 				}
  1243 				}
  1244 				if (CmdFailed(DoCommand(cur_tile, 0, 0, 0, CMD_LANDSCAPE_CLEAR))) return false;
  1244 				if (CmdFailed(DoCommand(cur_tile, 0, 0, 0, CMD_LANDSCAPE_CLEAR))) return false;
  1245 			} else if ((ind_behav & INDUSTRYBEH_ONLY_NEARTOWN) == 0 || !IsTileType(cur_tile, MP_HOUSE)) {
  1245 			} else if ((ind_behav & INDUSTRYBEH_ONLY_NEARTOWN) == 0 || !IsTileType(cur_tile, MP_HOUSE)) {
  1246 				if (CmdFailed(DoCommand(cur_tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR))) return false;
  1246 				if (CmdFailed(DoCommand(cur_tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR))) return false;