Fix: Autoreplace rail/road list only listed buildable types. (#13887)
Instead list all possible types which includes hidden types compatible with buildable types.
This commit is contained in:
@@ -1779,6 +1779,7 @@ DropDownList GetRoadTypeDropDownList(RoadTramTypes rtts, bool for_replacement, b
|
||||
Dimension d = { 0, 0 };
|
||||
/* Get largest icon size, to ensure text is aligned on each menu item. */
|
||||
if (!for_replacement) {
|
||||
used_roadtypes &= ~_roadtypes_hidden_mask;
|
||||
for (const auto &rt : _sorted_roadtypes) {
|
||||
if (!HasBit(used_roadtypes, rt)) continue;
|
||||
const RoadTypeInfo *rti = GetRoadTypeInfo(rt);
|
||||
@@ -1820,6 +1821,7 @@ DropDownList GetScenRoadTypeDropDownList(RoadTramTypes rtts)
|
||||
RoadTypes used_roadtypes = GetRoadTypes(true);
|
||||
|
||||
/* Filter listed road types */
|
||||
used_roadtypes &= ~_roadtypes_hidden_mask;
|
||||
if (!HasBit(rtts, RTT_ROAD)) used_roadtypes &= _roadtypes_type;
|
||||
if (!HasBit(rtts, RTT_TRAM)) used_roadtypes &= ~_roadtypes_type;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user