Package mindustry.game
Class MapObjectives
java.lang.Object
mindustry.game.MapObjectives
- All Implemented Interfaces:
arc.util.Eachable<MapObjectives.MapObjective>,Iterable<MapObjectives.MapObjective>
public class MapObjectives
extends Object
implements Iterable<MapObjectives.MapObjective>, arc.util.Eachable<MapObjectives.MapObjective>
Handles and executes in-map objectives.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceForint; treats it as an alignment fromAlignstatic classBuild a certain amount of a block.static classCommand any unit to do anything.static classGet a certain item in your core (through a block, not manually.)static classstatic classstatic classDestroy all enemy core(s).static classProduce a certain amount of units.static classWait until a logic flag is set.static @interfaceFor arrays orSeqs; does not add the new and delete buttonsstatic classHave a certain amount of item in your core.static @interfaceForbyte; treats it as a world label flag.static classDisplays a line from pos1 to pos2.static classBase abstract class for any in-map objective.static @interfaceForString; indicates that a text area should be used.static classMarker used for drawing various content to indicate something along with an objective.static classDisplays a circle in the world.static classA marker that has a position in the world in world coordinates.static classProduce a specific piece of content in the tech tree (essentially research with different text).static classstatic @interfaceForUnlockableContent; filters all un-researchable content.static classResearch a specific piece of content in the tech tree.static @interfaceForfloat; multiplies the UI input by 60.static classDisplays a shape with an outline and color.static classDisplays text above a shape.static @interfaceForBlock; filters all un-buildable blocks.static classDisplays text at a location.static classDisplays a texture with specified name.static @interfacestatic classstatic classProduce a certain amount of a unit.static @interfaceFor arrays orSeqs; does not create element rearrangement buttons.static @interfaceForfloat[]; treats it as an array of vertices. -
Field Summary
FieldsModifier and TypeFieldDescriptionarc.struct.Seq<MapObjectives.MapObjective>All objectives the executor contains.static final arc.struct.Seq<String>static final arc.struct.Seq<arc.func.Prov<? extends MapObjectives.ObjectiveMarker>>static final arc.struct.Seq<arc.func.Prov<? extends MapObjectives.MapObjective>>static final arc.struct.ObjectMap<String,arc.func.Prov<? extends MapObjectives.ObjectiveMarker>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(MapObjectives.MapObjective... objectives) Adds all given objectives to the executor as root objectives.booleanany()voidclear()voideach(arc.func.Cons<? super MapObjectives.MapObjective> cons) <T extends MapObjectives.MapObjective>
voideachRunning(arc.func.Boolf<? super MapObjectives.MapObjective> pred, arc.func.Cons<T> cons) Iterates over all qualified in-map objectives, with a filter.voideachRunning(arc.func.Cons<MapObjectives.MapObjective> cons) Iterates over all qualified in-map objectives.get(int index) iterator()static voidregisterLegacyMarker(String name, arc.func.Prov<? extends MapObjectives.ObjectiveMarker> prov) static voidregisterMarker(arc.func.Prov<? extends MapObjectives.ObjectiveMarker>... providers) static voidregisterObjective(arc.func.Prov<? extends MapObjectives.MapObjective>... providers) voidupdate()Updates all objectives this executor contains.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
allObjectiveTypes
public static final arc.struct.Seq<arc.func.Prov<? extends MapObjectives.MapObjective>> allObjectiveTypes -
allMarkerTypes
public static final arc.struct.Seq<arc.func.Prov<? extends MapObjectives.ObjectiveMarker>> allMarkerTypes -
markerNameToType
public static final arc.struct.ObjectMap<String,arc.func.Prov<? extends MapObjectives.ObjectiveMarker>> markerNameToType -
allMarkerTypeNames
-
all
All objectives the executor contains. Do not modify directly, ever!- See Also:
-
-
Constructor Details
-
MapObjectives
-
MapObjectives
public MapObjectives()
-
-
Method Details
-
registerObjective
@SafeVarargs public static void registerObjective(arc.func.Prov<? extends MapObjectives.MapObjective>... providers) -
registerMarker
@SafeVarargs public static void registerMarker(arc.func.Prov<? extends MapObjectives.ObjectiveMarker>... providers) -
registerLegacyMarker
public static void registerLegacyMarker(String name, arc.func.Prov<? extends MapObjectives.ObjectiveMarker> prov) -
add
Adds all given objectives to the executor as root objectives. -
update
public void update()Updates all objectives this executor contains. -
get
-
any
public boolean any()- Returns:
- Whether there are any qualified objectives at all.
-
clear
public void clear() -
eachRunning
Iterates over all qualified in-map objectives. -
eachRunning
public <T extends MapObjectives.MapObjective> void eachRunning(arc.func.Boolf<? super MapObjectives.MapObjective> pred, arc.func.Cons<T> cons) Iterates over all qualified in-map objectives, with a filter. -
iterator
- Specified by:
iteratorin interfaceIterable<MapObjectives.MapObjective>
-
each
- Specified by:
eachin interfacearc.util.Eachable<MapObjectives.MapObjective>
-