@@ -282,21 +282,25 @@
}
/* static */ void AI::Save(CompanyID company)
{
if (!_networking || _network_server) {
Company *c = Company::GetIfValid(company);
assert(c != nullptr && c->ai_instance != nullptr);
assert(c != nullptr);
/* When doing emergency saving, an AI can be not fully initialised. */
if (c->ai_instance != nullptr) {
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
c->ai_instance->Save();
cur_company.Restore();
} else {
return;
AIInstance::SaveEmpty();
/* static */ void AI::GetConsoleList(std::back_insert_iterator<std::string> &output_iterator, bool newest_only)
AI::scanner_info->GetConsoleList(output_iterator, newest_only);
Status change: