Apply export bonus when using options menu

Also applies the bonus before saving the game instead of after
This commit is contained in:
Martin Fournier 2022-01-07 09:03:04 -05:00
parent 3562671772
commit b9ad1d3082

@ -389,7 +389,11 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
<GameOptionsRoot
player={player}
save={() => saveObject.saveGame()}
export={() => saveObject.exportGame()}
export={() => {
// Apply the export bonus before saving the game
onExport(player);
saveObject.exportGame()
}}
forceKill={killAllScripts}
softReset={() => {
dialogBoxCreate("Soft Reset!");
@ -400,8 +404,9 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
) : page === Page.Augmentations ? (
<AugmentationsRoot
exportGameFn={() => {
saveObject.exportGame();
// Apply the export bonus before saving the game
onExport(player);
saveObject.exportGame();
}}
installAugmentationsFn={() => {
installAugmentations();