Turn logic / Cross-sector production / Pad tweaks

This commit is contained in:
Anuken
2020-05-15 11:03:21 -04:00
parent 603cb4295a
commit b68e0a8562
16 changed files with 188 additions and 39 deletions

View File

@@ -273,11 +273,11 @@ public class PlanetDialog extends FloatingDialog{
}
if(sec.hostility >= 0.02f){
drawSelection(sec, Color.scarlet, 0.11f * sec.hostility, 0.0001f);
drawSelection(sec, Color.scarlet, 0.11f * sec.hostility, -0.02f);
}
if(sec.save != null){
drawSelection(sec, Color.lime, 0.03f, 0.0009f);
drawSelection(sec, Color.lime, 0.03f, -0.01f);
}
}
@@ -355,6 +355,25 @@ public class PlanetDialog extends FloatingDialog{
}
}).fillX().row();
//production
if(selected.hasSave() && selected.save.meta.hasProduction){
stable.add("Production:").row();
stable.table(t -> {
t.left();
selected.save.meta.productionRates.each(entry -> {
int total = (int)(entry.value * turnDuration / 60f);
if(total > 1){
t.image(entry.key.icon(Cicon.small)).padRight(3);
t.add(ui.formatAmount(total) + " /turn").color(Color.lightGray);
t.row();
}
});
});
}
stable.row();
stable.button("Launch", Styles.transt, () -> {