Removed sector data cache system

This commit is contained in:
Anuken
2020-09-16 18:38:23 -04:00
parent 030542890e
commit bdf814c9b9
14 changed files with 134 additions and 356 deletions
+19 -10
View File
@@ -321,16 +321,25 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
stable.row();
}
stable.add("@sectors.resources").row();
stable.table(t -> {
t.left();
int idx = 0;
int max = 5;
for(UnlockableContent c : sector.data.resources){
t.image(c.icon(Cicon.small)).padRight(3);
if(++idx % max == 0) t.row();
}
}).fillX().row();
if(sector.save != null){
stable.add("@sectors.resources").row();
stable.table(t -> {
if(sector.save != null && sector.save.meta.secinfo != null && sector.save.meta.secinfo.resources.any()){
t.left();
int idx = 0;
int max = 5;
for(UnlockableContent c : sector.save.meta.secinfo.resources){
t.image(c.icon(Cicon.small)).padRight(3);
if(++idx % max == 0) t.row();
}
}else{
t.add("@unknown").color(Color.lightGray);
}
}).fillX().row();
}
//production
if(sector.hasBase() && sector.save.meta.hasProduction){