MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / setFunds

Method setFunds

src/Savegame/SavedGame.cpp:629–640  ·  view source on GitHub ↗

* Changes the player's funds to a new value. * @param funds New funds. */

Source from the content-addressed store, hash-verified

627 * @param funds New funds.
628 */
629void 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.

Callers 12

stepMethod · 0.80
startItemMethod · 0.80
prepareDebriefingMethod · 0.80
viewClickMethod · 0.80
btnOkClickMethod · 0.80
btnOkClickMethod · 0.80
completeTransferMethod · 0.80
btnOkClickMethod · 0.80
btnOkClickMethod · 0.80
newSaveMethod · 0.80
btnOkClickMethod · 0.80
thinkMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected