--- a/src/ai/api/ai_cargo.hpp Wed Jun 04 22:34:45 2008 +0000
+++ b/src/ai/api/ai_cargo.hpp Wed Jun 04 22:57:17 2008 +0000
@@ -31,6 +31,18 @@
};
/**
+ * The effects a cargo can have on a town.
+ */
+ enum TownEffect {
+ TE_NONE = 0, ///< This cargo has no effect on a town
+ TE_PASSENGERS = 1, ///< This cargo supplies passengers to a town
+ TE_MAIL = 2, ///< This cargo supplies mail to a town
+ TE_GOODS = 3, ///< This cargo supplies goods to a town
+ TE_WATER = 4, ///< This cargo supplies water to a town
+ TE_FOOD = 5, ///< This cargo supplies food to a town
+ };
+
+ /**
* Checks whether the given cargo type is valid.
* @param cargo_type The cargo to check.
* @return True if and only if the cargo type is valid.
@@ -62,6 +74,13 @@
static bool HasCargoClass(CargoID cargo_type, CargoClass cargo_class);
/**
+ * Get the effect this cargo has on a town.
+ * @param cargo_type The cargo to check on.
+ * @return The effect this cargo has on a town, or TE_NONE if it has no effect.
+ */
+ static TownEffect GetTownEffect(CargoID cargo_type);
+
+ /**
* Get the income for transporting a piece of cargo over the
* given distance within the specified time.
* @param cargo_type The cargo to transport.