mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-22 20:48:33 +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.liquid.name = Liquids
|
||||||
content.unit.name = Units
|
content.unit.name = Units
|
||||||
content.block.name = Blocks
|
content.block.name = Blocks
|
||||||
|
content.sector.name = Sectors
|
||||||
|
|
||||||
item.copper.name = Copper
|
item.copper.name = Copper
|
||||||
item.lead.name = Lead
|
item.lead.name = Lead
|
||||||
|
@ -530,21 +530,23 @@ public class TechTree implements ContentList{
|
|||||||
});
|
});
|
||||||
|
|
||||||
nodeProduce(Items.copper, () -> {
|
nodeProduce(Items.copper, () -> {
|
||||||
|
nodeProduce(Liquids.water, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
nodeProduce(Items.lead, () -> {
|
nodeProduce(Items.lead, () -> {
|
||||||
nodeProduce(Items.graphite, () -> {
|
nodeProduce(Items.titanium, () -> {
|
||||||
nodeProduce(Items.titanium, () -> {
|
nodeProduce(Liquids.cryofluid, () -> {
|
||||||
nodeProduce(Liquids.cryofluid, () -> {
|
|
||||||
|
});
|
||||||
|
|
||||||
|
nodeProduce(Items.thorium, () -> {
|
||||||
|
nodeProduce(Items.surgeAlloy, () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
nodeProduce(Items.thorium, () -> {
|
nodeProduce(Items.phaseFabric, () -> {
|
||||||
nodeProduce(Items.surgeAlloy, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
nodeProduce(Items.phaseFabric, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -562,9 +564,12 @@ public class TechTree implements ContentList{
|
|||||||
});
|
});
|
||||||
|
|
||||||
nodeProduce(Items.coal, () -> {
|
nodeProduce(Items.coal, () -> {
|
||||||
nodeProduce(Items.silicon, () -> {
|
nodeProduce(Items.graphite, () -> {
|
||||||
|
nodeProduce(Items.silicon, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
nodeProduce(Items.pyratite, () -> {
|
nodeProduce(Items.pyratite, () -> {
|
||||||
nodeProduce(Items.blastCompound, () -> {
|
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;
|
public @Nullable String description, details;
|
||||||
/** Whether this content is always unlocked in the tech tree. */
|
/** Whether this content is always unlocked in the tech tree. */
|
||||||
public boolean alwaysUnlocked = false;
|
public boolean alwaysUnlocked = false;
|
||||||
|
/** Whether to show the description in the research dialog preview. */
|
||||||
|
public boolean inlineDescription = true;
|
||||||
/** Special logic icon ID. */
|
/** Special logic icon ID. */
|
||||||
public int iconId = 0;
|
public int iconId = 0;
|
||||||
/** Icons by Cicon ID.*/
|
/** Icons by Cicon ID.*/
|
||||||
|
@ -25,6 +25,7 @@ public class SectorPreset extends UnlockableContent{
|
|||||||
this.planet = planet;
|
this.planet = planet;
|
||||||
sector %= planet.sectors.size;
|
sector %= planet.sectors.size;
|
||||||
this.sector = planet.sectors.get(sector);
|
this.sector = planet.sectors.get(sector);
|
||||||
|
inlineDescription = false;
|
||||||
|
|
||||||
planet.preset(sector, this);
|
planet.preset(sector, this);
|
||||||
}
|
}
|
||||||
@ -36,7 +37,7 @@ public class SectorPreset extends UnlockableContent{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isHidden(){
|
public boolean isHidden(){
|
||||||
return true;
|
return description == null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -36,12 +36,17 @@ public class ContentInfoDialog extends BaseDialog{
|
|||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
if(content.description != null){
|
if(content.description != null){
|
||||||
table.add("@category.purpose").color(Pal.accent).fillX().padTop(10);
|
var any = content.stats.toMap().size > 0;
|
||||||
table.row();
|
|
||||||
table.add("[lightgray]" + content.displayDescription()).wrap().fillX().padLeft(10).width(500f).left();
|
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();
|
table.row();
|
||||||
|
|
||||||
if(!content.stats.useCategories){
|
if(!content.stats.useCategories && any){
|
||||||
table.add("@category.general").fillX().color(Pal.accent);
|
table.add("@category.general").fillX().color(Pal.accent);
|
||||||
table.row();
|
table.row();
|
||||||
}
|
}
|
||||||
|
@ -377,7 +377,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
stable.background(Styles.black6);
|
stable.background(Styles.black6);
|
||||||
|
|
||||||
stable.table(title -> {
|
stable.table(title -> {
|
||||||
title.add("[accent]" + sector.name());
|
title.add("[accent]" + sector.name()).padLeft(3);
|
||||||
if(sector.preset == null){
|
if(sector.preset == null){
|
||||||
title.add().growX();
|
title.add().growX();
|
||||||
|
|
||||||
@ -396,6 +396,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
closeOnBack();
|
closeOnBack();
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
cont.pane(t -> {
|
cont.pane(t -> {
|
||||||
|
t.marginRight(19f);
|
||||||
t.defaults().size(48);
|
t.defaults().size(48);
|
||||||
|
|
||||||
t.button(Icon.none, Styles.clearTogglei, () -> {
|
t.button(Icon.none, Styles.clearTogglei, () -> {
|
||||||
|
@ -484,7 +484,7 @@ public class ResearchDialog extends BaseDialog{
|
|||||||
infoTable.table(b -> {
|
infoTable.table(b -> {
|
||||||
b.margin(0).left().defaults().left();
|
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.button(Icon.info, Styles.cleari, () -> ui.content.show(node.content)).growY().width(50f);
|
||||||
}
|
}
|
||||||
b.add().grow();
|
b.add().grow();
|
||||||
@ -579,7 +579,7 @@ public class ResearchDialog extends BaseDialog{
|
|||||||
});
|
});
|
||||||
|
|
||||||
infoTable.row();
|
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();
|
infoTable.table(t -> t.margin(3f).left().labelWrap(node.content.displayDescription()).color(Color.lightGray).growX()).fillX();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user