Fix #14631, Fix 1cb0cbcb6c: Waypoint customs spec not allocated properly on initial construction. (#14633)
Split AllocateSpecToStation/RoadStop into Allocate and Assign functions, allowing command tests to occur separately.
This commit is contained in:
@@ -136,7 +136,8 @@ void MoveWaypointsToBaseStations()
|
||||
SetRailStationReservation(tile, reserved);
|
||||
|
||||
if (wp.spec != nullptr) {
|
||||
auto specindex = AllocateSpecToStation(wp.spec, new_wp, true);
|
||||
auto specindex = AllocateSpecToStation(wp.spec, new_wp);
|
||||
if (specindex.has_value()) AssignSpecToStation(wp.spec, new_wp, *specindex);
|
||||
SetCustomStationSpecIndex(tile, specindex.value_or(0));
|
||||
}
|
||||
new_wp->rect.BeforeAddTile(tile, StationRect::ADD_FORCE);
|
||||
|
||||
Reference in New Issue
Block a user