summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_cargo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/api/ai_cargo.cpp')
-rw-r--r--src/ai/api/ai_cargo.cpp5
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;