Objective flag system

This commit is contained in:
Anuken
2022-04-14 16:23:39 -04:00
parent efd30809e8
commit 0f3fc92746
5 changed files with 67 additions and 0 deletions

View File

@@ -172,9 +172,21 @@ public class MapObjectives{
/** Base abstract class for any in-map objective. */
public static abstract class MapObjective{
public String[] flagsAdded = {};
public String[] flagsRemoved = {};
public ObjectiveMarker[] markers = {};
public @Nullable String details;
public MapObjective withFlags(String... flags){
this.flagsAdded = flags;
return this;
}
public MapObjective withFlagsRemoved(String... flags){
this.flagsRemoved = flags;
return this;
}
public MapObjective withMarkers(ObjectiveMarker... markers){
this.markers = markers;
return this;

View File

@@ -118,6 +118,8 @@ public class Rules{
public ObjectSet<Item> hiddenBuildItems = Items.erekirOnlyItems.asSet();
/** Campaign-only map objectives. */
public Seq<MapObjective> objectives = new Seq<>();
/** Flags set by objectives. Used in world processors. */
public ObjectSet<String> objectiveFlags = new ObjectSet<>();
/** HIGHLY UNSTABLE/EXPERIMENTAL. DO NOT USE THIS. */
public boolean fog = false;
/** If fog = true, this is whether static (black) fog is enabled. */