void CloseBankruptCompanies(GameEntity company) { var profit = Economy.GetProfit(gameContext, company, true); Companies.Log(company, $"Company {company.company.Name} BANKRUPT"); Companies.Log(company, "Profit: " + profit.ToString()); // $"Economy: <color=green>Income</color> +{Format.MinifyMoney(income)}\n<color=red>Maintenance</color> - {maintenance.MinifyValues().ToString(true)}"); Companies.LogFinancialTransactions(company); foreach (var d in Companies.GetDaughters(company, gameContext)) { Companies.Log(company, $"* Daughter {d.company.Name} stats"); Companies.LogFinancialTransactions(d); } if (Companies.IsPlayerCompany(company)) { NotificationUtils.AddPopup(gameContext, new PopupMessageGameOver(company.company.Id)); } Companies.CloseCompany(gameContext, company, true); Companies.Log(company, $"Company {company.company.Name} CLOSED"); ScheduleUtils.TweakCampaignStats(gameContext, CampaignStat.Bankruptcies); }
public override void Execute() { Companies.CloseCompany(Q, Popup.companyId); NotificationUtils.ClosePopup(Q); Navigate(ScreenMode.GroupManagementScreen); }
void CloseBankruptCompanies(GameEntity company) { Debug.Log("Bankrupt: " + company.company.Name); if (Companies.IsPlayerCompany(gameContext, company)) { NotificationUtils.AddPopup(gameContext, new PopupMessageGameOver(company.company.Id)); } Companies.CloseCompany(gameContext, company); }
void CloseUnworthyProducts(GameEntity product) { var niche = Markets.Get(gameContext, product.product.Niche); bool isProfitable = Economy.IsProfitable(gameContext, product); bool isNicheDead = Markets.GetMarketState(niche) == MarketState.Death; if (isNicheDead && !isProfitable) { Companies.CloseCompany(gameContext, product); } }
public override void Execute() { var playerCompany = Companies.GetPlayerCompany(Q); var daughters = Companies.GetDaughters(playerCompany, Q); Navigate(ScreenMode.MarketExplorationScreen); for (var i = 0; i < daughters.Length; i++) { Companies.CloseCompany(Q, daughters[i], true); } Companies.SetResources(playerCompany, 0, "Bankruptcy"); //playerCompany.companyResource.Resources.Spend(playerCompany.companyResource.Resources); Teams.DismissTeam(playerCompany, Q); Debug.Log("Declared Bankruptcy"); NotificationUtils.ClosePopup(Q); }