Marker instruction rework
This commit is contained in:
@@ -31,6 +31,8 @@ import static mindustry.Vars.*;
|
||||
public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObjective>{
|
||||
public static final Seq<Prov<? extends MapObjective>> allObjectiveTypes = new Seq<>();
|
||||
public static final Seq<Prov<? extends ObjectiveMarker>> allMarkerTypes = new Seq<>();
|
||||
public static final ObjectMap<String, Prov<? extends ObjectiveMarker>> markerNameToType = new ObjectMap<>();
|
||||
public static final Seq<String> allMarkerTypeNanes = new Seq<>();
|
||||
|
||||
/**
|
||||
* All objectives the executor contains. Do not modify directly, ever!
|
||||
@@ -72,8 +74,9 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
||||
allObjectiveTypes.add(prov);
|
||||
|
||||
Class<? extends MapObjective> type = prov.get().getClass();
|
||||
JsonIO.classTag(Strings.camelize(type.getSimpleName().replace("Objective", "")), type);
|
||||
JsonIO.classTag(type.getSimpleName().replace("Objective", ""), type);
|
||||
String name = type.getSimpleName().replace("Objective", "");
|
||||
JsonIO.classTag(Strings.camelize(name), type);
|
||||
JsonIO.classTag(name, type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,8 +86,12 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
||||
allMarkerTypes.add(prov);
|
||||
|
||||
Class<? extends ObjectiveMarker> type = prov.get().getClass();
|
||||
JsonIO.classTag(Strings.camelize(type.getSimpleName().replace("Marker", "")), type);
|
||||
JsonIO.classTag(type.getSimpleName().replace("Marker", ""), type);
|
||||
String name = type.getSimpleName().replace("Marker", "");
|
||||
allMarkerTypeNanes.add(Strings.camelize(name));
|
||||
markerNameToType.put(name, prov);
|
||||
markerNameToType.put(Strings.camelize(name), prov);
|
||||
JsonIO.classTag(Strings.camelize(name), type);
|
||||
JsonIO.classTag(name, type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import arc.util.serialization.*;
|
||||
import arc.util.serialization.Json.*;
|
||||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.game.MapObjectives.*;
|
||||
import mindustry.graphics.g3d.*;
|
||||
import mindustry.io.*;
|
||||
import mindustry.type.*;
|
||||
@@ -146,8 +145,6 @@ public class Rules{
|
||||
public MapObjectives objectives = new MapObjectives();
|
||||
/** Flags set by objectives. Used in world processors. */
|
||||
public ObjectSet<String> objectiveFlags = new ObjectSet<>();
|
||||
/** Markers not linked to objectives. Controlled by world processors. */
|
||||
public IntMap<ObjectiveMarker> markers = new IntMap<>();
|
||||
/** If true, fog of war is enabled. Enemy units and buildings are hidden unless in radar view. */
|
||||
public boolean fog = false;
|
||||
/** If fog = true, this is whether static (black) fog is enabled. */
|
||||
|
||||
Reference in New Issue
Block a user