#include "ai_vehiclelist_valuator.hpp"
#include "../../vehicle.h"
int32 AIVehicleListLocation::Valuate(int32 vehicle) const
{
if (!IsValidVehicleID(vehicle)) return 0;
return GetVehicle(vehicle)->tile;
}
int32 AIVehicleListEngineType::Valuate(int32 vehicle) const
{
if (!IsValidVehicleID(vehicle)) return 0;
return GetVehicle(vehicle)->engine_type;
}
int32 AIVehicleListUnitNumber::Valuate(int32 vehicle) const
{
if (!IsValidVehicleID(vehicle)) return 0;
return GetVehicle(vehicle)->unitnumber;
}
int32 AIVehicleListAge::Valuate(int32 vehicle) const
{
if (!IsValidVehicleID(vehicle)) return 0;
return GetVehicle(vehicle)->age;
}
int32 AIVehicleListMaxAge::Valuate(int32 vehicle) const
{
if (!IsValidVehicleID(vehicle)) return 0;
return GetVehicle(vehicle)->max_age;
}
int32 AIVehicleListAgeLeft::Valuate(int32 vehicle) const
{
if (!IsValidVehicleID(vehicle)) return 0;
return GetVehicle(vehicle)->max_age - GetVehicle(vehicle)->age;
}
int32 AIVehicleListProfitThisYear::Valuate(int32 vehicle) const
{
if (!IsValidVehicleID(vehicle)) return 0;
return GetVehicle(vehicle)->profit_this_year;
}
int32 AIVehicleListProfitLastYear::Valuate(int32 vehicle) const
{
if (!IsValidVehicleID(vehicle)) return 0;
return GetVehicle(vehicle)->profit_last_year;
}