|
@@ -54,14 +54,14 @@
|
|
|
}
|
|
|
|
|
|
/* static */ bool AISubsidy::SourceIsTown(SubsidyID subsidy_id)
|
|
|
{
|
|
|
if (!IsValidSubsidy(subsidy_id) || IsAwarded(subsidy_id)) return false;
|
|
|
|
|
|
return GetCargo(GetCargoType(subsidy_id))->town_effect == TE_PASSENGERS ||
|
|
|
GetCargo(GetCargoType(subsidy_id))->town_effect == TE_MAIL;
|
|
|
return CargoSpec::Get(GetCargoType(subsidy_id))->town_effect == TE_PASSENGERS ||
|
|
|
CargoSpec::Get(GetCargoType(subsidy_id))->town_effect == TE_MAIL;
|
|
|
}
|
|
|
|
|
|
/* static */ int32 AISubsidy::GetSource(SubsidyID subsidy_id)
|
|
|
{
|
|
|
if (!IsValidSubsidy(subsidy_id)) return INVALID_STATION;
|
|
|
|
|
@@ -69,13 +69,13 @@
|
|
|
}
|
|
|
|
|
|
/* static */ bool AISubsidy::DestinationIsTown(SubsidyID subsidy_id)
|
|
|
{
|
|
|
if (!IsValidSubsidy(subsidy_id) || IsAwarded(subsidy_id)) return false;
|
|
|
|
|
|
switch (GetCargo(GetCargoType(subsidy_id))->town_effect) {
|
|
|
switch (CargoSpec::Get(GetCargoType(subsidy_id))->town_effect) {
|
|
|
case TE_PASSENGERS:
|
|
|
case TE_MAIL:
|
|
|
case TE_GOODS:
|
|
|
case TE_FOOD:
|
|
|
return true;
|
|
|
default:
|