diff options
author | truebrain <truebrain@openttd.org> | 2011-11-23 16:05:19 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-11-23 16:05:19 +0000 |
commit | 229e572663158d8fd37cabf3c2a3cb06811ff0a1 (patch) | |
tree | e27f01fdf1de01262be29bb795b0be8d54b04f5e /src/ai/api/ai_cargo.cpp | |
parent | 4e09cde6495f35a6d56cacc0dbf636df7bc94dbd (diff) | |
download | openttd-229e572663158d8fd37cabf3c2a3cb06811ff0a1.tar.xz |
(svn r23298) -Add: track statistics of all incoming and outgoing goods. Incoming based on TownEffect, outgoing based on CargoType (based on patch by Terkhen)
Diffstat (limited to 'src/ai/api/ai_cargo.cpp')
-rw-r--r-- | src/ai/api/ai_cargo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ai/api/ai_cargo.cpp b/src/ai/api/ai_cargo.cpp index 1ff308c68..5c38c7107 100644 --- a/src/ai/api/ai_cargo.cpp +++ b/src/ai/api/ai_cargo.cpp @@ -20,6 +20,11 @@ return (cargo_type < NUM_CARGO && ::CargoSpec::Get(cargo_type)->IsValid()); } +/* static */ bool AICargo::IsValidTownEffect(TownEffect towneffect_type) +{ + return (towneffect_type >= TE_BEGIN && towneffect_type < TE_END); +} + /* static */ char *AICargo::GetCargoLabel(CargoID cargo_type) { if (!IsValidCargo(cargo_type)) return NULL; |