WIP map objective system
This commit is contained in:
29
core/src/mindustry/game/MapObjectives.java
Normal file
29
core/src/mindustry/game/MapObjectives.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package mindustry.game;
|
||||
|
||||
import arc.func.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
|
||||
public class MapObjectives{
|
||||
public static Seq<Prov<MapObjective>> allObjectiveTypes = Seq.with();
|
||||
|
||||
public abstract class MapObjective{
|
||||
|
||||
public boolean complete(){
|
||||
return false;
|
||||
}
|
||||
|
||||
public void update(){
|
||||
|
||||
}
|
||||
|
||||
/** Reset internal state, if any. */
|
||||
public void reset(){
|
||||
|
||||
}
|
||||
|
||||
public @Nullable String details(){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import arc.util.*;
|
||||
import arc.util.serialization.*;
|
||||
import arc.util.serialization.Json.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.game.MapObjectives.*;
|
||||
import mindustry.graphics.g3d.*;
|
||||
import mindustry.io.*;
|
||||
import mindustry.type.*;
|
||||
@@ -115,6 +116,8 @@ public class Rules{
|
||||
public ObjectSet<String> researched = new ObjectSet<>();
|
||||
/** Block containing these items as requirements are hidden. */
|
||||
public ObjectSet<Item> hiddenBuildItems = Items.erekirOnlyItems.asSet();
|
||||
/** Campaign-only map objectives. */
|
||||
public Seq<MapObjective> objectives = new Seq<>();
|
||||
/** HIGHLY UNSTABLE/EXPERIMENTAL. DO NOT USE THIS. */
|
||||
public boolean fog = false;
|
||||
/** If fog = true, this is whether static (black) fog is enabled. */
|
||||
|
||||
Reference in New Issue
Block a user