diff --git a/core/src/mindustry/content/SectorPresets.java b/core/src/mindustry/content/SectorPresets.java index 9069e5f88d..3e0a9d8737 100644 --- a/core/src/mindustry/content/SectorPresets.java +++ b/core/src/mindustry/content/SectorPresets.java @@ -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) + )); }; }}; diff --git a/core/src/mindustry/game/MapObjectives.java b/core/src/mindustry/game/MapObjectives.java index 8179547333..e152e3c03b 100644 --- a/core/src/mindustry/game/MapObjectives.java +++ b/core/src/mindustry/game/MapObjectives.java @@ -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; }