This commit is contained in:
Anuken 2020-11-14 17:00:12 -05:00
parent 0c050a3ef4
commit 4975def352
7 changed files with 34 additions and 23 deletions

View File

@ -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

View File

@ -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, () -> {
});
});
});
}

View File

@ -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.*/

View File

@ -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

View File

@ -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();
}

View File

@ -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, () -> {

View File

@ -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();
}