ai_company.hpp

Go to the documentation of this file.
00001 /* $Id: ai_company.hpp 17080 2009-08-05 23:57:41Z rubidium $ */
00002 
00005 #ifndef AI_COMPANY_HPP
00006 #define AI_COMPANY_HPP
00007 
00008 #include "ai_object.hpp"
00009 
00013 class AICompany : public AIObject {
00014 public:
00015   static const char *GetClassName() { return "AICompany"; }
00016 
00018   enum CompanyID {
00019     COMPANY_INVALID = -1, 
00020 
00021 #ifdef DEFINE_SCRIPT_FILES
00022     COMPANY_FIRST   = 0, 
00023     COMPANY_LAST    = ::MAX_COMPANIES, 
00024 #endif /* DEFINE_SCRIPT_FILES */
00025 
00026     COMPANY_SELF    = 254, 
00027   };
00028 
00030   enum Gender {
00031     GENDER_MALE,         
00032     GENDER_FEMALE,       
00033     GENDER_INVALID = -1, 
00034   };
00035 
00044   static CompanyID ResolveCompanyID(CompanyID company);
00045 
00051   static bool IsMine(CompanyID company);
00052 
00061   static bool SetName(const char *name);
00062 
00069   static char *GetName(CompanyID company);
00070 
00078   static bool SetPresidentName(const char *name);
00079 
00086   static char *GetPresidentName(CompanyID company);
00087 
00095   static bool SetPresidentGender(Gender gender);
00096 
00102   static Gender GetPresidentGender(CompanyID company);
00103 
00113   static bool SetLoanAmount(int32 loan);
00114 
00122   static bool SetMinimumLoanAmount(int32 loan);
00123 
00130   static Money GetLoanAmount();
00131 
00138   static Money GetMaxLoanAmount();
00139 
00145   static Money GetLoanInterval();
00146 
00153   static Money GetCompanyValue(CompanyID company);
00154 
00161   static Money GetBankBalance(CompanyID company);
00162 
00173   static bool BuildCompanyHQ(TileIndex tile);
00174 
00182   static TileIndex GetCompanyHQ(CompanyID company);
00183 
00189   static bool SetAutoRenewStatus(bool autorenew);
00190 
00197   static bool GetAutoRenewStatus(CompanyID company);
00198 
00204   static bool SetAutoRenewMonths(int16 months);
00205 
00212   static int16 GetAutoRenewMonths(CompanyID company);
00213 
00219   static bool SetAutoRenewMoney(uint32 money);
00220 
00227   static uint32 GetAutoRenewMoney(CompanyID company);
00228 };
00229 
00230 DECLARE_POSTFIX_INCREMENT(AICompany::CompanyID);
00231 
00232 #endif /* AI_COMPANY_HPP */

Generated on Thu Oct 1 11:03:11 2009 for OpenTTD by  doxygen 1.5.6