Code cleanup

This commit is contained in:
Anuken
2018-10-06 11:56:39 -04:00
parent 0ce226d0c9
commit fd107ab5b8
48 changed files with 94 additions and 195 deletions
@@ -31,8 +31,7 @@ public class Unlocks{
* @return whether or not this content was newly unlocked.
*/
public boolean unlockContent(UnlockableContent content){
if(rootSet().isUnlocked(content)) return false;
return currentSet().unlockContent(content);
return !rootSet().isUnlocked(content) && currentSet().unlockContent(content);
}
private ContentUnlockSet currentSet(){
@@ -76,7 +75,7 @@ public class Unlocks{
public void load(){
sets.clear();
ObjectMap<String, ObjectMap<ContentType, Array<String>>> result = Settings.getObject("content-sets", ObjectMap.class, () -> new ObjectMap<>());
ObjectMap<String, ObjectMap<ContentType, Array<String>>> result = Settings.getObject("content-sets", ObjectMap.class, ObjectMap::new);
for(Entry<String, ObjectMap<ContentType, Array<String>>> outer : result.entries()){
ContentUnlockSet cset = new ContentUnlockSet();