diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index a323537cc3..f2b57252ed 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -935,6 +935,7 @@ content.item.name = Items content.liquid.name = Liquids content.unit.name = Units content.block.name = Blocks +content.sector.name = Sectors item.copper.name = Copper item.lead.name = Lead diff --git a/core/src/mindustry/content/TechTree.java b/core/src/mindustry/content/TechTree.java index 8ad9051067..e1873a4c6b 100644 --- a/core/src/mindustry/content/TechTree.java +++ b/core/src/mindustry/content/TechTree.java @@ -530,21 +530,23 @@ public class TechTree implements ContentList{ }); nodeProduce(Items.copper, () -> { + nodeProduce(Liquids.water, () -> { + + }); + nodeProduce(Items.lead, () -> { - nodeProduce(Items.graphite, () -> { - nodeProduce(Items.titanium, () -> { - nodeProduce(Liquids.cryofluid, () -> { + nodeProduce(Items.titanium, () -> { + nodeProduce(Liquids.cryofluid, () -> { + + }); + + nodeProduce(Items.thorium, () -> { + nodeProduce(Items.surgeAlloy, () -> { }); - nodeProduce(Items.thorium, () -> { - nodeProduce(Items.surgeAlloy, () -> { + nodeProduce(Items.phaseFabric, () -> { - }); - - nodeProduce(Items.phaseFabric, () -> { - - }); }); }); }); @@ -562,9 +564,12 @@ public class TechTree implements ContentList{ }); nodeProduce(Items.coal, () -> { - nodeProduce(Items.silicon, () -> { + nodeProduce(Items.graphite, () -> { + nodeProduce(Items.silicon, () -> { + }); }); + nodeProduce(Items.pyratite, () -> { nodeProduce(Items.blastCompound, () -> { @@ -580,10 +585,6 @@ public class TechTree implements ContentList{ }); }); }); - - nodeProduce(Liquids.water, () -> { - - }); }); }); } diff --git a/core/src/mindustry/ctype/UnlockableContent.java b/core/src/mindustry/ctype/UnlockableContent.java index 57fcd76392..7848882206 100644 --- a/core/src/mindustry/ctype/UnlockableContent.java +++ b/core/src/mindustry/ctype/UnlockableContent.java @@ -24,6 +24,8 @@ public abstract class UnlockableContent extends MappableContent{ public @Nullable String description, details; /** Whether this content is always unlocked in the tech tree. */ public boolean alwaysUnlocked = false; + /** Whether to show the description in the research dialog preview. */ + public boolean inlineDescription = true; /** Special logic icon ID. */ public int iconId = 0; /** Icons by Cicon ID.*/ diff --git a/core/src/mindustry/type/SectorPreset.java b/core/src/mindustry/type/SectorPreset.java index 05574610fd..ab7f9b234b 100644 --- a/core/src/mindustry/type/SectorPreset.java +++ b/core/src/mindustry/type/SectorPreset.java @@ -25,6 +25,7 @@ public class SectorPreset extends UnlockableContent{ this.planet = planet; sector %= planet.sectors.size; this.sector = planet.sectors.get(sector); + inlineDescription = false; planet.preset(sector, this); } @@ -36,7 +37,7 @@ public class SectorPreset extends UnlockableContent{ @Override public boolean isHidden(){ - return true; + return description == null; } @Override diff --git a/core/src/mindustry/ui/dialogs/ContentInfoDialog.java b/core/src/mindustry/ui/dialogs/ContentInfoDialog.java index 0e85387d36..b076d4b766 100644 --- a/core/src/mindustry/ui/dialogs/ContentInfoDialog.java +++ b/core/src/mindustry/ui/dialogs/ContentInfoDialog.java @@ -36,12 +36,17 @@ public class ContentInfoDialog extends BaseDialog{ table.row(); if(content.description != null){ - table.add("@category.purpose").color(Pal.accent).fillX().padTop(10); - table.row(); - table.add("[lightgray]" + content.displayDescription()).wrap().fillX().padLeft(10).width(500f).left(); + var any = content.stats.toMap().size > 0; + + if(any){ + table.add("@category.purpose").color(Pal.accent).fillX().padTop(10); + table.row(); + } + + table.add("[lightgray]" + content.displayDescription()).wrap().fillX().padLeft(any ? 10 : 0).width(500f).padTop(any ? 0 : 10).left(); table.row(); - if(!content.stats.useCategories){ + if(!content.stats.useCategories && any){ table.add("@category.general").fillX().color(Pal.accent); table.row(); } diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index da81ad3802..3479cc0ab4 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -377,7 +377,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ stable.background(Styles.black6); stable.table(title -> { - title.add("[accent]" + sector.name()); + title.add("[accent]" + sector.name()).padLeft(3); if(sector.preset == null){ title.add().growX(); @@ -396,6 +396,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ closeOnBack(); setFillParent(true); cont.pane(t -> { + t.marginRight(19f); t.defaults().size(48); t.button(Icon.none, Styles.clearTogglei, () -> { diff --git a/core/src/mindustry/ui/dialogs/ResearchDialog.java b/core/src/mindustry/ui/dialogs/ResearchDialog.java index 48ef11ba4d..7d0f0d7a10 100644 --- a/core/src/mindustry/ui/dialogs/ResearchDialog.java +++ b/core/src/mindustry/ui/dialogs/ResearchDialog.java @@ -484,7 +484,7 @@ public class ResearchDialog extends BaseDialog{ infoTable.table(b -> { b.margin(0).left().defaults().left(); - if(selectable){ + if(selectable && (node.content.description != null || node.content.stats.toMap().size > 0)){ b.button(Icon.info, Styles.cleari, () -> ui.content.show(node.content)).growY().width(50f); } b.add().grow(); @@ -579,7 +579,7 @@ public class ResearchDialog extends BaseDialog{ }); infoTable.row(); - if(node.content.description != null && selectable){ + if(node.content.description != null && node.content.inlineDescription && selectable){ infoTable.table(t -> t.margin(3f).left().labelWrap(node.content.displayDescription()).color(Color.lightGray).growX()).fillX(); }