Reset HudUi on ResetEvent

Resets HudUi on ResetEvent, to avoid it copying itself over itself in the campaign.
This commit is contained in:
NiChrosia
2021-05-13 19:21:44 -05:00
committed by GitHub
parent 8cd99bbb83
commit 9d24d21202

View File

@@ -24,6 +24,11 @@ public class Main extends Mod {
hud.addWaveTable();
});
Events.on(ResetEvent.class, e -> {
HudUi hud = new HudUi();
hud.addWaveTable();
});
Events.run(Trigger.draw, () -> {
if(Core.settings.getBool("unithealthui"))
Groups.unit.each(unit -> new FreeBar().draw(unit));