1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 09:52:44 +01:00

Codechange: Use EnumBitSet for StationFacility.

This commit is contained in:
Peter Nelson
2025-02-12 19:42:26 +00:00
committed by Peter Nelson
parent 8d38308ebb
commit 75387b9e2b
39 changed files with 157 additions and 167 deletions

View File

@@ -776,7 +776,7 @@ static void ShipController(Ship *v)
Station *st = Station::Get(v->current_order.GetDestination().ToStationID());
if (st->docking_station.Contains(gp.new_tile) && IsShipDestinationTile(gp.new_tile, st->index)) {
v->last_station_visited = st->index;
if (st->facilities & FACIL_DOCK) { // ugly, ugly workaround for problem with ships able to drop off cargo at wrong stations
if (st->facilities.Test(StationFacility::Dock)) { // ugly, ugly workaround for problem with ships able to drop off cargo at wrong stations
ShipArrivesAt(v, st);
v->BeginLoading();
} else { // leave stations without docks right away