diff options
author | yexo <yexo@openttd.org> | 2009-08-18 18:51:42 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-08-18 18:51:42 +0000 |
commit | 67106dc0633c50ef6545d0ab6253384b276ab40e (patch) | |
tree | 09964556afb30a650b4549b0a919ba38230e363a /src/ai/api/ai_subsidy.cpp | |
parent | 58a0ff945c4025e20e30868c8774c8528909600c (diff) | |
download | openttd-67106dc0633c50ef6545d0ab6253384b276ab40e.tar.xz |
(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.
Diffstat (limited to 'src/ai/api/ai_subsidy.cpp')
-rw-r--r-- | src/ai/api/ai_subsidy.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/ai/api/ai_subsidy.cpp b/src/ai/api/ai_subsidy.cpp index df6889ac7..3a0629c77 100644 --- a/src/ai/api/ai_subsidy.cpp +++ b/src/ai/api/ai_subsidy.cpp @@ -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; |