From b9ad1d3082af2f07c53bec82eaa5079939fc1ea7 Mon Sep 17 00:00:00 2001 From: Martin Fournier Date: Fri, 7 Jan 2022 09:03:04 -0500 Subject: [PATCH] Apply export bonus when using options menu Also applies the bonus before saving the game instead of after --- src/ui/GameRoot.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx index 4c37690a7..2fe3afc86 100644 --- a/src/ui/GameRoot.tsx +++ b/src/ui/GameRoot.tsx @@ -389,7 +389,11 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme 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 ? ( { - saveObject.exportGame(); + // Apply the export bonus before saving the game onExport(player); + saveObject.exportGame(); }} installAugmentationsFn={() => { installAugmentations();