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 class
Build a certain amount of a block.static class
Command any unit to do anything.static class
Get a certain item in your core (through a block, not manually.)static class
static class
static class
Destroy all enemy core(s).static class
Produce a certain amount of units.static class
Wait until a logic flag is set.static @interface
For arrays orSeq
s; does not add the new and delete buttonsstatic class
Have a certain amount of item in your core.static @interface
Forbyte
; treats it as a world label flag.static class
Displays a line from pos1 to pos2.static class
Base abstract class for any in-map objective.static @interface
ForString
; indicates that a text area should be used.static class
Marker used for drawing various content to indicate something along with an objective.static class
Displays a circle in the world.static class
A marker that has a position in the world in world coordinates.static class
Produce a specific piece of content in the tech tree (essentially research with different text).static class
static @interface
ForUnlockableContent
; filters all un-researchable content.static class
Research a specific piece of content in the tech tree.static @interface
Forfloat
; multiplies the UI input by 60.static class
Displays a shape with an outline and color.static class
Displays text above a shape.static @interface
ForBlock
; filters all un-buildable blocks.static class
Displays text at a location.static class
Displays a texture with specified name.static @interface
static class
static class
Produce a certain amount of a unit.static @interface
For arrays orSeq
s; does not create element rearrangement buttons.static @interface
Forfloat[]
; 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 TypeMethodDescriptionvoid
add
(MapObjectives.MapObjective... objectives) Adds all given objectives to the executor as root objectives.boolean
any()
void
clear()
void
each
(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.void
eachRunning
(arc.func.Cons<MapObjectives.MapObjective> cons) Iterates over all qualified in-map objectives.get
(int index) iterator()
static void
registerLegacyMarker
(String name, arc.func.Prov<? extends MapObjectives.ObjectiveMarker> prov) static void
registerMarker
(arc.func.Prov<? extends MapObjectives.ObjectiveMarker>... providers) static void
registerObjective
(arc.func.Prov<? extends MapObjectives.MapObjective>... providers) void
update()
Updates all objectives this executor contains.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
iterator
in interfaceIterable<MapObjectives.MapObjective>
-
each
- Specified by:
each
in interfacearc.util.Eachable<MapObjectives.MapObjective>
-