* Changes the player's funds to a new value. * @param funds New funds. */
| 627 | * @param funds New funds. |
| 628 | */ |
| 629 | void SavedGame::setFunds(int funds) |
| 630 | { |
| 631 | if (_funds.back() > funds) |
| 632 | { |
| 633 | _expenditures.back() += _funds.back() - funds; |
| 634 | } |
| 635 | else |
| 636 | { |
| 637 | _incomes.back() += funds - _funds.back(); |
| 638 | } |
| 639 | _funds.back() = funds; |
| 640 | } |
| 641 | |
| 642 | /** |
| 643 | * Returns the current longitude of the Geoscape globe. |
no outgoing calls
no test coverage detected