File diff r23952:2d92a4a7c152 → r23953:ba75d2f3b530
src/console_cmds.cpp
Show inline comments
 
@@ -1139,15 +1139,14 @@ DEF_CONSOLE_CMD(ConStartAI)
 
	if (!AI::CanStartNew()) {
 
		IConsoleWarning("Can't start a new AI.");
 
		return true;
 
	}
 

	
 
	int n = 0;
 
	Company *c;
 
	/* Find the next free slot */
 
	FOR_ALL_COMPANIES(c) {
 
	for (const Company *c : Company::Iterate()) {
 
		if (c->index != n) break;
 
		n++;
 
	}
 

	
 
	AIConfig *config = AIConfig::GetConfig((CompanyID)n);
 
	if (argc >= 2) {
 
@@ -1532,14 +1531,13 @@ DEF_CONSOLE_CMD(ConCompanies)
 
{
 
	if (argc == 0) {
 
		IConsoleHelp("List the details of all companies in the game. Usage 'companies'");
 
		return true;
 
	}
 

	
 
	Company *c;
 
	FOR_ALL_COMPANIES(c) {
 
	for (const Company *c : Company::Iterate()) {
 
		/* Grab the company name */
 
		char company_name[512];
 
		SetDParam(0, c->index);
 
		GetString(company_name, STR_COMPANY_NAME, lastof(company_name));
 

	
 
		const char *password_state = "";