Objective cleanup

This commit is contained in:
Anuken 2022-04-12 23:52:24 -04:00
parent 0902a675db
commit 41a3dae138
2 changed files with 9 additions and 6 deletions

View File

@ -115,12 +115,10 @@ public class SectorPresets{
difficulty = 1;
rules = r -> {
r.objectives.addAll(new ItemObjective(Items.beryllium, 20){{
markers = new ObjectiveMarker[]{
new TextMarker("Units can mine [accent]resources[] from walls.", 1984f, 2240f + 16f),
new ShapeMarker(1984f, 2240f),
};
}});
r.objectives.addAll(new ItemObjective(Items.beryllium, 20).withMarkers(
new TextMarker("Use the unit to mine [accent]resources[] from walls.", 1984f, 2240f + 16f),
new ShapeMarker(1984f, 2240f)
));
};
}};

View File

@ -73,6 +73,11 @@ public class MapObjectives{
public static abstract class MapObjective{
public ObjectiveMarker[] markers = {};
public MapObjective withMarkers(ObjectiveMarker... markers){
this.markers = markers;
return this;
}
public boolean complete(){
return false;
}