--- a/src/ai/api/ai_town.hpp Sun Jun 08 15:32:10 2008 +0000
+++ b/src/ai/api/ai_town.hpp Sun Jun 08 19:35:16 2008 +0000
@@ -69,6 +69,22 @@
};
/**
+ * Different ratings one could have in a town.
+ */
+ enum TownRating {
+ TOWN_RATING_NONE, ///< The company got no rating in the town.
+ TOWN_RATING_APPALLING, ///< The company got an appalling rating in the town .
+ TOWN_RATING_VERY_POOR, ///< The company got an very poor rating in the town.
+ TOWN_RATING_POOR, ///< The company got an poor rating in the town.
+ TOWN_RATING_MEDIOCRE, ///< The company got an mediocre rating in the town.
+ TOWN_RATING_GOOD, ///< The company got an good rating in the town.
+ TOWN_RATING_VERY_GOOD, ///< The company got an very good rating in the town.
+ TOWN_RATING_EXCELLENT, ///< The company got an excellent rating in the town.
+ TOWN_RATING_OUTSTANDING, ///< The company got an outstanding rating in the town.
+ INVALID_TOWN_RATING = -1, ///< The town rating for invalid towns/companies.
+ };
+
+ /**
* Gets the maximum town index; there are no valid towns with a higher index.
* @return The maximum town index.
* @post Return value is always non-negative.
@@ -245,6 +261,16 @@
* @return True if the action succeeded.
*/
static bool PerformTownAction(TownID town_id, TownAction town_action);
+
+ /**
+ * Get the rating of a company within a town.
+ * @param town_id The town to get the rating for.
+ * @param company_id The company to get the rating for.
+ * @pre IsValidTown(town_id).
+ * @pre AICompany.ResolveCompanyID(company) != AICompany::INVALID_COMPANY.
+ * @return The rating as shown to humans.
+ */
+ static TownRating GetRating(TownID town_id, AICompany::CompanyID company_id);
};
#endif /* AI_TOWN_HPP */