mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-13 22:38:59 +00:00
fix healthbars not being removed (#1329)
## Description: Warships being nuked doesnt remove the healthbar  ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: Vivacious Box --------- Co-authored-by: evanpelle <evanpelle@gmail.com>
This commit is contained in:
@@ -340,7 +340,11 @@ export class UILayer implements Layer {
|
||||
// full hp/dead warships dont need a hp bar
|
||||
this.allHealthBars.get(unit.id())?.clear();
|
||||
this.allHealthBars.delete(unit.id());
|
||||
} else if (unit.health() < maxHealth && unit.health() > 0) {
|
||||
} else if (
|
||||
unit.isActive() &&
|
||||
unit.health() < maxHealth &&
|
||||
unit.health() > 0
|
||||
) {
|
||||
this.allHealthBars.get(unit.id())?.clear();
|
||||
const healthBar = new ProgressBar(
|
||||
COLOR_PROGRESSION,
|
||||
|
||||
Reference in New Issue
Block a user