TBTR: Add 'all rail types' option to rail type dropdown, use by default

This commit is contained in:
Jonathan G Rennison
2018-05-25 19:16:37 +01:00
parent cecbf257bc
commit 45d2726379
2 changed files with 6 additions and 18 deletions

View File

@@ -225,6 +225,8 @@ TemplateVehicle* GetTemplateVehicleByGroupID(GroupID gid) {
*/
bool TemplateVehicleContainsEngineOfRailtype(const TemplateVehicle *tv, RailType type)
{
if (type == INVALID_RAILTYPE) return true;
/* For standard rail engines, allow only those */
if (type == RAILTYPE_BEGIN || type == RAILTYPE_RAIL) {
while (tv) {