Refactoring

This commit is contained in:
Anuken
2020-05-13 22:29:27 -04:00
parent 6e62936458
commit a06f6f0b2d
22 changed files with 76 additions and 91 deletions

View File

@@ -86,10 +86,10 @@ public class ContentParser{
desc.errored = Throwable::printStackTrace;
return sound;
});
put(Objective.class, (type, data) -> {
Class<? extends Objective> oc = data.has("type") ? resolve(data.getString("type"), "mindustry.game.Objectives") : ZoneWave.class;
put(Objectives.Objective.class, (type, data) -> {
Class<? extends Objectives.Objective> oc = data.has("type") ? resolve(data.getString("type"), "mindustry.game.Objectives") : ZoneWave.class;
data.remove("type");
Objective obj = make(oc);
Objectives.Objective obj = make(oc);
readFields(obj, data);
return obj;
});