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 4 commits into from Jun 30, 2019

Feature: Multi-tile docks. #7380

merged 4 commits into from Jun 30, 2019


Copy link

@PeterN 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 multi-tile-docks branch 3 times, most recently from 7a24412 to d7a47e8 Compare Mar 22, 2019
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 multi-tile-docks branch 2 times, most recently from f3bf3f4 to 57b6d6a Compare Apr 6, 2019
@PeterN PeterN marked this pull request as ready for review Apr 9, 2019
@PeterN PeterN force-pushed the multi-tile-docks branch 2 times, most recently from 9f89162 to 905960f Compare May 2, 2019
Copy link

andythenorth commented May 29, 2019

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

Copy link

@LordAro 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];
Copy link

@LordAro LordAro Jun 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why * 3 ?

@nielsmh nielsmh merged commit 0db31ae into OpenTTD:master Jun 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants