From 8f4f51c1221ea8cd7855dad10e5e4b7e14eb6474 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 21 Jan 2022 17:04:35 -0500 Subject: [PATCH] Menu cleanup --- core/src/mindustry/graphics/MenuRenderer.java | 7 ++++--- core/src/mindustry/type/UnitType.java | 2 -- core/src/mindustry/ui/dialogs/PlanetDialog.java | 6 ++++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/core/src/mindustry/graphics/MenuRenderer.java b/core/src/mindustry/graphics/MenuRenderer.java index 0904ef48bf..b572f99b8b 100644 --- a/core/src/mindustry/graphics/MenuRenderer.java +++ b/core/src/mindustry/graphics/MenuRenderer.java @@ -13,7 +13,6 @@ import arc.util.noise.*; import mindustry.content.*; import mindustry.type.*; import mindustry.world.*; -import mindustry.world.blocks.environment.*; import static mindustry.Vars.*; @@ -29,7 +28,8 @@ public class MenuRenderer implements Disposable{ private float time = 0f; private float flyerRot = 45f; private int flyers = Mathf.chance(0.2) ? Mathf.random(35) : Mathf.random(15); - private UnitType flyerType = content.units().select(u -> !u.isHidden() && u.hitSize <= 20f && u.flying && u.onTitleScreen && u.region.found()).random(); + //no longer random or "dynamic", mod units in the menu look jarring, and it's not worth the configuration effort + private UnitType flyerType = Seq.with(UnitTypes.flare, UnitTypes.horizon, UnitTypes.zenith, UnitTypes.mono, UnitTypes.poly, UnitTypes.mega, UnitTypes.alpha, UnitTypes.beta, UnitTypes.gamma).random(); public MenuRenderer(){ Time.mark(); @@ -41,7 +41,8 @@ public class MenuRenderer implements Disposable{ private void generate(){ world.beginMapLoad(); Tiles tiles = world.resize(width, height); - Seq ores = content.blocks().select(b -> b instanceof OreBlock ore && !ore.wallOre); + //only uses base game ores now, mod ones usually contrast too much with the floor + Seq ores = Seq.with(Blocks.oreCopper, Blocks.oreLead, Blocks.oreScrap, Blocks.oreCoal, Blocks.oreTitanium, Blocks.oreThorium); shadows = new FrameBuffer(width, height); int offset = Mathf.random(100000); int s1 = offset, s2 = offset + 1, s3 = offset + 2; diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 867ec87dfc..a8e4fcc44e 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -44,8 +44,6 @@ public class UnitType extends UnlockableContent{ /** If true, the unit is always at elevation 1. */ public boolean flying; - /** If `flying` and this is true, the unit can appear on the title screen. TODO remove with new menu*/ - public boolean onTitleScreen = true; /** Creates a new instance of this unit class. */ public Prov constructor; /** The default AI controller to assign on creation. */ diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index a4508493da..2e5263f42b 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -170,6 +170,12 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ return this; } + //view current planet by default + if(Vars.state.rules.sector != null){ + state.planet = Vars.state.rules.sector.planet; + settings.put("lastplanet", state.planet.name); + } + rebuildButtons(); mode = look; state.otherCamPos = null;