OpenTTD Source 20260206-master-g4d4e37dbf1
yapf_ship_regions.h File Reference

Implementation of YAPF for water regions, which are used for finding intermediate ship destinations. More...

#include "../../tile_type.h"
#include "../water_regions.h"

Go to the source code of this file.

Functions

std::vector< WaterRegionPatchDescYapfShipFindWaterRegionPath (const Ship *v, TileIndex start_tile, int max_returned_path_length)
 Finds a path at the water region level.

Detailed Description

Implementation of YAPF for water regions, which are used for finding intermediate ship destinations.

Definition in file yapf_ship_regions.h.

Function Documentation

◆ YapfShipFindWaterRegionPath()

std::vector< WaterRegionPatchDesc > YapfShipFindWaterRegionPath ( const Ship * v,
TileIndex start_tile,
int max_returned_path_length )

Finds a path at the water region level.

Note that the starting region is always included if the path was found.

Parameters
vThe ship to find a path for.
start_tileThe tile to start searching from.
max_returned_path_lengthThe maximum length of the path that will be returned.
Returns
A path of water region patches, or an empty vector if no path was found.

Definition at line 228 of file yapf_ship_regions.cpp.