There is a method Game::send_player_build_waterway(int32_t, Path&) that works just like for roads.
Waterways have a special placement rule: They can go along any edge which is located between two water triangles. They can therefore reach all fields with MOVECAPS_SWIM plus some other fields. Always use a CheckStepFerry when checking ferry or waterway paths.
There is a method Game::send_ player_ build_waterway( int32_t, Path&) that works just like for roads.
Waterways have a special placement rule: They can go along any edge which is located between two water triangles. They can therefore reach all fields with MOVECAPS_SWIM plus some other fields. Always use a CheckStepFerry when checking ferry or waterway paths.