industry_cmd.c
changeset 2868 9678db2d90e8
parent 2817 cdf488223c23
child 2952 58522ed8f0f1
equal deleted inserted replaced
2867:91ee491df4ec 2868:9678db2d90e8
  1168 /* Oil Rig and Oil Refinery */
  1168 /* Oil Rig and Oil Refinery */
  1169 static bool CheckNewIndustry_Oil(TileIndex tile, int type)
  1169 static bool CheckNewIndustry_Oil(TileIndex tile, int type)
  1170 {
  1170 {
  1171 	if (_game_mode == GM_EDITOR && _ignore_restrictions) return true;
  1171 	if (_game_mode == GM_EDITOR && _ignore_restrictions) return true;
  1172 	if (_game_mode == GM_EDITOR && type != IT_OIL_RIG)   return true;
  1172 	if (_game_mode == GM_EDITOR && type != IT_OIL_RIG)   return true;
  1173 	if (DistanceFromEdge(TILE_ADDXY(tile, 1, 1)) < 16)   return true;
  1173 	if ((type != IT_OIL_RIG || TileHeight(tile) == 0) &&
       
  1174 			DistanceFromEdge(TILE_ADDXY(tile, 1, 1)) < 16)   return true;
  1174 
  1175 
  1175 	_error_message = STR_483B_CAN_ONLY_BE_POSITIONED;
  1176 	_error_message = STR_483B_CAN_ONLY_BE_POSITIONED;
  1176 	return false;
  1177 	return false;
  1177 }
  1178 }
  1178 
  1179