Second map polish

This commit is contained in:
Anuken
2022-04-23 14:57:52 -04:00
parent 43aeb90eb9
commit fa8b94722e
9 changed files with 68 additions and 34 deletions

View File

@@ -20,7 +20,7 @@ public class MapObjectives{
public static Prov<MapObjective>[] allObjectiveTypes = new Prov[]{
ResearchObjective::new, BuildCountObjective::new, UnitCountObjective::new, ItemObjective::new,
CommandModeObjective::new, CoreItemObjective::new, DestroyCoreObjective::new, DestroyUnitsObjective::new,
TimerObjective::new, FlagObjective::new, DestroyBlockObjective::new
TimerObjective::new, FlagObjective::new, DestroyBlockObjective::new, ProduceObjective::new
};
public static Prov<ObjectiveMarker>[] allMarkerTypes = new Prov[]{
@@ -49,6 +49,28 @@ public class MapObjectives{
}
}
/** Produce a specific piece of content in the tech tree (essentially research with different text). */
public static class ProduceObjective extends MapObjective{
public UnlockableContent content = Items.copper;
public ProduceObjective(UnlockableContent content){
this.content = content;
}
public ProduceObjective(){
}
@Override
public String text(){
return Core.bundle.format("objective.produce", content.emoji(), content.localizedName);
}
@Override
public boolean complete(){
return content.unlocked();
}
}
/** Have a certain amount of item in your core. */
public static class ItemObjective extends MapObjective{
public Item item = Items.copper;
@@ -432,6 +454,12 @@ public class MapObjectives{
this.y = y;
}
public MinimapMarker(float x, float y, Color color){
this.x = x;
this.y = y;
this.color = color;
}
public MinimapMarker(){
}