Merge branch 'master' into jgrpp

Hostile takeover feature

# Conflicts:
#	src/company_base.h
#	src/company_cmd.cpp
#	src/company_gui.cpp
#	src/economy.cpp
#	src/script/api/script_event_types.cpp
This commit is contained in:
Jonathan G Rennison
2023-09-12 19:04:03 +01:00
6 changed files with 138 additions and 35 deletions

View File

@@ -767,7 +767,7 @@ static void HandleBankruptcyTakeover(Company *c)
AI::NewEvent(best->index, new ScriptEventCompanyAskMerger(c->index, c->bankrupt_value));
if (IsInteractiveCompany(best->index)) {
ShowBuyCompanyDialog(c->index);
ShowBuyCompanyDialog(c->index, false);
} else if ((!_networking || (_network_server && !NetworkCompanyHasClients(best->index))) && !best->is_ai) {
/* This company can never accept the offer as there are no clients connected, decline the offer on the company's behalf */
Backup<CompanyID> cur_company(_current_company, best->index, FILE_LINE);