From c95fa25b60770436bbc451519346dece278ac8bd Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 5 Oct 2019 16:08:34 -0400 Subject: [PATCH] Unlock bosses when defeated --- core/src/io/anuke/mindustry/core/Control.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/io/anuke/mindustry/core/Control.java b/core/src/io/anuke/mindustry/core/Control.java index ebcb9d1b56..92e7c96134 100644 --- a/core/src/io/anuke/mindustry/core/Control.java +++ b/core/src/io/anuke/mindustry/core/Control.java @@ -175,6 +175,12 @@ public class Control implements ApplicationListener, Loadable{ Effects.shake(5f, 5f, core); }); }); + + Events.on(UnitDestroyEvent.class, e -> { + if(e.unit instanceof BaseUnit){ + data.unlockContent(((BaseUnit)e.unit).getType()); + } + }); } @Override