src/ai/api/ai_company.cpp
branchnoai
changeset 9486 a9b5f6b8667c
parent 9462 a4f49aab1367
child 9575 a4b6bbfa6c96
equal deleted inserted replaced
9485:df09b849ca60 9486:a9b5f6b8667c
    11 bool AICompany::SetCompanyName(const char *name)
    11 bool AICompany::SetCompanyName(const char *name)
    12 {
    12 {
    13 	if (name == NULL) return false;
    13 	if (name == NULL) return false;
    14 
    14 
    15 	_cmd_text = name;
    15 	_cmd_text = name;
    16 	return this->DoCommand(0, 0, 0, DC_EXEC, CMD_CHANGE_PRESIDENT_NAME);
    16 	return this->DoCommand(0, 0, 0, CMD_CHANGE_PRESIDENT_NAME);
    17 }
    17 }
    18 
    18 
    19 char *AICompany::GetCompanyName()
    19 char *AICompany::GetCompanyName()
    20 {
    20 {
    21 	static const int len = 64;
    21 	static const int len = 64;
    60 	}
    60 	}
    61 
    61 
    62 	if (loan == this->GetLoanAmount()) return true;
    62 	if (loan == this->GetLoanAmount()) return true;
    63 
    63 
    64 	return this->DoCommand(0,
    64 	return this->DoCommand(0,
    65 			abs(loan - this->GetLoanAmount()), 2, DC_EXEC,
    65 			abs(loan - this->GetLoanAmount()), 2,
    66 			(loan > this->GetLoanAmount()) ? CMD_INCREASE_LOAN : CMD_DECREASE_LOAN);
    66 			(loan > this->GetLoanAmount()) ? CMD_INCREASE_LOAN : CMD_DECREASE_LOAN);
    67 }
    67 }