# ai_company.hpp

Go to the documentation of this file.

    00001 /* $Id: ai_company.hpp 15520 2009-02-19 09:01:34Z yexo $ */
    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
    00037   static CompanyID ResolveCompanyID(CompanyID company);
    00038
    00044   static bool IsMine(CompanyID company);
    00045
    00054   static bool SetName(const char *name);
    00055
    00062   static char *GetName(CompanyID company);
    00063
    00071   static bool SetPresidentName(const char *name);
    00072
    00079   static char *GetPresidentName(CompanyID company);
    00080
    00090   static bool SetLoanAmount(int32 loan);
    00091
    00099   static bool SetMinimumLoanAmount(int32 loan);
    00100
    00107   static Money GetLoanAmount();
    00108
    00115   static Money GetMaxLoanAmount();
    00116
    00122   static Money GetLoanInterval();
    00123
    00130   static Money GetCompanyValue(CompanyID company);
    00131
    00138   static Money GetBankBalance(CompanyID company);
    00139
    00150   static bool BuildCompanyHQ(TileIndex tile);
    00151
    00158   static TileIndex GetCompanyHQ(CompanyID company);
    00159
    00165   static bool SetAutoRenewStatus(bool autorenew);
    00166
    00173   static bool GetAutoRenewStatus(CompanyID company);
    00174
    00180   static bool SetAutoRenewMonths(int16 months);
    00181
    00188   static int16 GetAutoRenewMonths(CompanyID company);
    00189
    00195   static bool SetAutoRenewMoney(uint32 money);
    00196
    00203   static uint32 GetAutoRenewMoney(CompanyID company);
    00204 };
    00205
    00206 DECLARE_POSTFIX_INCREMENT(AICompany::CompanyID);
    00207
    00208 #endif /* AI_COMPANY_HPP */