Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Multi-tile docks. #7380

Merged
merged 4 commits into from Jun 30, 2019
Merged

Feature: Multi-tile docks. #7380

merged 4 commits into from Jun 30, 2019

Conversation

@PeterN
Copy link
Member

PeterN commented Mar 17, 2019

  • Multiple docks can be built in one station.
  • Any water tile adjacent to a dock can be used for docking, not just the tile at the end of the dock.
  • Any water tile surrounding an industry with a dock can be used for docking.

m1 bit 7 is (ab)used to mark docking tiles. These can be on MP_WATER, MP_RAILWAY (half-tile on water), MP_STATION (buoys) and MP_TUNNELBRIDGE (aqueduct ends)

@PeterN PeterN force-pushed the PeterN:multi-tile-docks branch 3 times, most recently from 7a24412 to d7a47e8 Mar 17, 2019
@PeterN

This comment has been minimized.

Copy link
Member Author

PeterN commented Mar 27, 2019

Found one issue, if there's a suitable tile behind the dock, ships could also dock there. This may be desirable in the future but is not for the current style of dock, I think.

@PeterN PeterN force-pushed the PeterN:multi-tile-docks branch from d7a47e8 to b77271b Mar 30, 2019
@PeterN PeterN force-pushed the PeterN:multi-tile-docks branch 2 times, most recently from f3bf3f4 to 57b6d6a Apr 6, 2019
@PeterN PeterN marked this pull request as ready for review Apr 9, 2019
@PeterN PeterN force-pushed the PeterN:multi-tile-docks branch from 57b6d6a to 4d6f241 Apr 10, 2019
@PeterN PeterN force-pushed the PeterN:multi-tile-docks branch 2 times, most recently from 9f89162 to 905960f Apr 29, 2019
@PeterN PeterN force-pushed the PeterN:multi-tile-docks branch from 905960f to 8a72ad7 May 6, 2019
@PeterN PeterN force-pushed the PeterN:multi-tile-docks branch from 8a72ad7 to 62e7d7d May 12, 2019
@andythenorth

This comment has been minimized.

Copy link
Contributor

andythenorth commented May 29, 2019

Testing this in a game currently. No issues so far.

Copy link
Member

LordAro left a comment

Sure, why not

/* Check docking tile for occupancy */
uint count = 1;
HasVehicleOnPos(current->tile, &count, &CountShipProc);
cost += count * 3 * _trackdir_length[trackdir];

This comment has been minimized.

Copy link
@LordAro

LordAro Jun 29, 2019

Member

why * 3 ?

@nielsmh nielsmh merged commit 0db31ae into OpenTTD:master Jun 30, 2019
8 checks passed
8 checks passed
OpenTTD CI Build #20190512.1 succeeded
Details
OpenTTD CI (Linux commit-checker) Linux commit-checker succeeded
Details
OpenTTD CI (Linux linux-amd64-clang-3.8) Linux linux-amd64-clang-3.8 succeeded
Details
OpenTTD CI (Linux linux-amd64-gcc-6) Linux linux-amd64-gcc-6 succeeded
Details
OpenTTD CI (Linux linux-i386-gcc-6) Linux linux-i386-gcc-6 succeeded
Details
OpenTTD CI (MacOS) MacOS succeeded
Details
OpenTTD CI (Windows Win32) Windows Win32 succeeded
Details
OpenTTD CI (Windows Win64) Windows Win64 succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.