Skip to content

Commit

Permalink
Making unrelated tooltips not close when parts explode, making reflec…
Browse files Browse the repository at this point in the history
…tors not auto-buy when auto-buy is disabled

fixes #7
  • Loading branch information
cwmonkey committed Mar 27, 2016
1 parent f70e9c0 commit 4be6e2d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1989,6 +1989,10 @@ var remove_part = function(remove_tile, skip_update, sell) {
}
}

if ( tooltip_tile && tooltip_tile.part && tooltip_tile.part == remove_tile.part ) {
tile_tooltip_hide();
}

remove_tile.part = null;
remove_tile.setTicks(0);
remove_tile.setHeat_contained(0);
Expand Down Expand Up @@ -2016,8 +2020,6 @@ var remove_part = function(remove_tile, skip_update, sell) {
}
}
}

tile_tooltip_hide();
};

// TODO: Move this
Expand Down Expand Up @@ -2383,7 +2385,7 @@ var game_loop = function() {

// TODO: dedupe this and cell ticks
if ( tile_reflector.ticks === 0 ) {
if ( tile_reflector.part.perpetual && game.current_money >= tile_reflector.part.cost ) {
if ( auto_buy_disabled !== true && tile_reflector.part.perpetual && game.current_money >= tile_reflector.part.cost ) {
// auto replenish reflector
game.current_money -= tile_reflector.part.cost;
ui.say('var', 'current_money', game.current_money);
Expand Down

0 comments on commit 4be6e2d

Please sign in to comment.