mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Fix: Picker window 'used' filter for rail waypoints
The first two field of struct PickerItem were not populated. These are required for set operations. StationUsesDefaultType always returned false for rail waypoints.
This commit is contained in:
parent
f72d8d0b48
commit
1133ce2432
@ -1151,7 +1151,7 @@ static void HandleStationPlacement(TileIndex start, TileIndex end)
|
||||
static bool StationUsesDefaultType(const BaseStation *bst)
|
||||
{
|
||||
for (TileIndex t : bst->train_station) {
|
||||
if (bst->TileBelongsToRailStation(t) && IsRailStation(t) && GetCustomStationSpecIndex(t) == 0) return true;
|
||||
if (bst->TileBelongsToRailStation(t) && HasStationRail(t) && GetCustomStationSpecIndex(t) == 0) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -2263,7 +2263,7 @@ public:
|
||||
}
|
||||
for (const auto &sm : wp->speclist) {
|
||||
if (sm.spec == nullptr) continue;
|
||||
items.insert({0, 0, sm.spec->class_index, sm.spec->index});
|
||||
items.insert({sm.grfid, sm.localidx, sm.spec->class_index, sm.spec->index});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user