diff options
author | Max-001 <maxsmits21@kpnmail.nl> | 2025-01-10 14:44:57 +0100 |
---|---|---|
committer | Max-001 <maxsmits21@kpnmail.nl> | 2025-01-10 14:44:57 +0100 |
commit | 433c840c14782d84b4b95265b3e6f7a1f67ade3b (patch) | |
tree | 3c6cfd65f07163eedd9fdb28420b13cff1874d35 /game/menus/shop/ButtonBuySelectBubbleScript.cpp | |
parent | 5203994b55aa51d5034c30001e0dac66efe2f14b (diff) |
Make format
Diffstat (limited to 'game/menus/shop/ButtonBuySelectBubbleScript.cpp')
-rw-r--r-- | game/menus/shop/ButtonBuySelectBubbleScript.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/game/menus/shop/ButtonBuySelectBubbleScript.cpp b/game/menus/shop/ButtonBuySelectBubbleScript.cpp index 21dbe1a..741afde 100644 --- a/game/menus/shop/ButtonBuySelectBubbleScript.cpp +++ b/game/menus/shop/ButtonBuySelectBubbleScript.cpp @@ -17,19 +17,17 @@ void ButtonBuySelectBubbleScript::init() { bool ButtonBuySelectBubbleScript::on_button_press(const ButtonPressEvent & e) { SaveManager & save = this->get_save_manager(); - ValueBroker<int> buy_bullet = save.get<int>(BUY_BUBBLE_SAVE,0); - if(!buy_bullet.get()){ - ValueBroker<int> coins = save.get<int>(TOTAL_COINS_GAME,0); - if(coins.get() >= 1000) - { + ValueBroker<int> buy_bullet = save.get<int>(BUY_BUBBLE_SAVE, 0); + if (!buy_bullet.get()) { + ValueBroker<int> coins = save.get<int>(TOTAL_COINS_GAME, 0); + if (coins.get() >= 1000) { int coin = coins.get(); coin -= 1000; - save.set(TOTAL_COINS_GAME,coin); - save.set(BUY_BUBBLE_SAVE,1); + save.set(TOTAL_COINS_GAME, coin); + save.set(BUY_BUBBLE_SAVE, 1); } - } - else { - save.set(JETPACK_PARTICLES,1); + } else { + save.set(JETPACK_PARTICLES, 1); } this->trigger_event<ShopUpdate>(); return false; |