* Gives the player his monthly funds, taking in account * all maintenance and profit costs. */
| 698 | * all maintenance and profit costs. |
| 699 | */ |
| 700 | void SavedGame::monthlyFunding() |
| 701 | { |
| 702 | _funds.back() += getCountryFunding() - getBaseMaintenance(); |
| 703 | _funds.push_back(_funds.back()); |
| 704 | _maintenance.back() = getBaseMaintenance(); |
| 705 | _maintenance.push_back(0); |
| 706 | _incomes.push_back(getCountryFunding()); |
| 707 | _expenditures.push_back(getBaseMaintenance()); |
| 708 | _researchScores.push_back(0); |
| 709 | |
| 710 | if (_incomes.size() > 12) |
| 711 | _incomes.erase(_incomes.begin()); |
| 712 | if (_expenditures.size() > 12) |
| 713 | _expenditures.erase(_expenditures.begin()); |
| 714 | if (_researchScores.size() > 12) |
| 715 | _researchScores.erase(_researchScores.begin()); |
| 716 | if(_funds.size() > 12) |
| 717 | _funds.erase(_funds.begin()); |
| 718 | if(_maintenance.size() > 12) |
| 719 | _maintenance.erase(_maintenance.begin()); |
| 720 | } |
| 721 | |
| 722 | /** |
| 723 | * Returns the current time of the game. |