Turn notification
This commit is contained in:
@@ -364,7 +364,7 @@ public class PlanetDialog extends FloatingDialog{
|
||||
}).fillX().row();
|
||||
|
||||
//production
|
||||
if(selected.hasSave() && selected.save.meta.hasProduction){
|
||||
if(selected.hasBase() && selected.save.meta.hasProduction){
|
||||
stable.add("Production:").row();
|
||||
stable.table(t -> {
|
||||
t.left();
|
||||
@@ -381,7 +381,7 @@ public class PlanetDialog extends FloatingDialog{
|
||||
}
|
||||
|
||||
//disaply how many turns this sector has been attacked
|
||||
if(selected.getTurnsPassed() > 0){
|
||||
if(selected.getTurnsPassed() > 0 && selected.hasBase()){
|
||||
stable.row();
|
||||
|
||||
stable.add("[scarlet]" + Iconc.warning + " " + selected.getTurnsPassed() + "x attacks");
|
||||
|
||||
@@ -41,7 +41,13 @@ public class HudFragment extends Fragment{
|
||||
|
||||
private long lastToast;
|
||||
|
||||
@Override
|
||||
public void build(Group parent){
|
||||
Events.on(TurnEvent.class, e -> {
|
||||
//TODO localize, clean up, etc
|
||||
int attacked = universe.getSectorsAttacked();
|
||||
showToast("New turn: [accent]" + universe.getTurn() + "[]" + (attacked > 0 ? "\n[scarlet]" + Iconc.warning + " " + attacked + " sectors attacked!": ""));
|
||||
});
|
||||
|
||||
//menu at top left
|
||||
parent.fill(cont -> {
|
||||
|
||||
Reference in New Issue
Block a user