mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-11-11 14:56:10 +03:00
Grammatical correction for remaining enemies label
Noticed that when the remaining enemy count comes down to 1, the word 'enemies' persists on the label, so i corrected that to show 'enemy' or 'enemies' instead, depending on the remaining enemy count. ~~also first dialogue JSON coming soon~~
This commit is contained in:
parent
2d9710c708
commit
7b00d1160e
@ -159,6 +159,12 @@ public class HudFragment implements Fragment{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String printEnemiesRemaining() {
|
||||
if(control.getEnemiesRemaining() == 1) {
|
||||
return " enemy left";
|
||||
} else return " enemies left";
|
||||
}
|
||||
|
||||
private void addWaveTable(){
|
||||
float uheight = 66f;
|
||||
@ -173,7 +179,7 @@ public class HudFragment implements Fragment{
|
||||
row();
|
||||
|
||||
new label(()-> control.getEnemiesRemaining() > 0 ?
|
||||
control.getEnemiesRemaining() + " enemies" :
|
||||
control.getEnemiesRemaining() + printEnemiesRemaining() :
|
||||
(control.getTutorial().active() || Vars.control.getMode() == GameMode.sandbox) ? "waiting..." : "Wave in " + (int) (control.getWaveCountdown() / 60f))
|
||||
.minWidth(140).units(Unit.dp).left();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user