diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index cdf0a74b57..4c34d9d6bb 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -794,6 +794,7 @@ campaign.complete = [accent]Congratulations.\n\nThe enemy on {0} has been defeat sectorlist = Sectors sectorlist.attacked = {0} under attack sectors.unexplored = [lightgray]Unexplored +sectors.attempts = Attempts: sectors.resources = Resources: sectors.production = Production: sectors.export = Export: diff --git a/core/src/mindustry/core/Control.java b/core/src/mindustry/core/Control.java index e663f8c5d1..3a26a8d43f 100644 --- a/core/src/mindustry/core/Control.java +++ b/core/src/mindustry/core/Control.java @@ -536,6 +536,7 @@ public class Control implements ApplicationListener, Loadable{ state.rules.sector = sector; sector.info.origin = origin; sector.info.destination = origin; + sector.info.attempts ++; if(beforePlay != null){ beforePlay.run(); diff --git a/core/src/mindustry/game/SectorInfo.java b/core/src/mindustry/game/SectorInfo.java index dcb34e7eff..23f5e1bca5 100644 --- a/core/src/mindustry/game/SectorInfo.java +++ b/core/src/mindustry/game/SectorInfo.java @@ -59,6 +59,8 @@ public class SectorInfo{ public boolean attack = false; /** Whether this sector has any enemy spawns. */ public boolean hasSpawns = true; + /** How many times the player has tried to land at this sector with a fresh core. */ + public int attempts; /** Wave # from state */ public int wave = 1, winWave = -1; /** Waves this sector can survive if under attack. Based on wave in info. <0 means uncalculated. */ diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index a6c99837b9..1914a48cef 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -1036,6 +1036,10 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ c.add(Core.bundle.get("sectors.time") + " [accent]" + sector.save.getPlayTime()).left().row(); + if(sector.info.attempts > 0){ + c.add(Core.bundle.get("sectors.attempts") + " [accent]" + sector.info.attempts).left().row(); + } + if(sector.info.waves && sector.hasBase()){ c.add(Core.bundle.get("sectors.wave") + " [accent]" + (sector.info.wave + sector.info.wavesPassed)).left().row(); }