diff --git a/src/main/java/argent_matter/gcyr/client/gui/screen/PlanetSelectionScreen.java b/src/main/java/argent_matter/gcyr/client/gui/screen/PlanetSelectionScreen.java index c2fe7250..ffc7d87b 100644 --- a/src/main/java/argent_matter/gcyr/client/gui/screen/PlanetSelectionScreen.java +++ b/src/main/java/argent_matter/gcyr/client/gui/screen/PlanetSelectionScreen.java @@ -204,7 +204,9 @@ protected void init() { // All buttons are data-driven; they are created from files in the /planet_data/planets directory. List planets = new ArrayList<>(PlanetData.planets().values()); - planets.sort(Comparator.comparing(g -> g.translation().substring(Math.abs(g.translation().indexOf(".text"))))); + // sort planets based on their orbital period + planets.sort(Comparator.comparing(p -> p.daysInYear())); + planets.forEach(planet -> { Category galaxyCategory = new Category(planet.galaxy(), Category.GALAXY_CATEGORY); Category solarSystemCategory = new Category(planet.solarSystem(), galaxyCategory); @@ -316,10 +318,11 @@ public Button createButton(int row, Component label, Category category, int colo public Button createButton(int row, int column, Component label, Category category, int colour, int sizeX, int sizeY, TooltipType tooltip, Planet planetInfo, Consumer