Many editor bugfixes, server additions

This commit is contained in:
Anuken
2018-02-04 13:10:32 -05:00
parent ed34bbff5a
commit 4dee8ba150
7 changed files with 60 additions and 15 deletions

View File

@@ -95,16 +95,18 @@ public class LevelDialog extends FloatingDialog{
if(i % maxwidth == 0){
maps.row();
}
//TODO this is a hack
if(!Settings.has("hiscore" + map.name)){
Settings.defaults("hiscore" + map.name, 1);
}
Table inset = new Table("pane-button");
inset.add("[accent]" + Bundles.get("map."+map.name+".name", map.name)).pad(3f);
inset.row();
inset.label((() -> Bundles.format("text.level.highscore", Settings.getInt("hiscore" + map.name))))
inset.label((() ->{
try{
return Bundles.format("text.level.highscore", Settings.getInt("hiscore" + map.name));
}catch (Exception e){
Settings.defaults("hiscore" + map.name, 1);
return Bundles.format("text.level.highscore", 0);
}
}))
.pad(3f);
inset.pack();