# ai_company.hpp

Go to the documentation of this file.

    00001 /* $Id: ai_company.hpp 15912 2009-04-01 14:24:54Z 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
    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
    00159   static TileIndex GetCompanyHQ(CompanyID company);
    00160
    00166   static bool SetAutoRenewStatus(bool autorenew);
    00167
    00174   static bool GetAutoRenewStatus(CompanyID company);
    00175
    00181   static bool SetAutoRenewMonths(int16 months);
    00182
    00189   static int16 GetAutoRenewMonths(CompanyID company);
    00190
    00196   static bool SetAutoRenewMoney(uint32 money);
    00197
    00204   static uint32 GetAutoRenewMoney(CompanyID company);
    00205 };
    00206
    00207 DECLARE_POSTFIX_INCREMENT(AICompany::CompanyID);
    00208
    00209 #endif /* AI_COMPANY_HPP */