|
@@ -44,12 +44,13 @@
|
|
|
#include "waypoint_base.h"
|
|
|
#include "economy_base.h"
|
|
|
#include "core/pool_func.hpp"
|
|
|
#include "newgrf.h"
|
|
|
#include "core/backup_type.hpp"
|
|
|
#include "water.h"
|
|
|
#include "game/game.hpp"
|
|
|
|
|
|
#include "table/strings.h"
|
|
|
#include "table/pricebase.h"
|
|
|
|
|
|
|
|
|
/* Initialize the cargo payment-pool */
|
|
@@ -533,12 +534,13 @@ static void CompanyCheckBankrupt(Company
|
|
|
cni->FillData(c);
|
|
|
SetDParam(0, STR_NEWS_COMPANY_IN_TROUBLE_TITLE);
|
|
|
SetDParam(1, STR_NEWS_COMPANY_IN_TROUBLE_DESCRIPTION);
|
|
|
SetDParamStr(2, cni->company_name);
|
|
|
AddCompanyNewsItem(STR_MESSAGE_NEWS_FORMAT, NS_COMPANY_TROUBLE, cni);
|
|
|
AI::BroadcastNewEvent(new ScriptEventCompanyInTrouble(c->index));
|
|
|
Game::NewEvent(new ScriptEventCompanyInTrouble(c->index));
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
case 3: {
|
|
|
/* Check if the company has any value.. if not, declare it bankrupt
|
|
|
* right now */
|
|
@@ -1641,12 +1643,13 @@ static void DoAcquireCompany(Company *c)
|
|
|
SetDParam(1, c->bankrupt_value == 0 ? STR_NEWS_MERGER_TAKEOVER_TITLE : STR_NEWS_COMPANY_MERGER_DESCRIPTION);
|
|
|
SetDParamStr(2, cni->company_name);
|
|
|
SetDParamStr(3, cni->other_company_name);
|
|
|
SetDParam(4, c->bankrupt_value);
|
|
|
AddCompanyNewsItem(STR_MESSAGE_NEWS_FORMAT, NS_COMPANY_MERGER, cni);
|
|
|
AI::BroadcastNewEvent(new ScriptEventCompanyMerger(ci, _current_company));
|
|
|
Game::NewEvent(new ScriptEventCompanyMerger(ci, _current_company));
|
|
|
|
|
|
ChangeOwnershipOfCompanyItems(ci, _current_company);
|
|
|
|
|
|
if (c->bankrupt_value == 0) {
|
|
|
Company *owner = Company::Get(_current_company);
|
|
|
owner->current_loan += c->current_loan;
|