diff --git a/core/assets/music/land.ogg b/core/assets/music/land.ogg new file mode 100644 index 0000000000..800b253656 Binary files /dev/null and b/core/assets/music/land.ogg differ diff --git a/core/src/mindustry/core/Control.java b/core/src/mindustry/core/Control.java index 6b41a97a5f..63564cb211 100644 --- a/core/src/mindustry/core/Control.java +++ b/core/src/mindustry/core/Control.java @@ -166,6 +166,10 @@ public class Control implements ApplicationListener, Loadable{ if(core == null) return; + //TODO this sounds pretty bad due to conflict + Musics.land.stop(); + Musics.land.play(); + app.post(() -> ui.hudfrag.showLand()); renderer.zoomIn(Fx.coreLand.lifetime); app.post(() -> Fx.coreLand.at(core.getX(), core.getY(), 0, core.block())); diff --git a/core/src/mindustry/game/MusicControl.java b/core/src/mindustry/game/MusicControl.java index af1a62c8b6..934a93b2bb 100644 --- a/core/src/mindustry/game/MusicControl.java +++ b/core/src/mindustry/game/MusicControl.java @@ -43,6 +43,15 @@ public class MusicControl{ darkMusic = Array.with(Musics.game2, Musics.game5, Musics.game7); } + public void stop(){ + silenced = true; + if(current != null){ + current.stop(); + current = null; + fade = 0f; + } + } + /** Update and play the right music track.*/ public void update(){ if(state.isMenu()){ diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index e0fc058dde..3bc03d1157 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -93,10 +93,10 @@ public class PlanetDialog extends FloatingDialog{ //TODO names buttons.addImageTextButton("$back", Icon.left, style, this::hide).margin(bmargin); - buttons.addImageTextButton("Tech", Icon.tree, style, () -> ui.tech.show()).margin(bmargin); + //buttons.addImageTextButton("Tech", Icon.tree, style, () -> ui.tech.show()).margin(bmargin); //buttons.addImageTextButton("Launch", Icon.upOpen, style, this::hide).margin(bmargin); - buttons.addImageTextButton("Database", Icon.book, style, () -> ui.database.show()).margin(bmargin); - buttons.addImageTextButton("Resources", Icon.file, style, this::hide).margin(bmargin); + //buttons.addImageTextButton("Database", Icon.book, style, () -> ui.database.show()).margin(bmargin); + //buttons.addImageTextButton("Resources", Icon.file, style, this::hide).margin(bmargin); cam.fov = 60f; @@ -357,7 +357,7 @@ public class PlanetDialog extends FloatingDialog{ stable.row(); - stable.addButton("Launch", () -> { + stable.addButton("Launch", Styles.transt, () -> { if(selected != null){ if(selected.is(SectorAttribute.naval)){ ui.showInfo("You need a naval loadout to launch here."); @@ -366,7 +366,7 @@ public class PlanetDialog extends FloatingDialog{ control.playSector(selected); hide(); } - }).size(120f, 50f).pad(2f); + }).growX().padTop(2f).height(50f).minWidth(170f); stable.pack(); stable.setPosition(x, y, Align.center);