(svn r17214) -Add [NoAI]: GetAPIVersion() as optional function in info.nut. Return "0.7" to get an api compatible (as much as possible) with the 0.7 api or "0.8" to get the latest api.
-Change [NoAI]: move all deprecated functions to a separate squirrel script that is only loaded if an AI requests an old API version.
This commit is contained in:
@@ -50,27 +50,6 @@
|
||||
return ::Subsidy::Get(subsidy_id)->cargo_type;
|
||||
}
|
||||
|
||||
/* static */ bool AISubsidy::SourceIsTown(SubsidyID subsidy_id)
|
||||
{
|
||||
AILog::Warning("AISubsidy::SourceIsTown is deprecated and will be removed soon, please use AISubsidy::GetSourceType instead.");
|
||||
if (!IsValidSubsidy(subsidy_id) || IsAwarded(subsidy_id)) return false;
|
||||
|
||||
return ::Subsidy::Get(subsidy_id)->src_type == ST_TOWN;
|
||||
}
|
||||
|
||||
/* static */ int32 AISubsidy::GetSource(SubsidyID subsidy_id)
|
||||
{
|
||||
AILog::Warning("AISubsidy::GetSource is deprecated and will be removed soon, please use AISubsidy::GetSourceIndex instead.");
|
||||
if (!IsValidSubsidy(subsidy_id)) return INVALID_STATION;
|
||||
|
||||
if (IsAwarded(subsidy_id)) {
|
||||
AILog::Error("AISubsidy::GetSource returned INVALID_STATION due to internal changes in the Subsidy logic.");
|
||||
return INVALID_STATION;
|
||||
}
|
||||
|
||||
return ::Subsidy::Get(subsidy_id)->src;
|
||||
}
|
||||
|
||||
/* static */ AISubsidy::SubsidyParticipantType AISubsidy::GetSourceType(SubsidyID subsidy_id)
|
||||
{
|
||||
if (!IsValidSubsidy(subsidy_id)) return SPT_INVALID;
|
||||
@@ -85,27 +64,6 @@
|
||||
return ::Subsidy::Get(subsidy_id)->src;
|
||||
}
|
||||
|
||||
/* static */ bool AISubsidy::DestinationIsTown(SubsidyID subsidy_id)
|
||||
{
|
||||
AILog::Warning("AISubsidy::DestinationIsTown is deprecated and will be removed soon, please use AISubsidy::GetDestinationType instead.");
|
||||
if (!IsValidSubsidy(subsidy_id) || IsAwarded(subsidy_id)) return false;
|
||||
|
||||
return ::Subsidy::Get(subsidy_id)->dst_type == ST_TOWN;
|
||||
}
|
||||
|
||||
/* static */ int32 AISubsidy::GetDestination(SubsidyID subsidy_id)
|
||||
{
|
||||
AILog::Warning("AISubsidy::GetDestination is deprecated and will be removed soon, please use AISubsidy::GetDestinationIndex instead.");
|
||||
if (!IsValidSubsidy(subsidy_id)) return INVALID_STATION;
|
||||
|
||||
if (IsAwarded(subsidy_id)) {
|
||||
AILog::Error("AISubsidy::GetDestination returned INVALID_STATION due to internal changes in the Subsidy logic.");
|
||||
return INVALID_STATION;
|
||||
}
|
||||
|
||||
return ::Subsidy::Get(subsidy_id)->dst;
|
||||
}
|
||||
|
||||
/* static */ AISubsidy::SubsidyParticipantType AISubsidy::GetDestinationType(SubsidyID subsidy_id)
|
||||
{
|
||||
if (!IsValidSubsidy(subsidy_id)) return SPT_INVALID;
|
||||
|
Reference in New Issue
Block a user