Feature: Add NotRoadTypes (NRT)
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "articulated_vehicles.h"
|
||||
#include "core/random_func.hpp"
|
||||
#include "vehiclelist.h"
|
||||
#include "road.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -74,6 +75,9 @@ bool CheckAutoreplaceValidity(EngineID from, EngineID to, CompanyID company)
|
||||
}
|
||||
|
||||
case VEH_ROAD:
|
||||
/* make sure the roadtypes are compatible */
|
||||
if ((GetRoadTypeInfo(e_from->u.road.roadtype)->powered_roadtypes & GetRoadTypeInfo(e_to->u.road.roadtype)->powered_roadtypes) == ROADTYPES_NONE) return false;
|
||||
|
||||
/* make sure that we do not replace a tram with a normal road vehicles or vice versa */
|
||||
if (HasBit(e_from->info.misc_flags, EF_ROAD_TRAM) != HasBit(e_to->info.misc_flags, EF_ROAD_TRAM)) return false;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user