mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-23 04:59:19 +07:00
Cleanup
This commit is contained in:
parent
0c050a3ef4
commit
4975def352
@ -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
|
||||
|
@ -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, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -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.*/
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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, () -> {
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user