1. Subtypes available to specific company at current date -> Company::avail_roadtype 2. Subtypes available to any company at current date FOR_ALL_ENGINES_OF_TYPE(e, VEH_ROAD) { /* Check if the subtype can be used in the current climate */ if (!HasBit(e->info.climates, _settings_game.game_creation.landscape)) continue; /* Check whether available for all potential companies */ if (e->company_available != (CompanyMask)-1) continue; RoadTypeIdentifier rtid = e->GetRoadType(); if (rtid.basetype != rt) continue; known_roadsubtypes |= GetRoadTypeInfo(rtid)->introduces_roadtypes; } /* Get the date introduced roadtypes as well. */ known_roadsubtypes = AddDateIntroducedRoadTypes(rt, known_roadsubtypes, _current_date); 3. Subtypes available to any company at any date FOR_ALL_ENGINES_OF_TYPE(e, VEH_ROAD) { /* Check if the subtype can be used in the current climate */ if (!HasBit(e->info.climates, _settings_game.game_creation.landscape)) continue; RoadTypeIdentifier rtid = e->GetRoadType(); if (rtid.basetype != rt) continue; known_roadsubtypes |= GetRoadTypeInfo(rtid)->introduces_roadtypes; } /* Get the date introduced roadtypes as well. */ known_roadsubtypes = AddDateIntroducedRoadTypes(rt, known_roadsubtypes, MAX_DAY);