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:
@@ -44,7 +44,7 @@
|
||||
typedef std::vector<Train *> TrainList;
|
||||
|
||||
RailTypeInfo _railtypes[RAILTYPE_END];
|
||||
std::vector<RailType> _sorted_railtypes;
|
||||
std::vector<RailType> _sorted_railtypes; ///< Sorted list of rail types.
|
||||
RailTypes _railtypes_hidden_mask;
|
||||
|
||||
/** Enum holding the signal offset in the sprite sheet according to the side it is representing. */
|
||||
@@ -137,9 +137,8 @@ void InitRailTypes()
|
||||
|
||||
_sorted_railtypes.clear();
|
||||
for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) {
|
||||
if (_railtypes[rt].label != 0 && !HasBit(_railtypes_hidden_mask, rt)) {
|
||||
_sorted_railtypes.push_back(rt);
|
||||
}
|
||||
if (_railtypes[rt].label == 0) continue;
|
||||
_sorted_railtypes.push_back(rt);
|
||||
}
|
||||
std::sort(_sorted_railtypes.begin(), _sorted_railtypes.end(), CompareRailTypes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user