diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index bbdcc53e2b..b688bf4133 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -814,6 +814,7 @@ sectors.wave = Wave: sectors.stored = Stored: sectors.resume = Resume sectors.launch = Launch +sectors.nolaunchcandidate = No Launch Sector sectors.viewsubmission = \ue80d View Submission sectors.select = Select sectors.launchselect = Select Launch Destination diff --git a/core/assets/sounds/explosions/blockExplode3.ogg b/core/assets/sounds/explosions/blockExplode3.ogg index 554f6a4756..124d66b5eb 100644 Binary files a/core/assets/sounds/explosions/blockExplode3.ogg and b/core/assets/sounds/explosions/blockExplode3.ogg differ diff --git a/core/assets/sounds/explosions/blockExplodeExplosiveAlt.ogg b/core/assets/sounds/explosions/blockExplodeExplosiveAlt.ogg index a605f8e8f0..9b9c67e8ad 100644 Binary files a/core/assets/sounds/explosions/blockExplodeExplosiveAlt.ogg and b/core/assets/sounds/explosions/blockExplodeExplosiveAlt.ogg differ diff --git a/core/assets/sounds/explosions/blockExplodeFlammable.ogg b/core/assets/sounds/explosions/blockExplodeFlammable.ogg index 7c7c2185bf..bf5bbad0cb 100644 Binary files a/core/assets/sounds/explosions/blockExplodeFlammable.ogg and b/core/assets/sounds/explosions/blockExplodeFlammable.ogg differ diff --git a/core/assets/sounds/explosions/blockExplodeWall.ogg b/core/assets/sounds/explosions/blockExplodeWall.ogg index 9b6564e81c..ba38e5905e 100644 Binary files a/core/assets/sounds/explosions/blockExplodeWall.ogg and b/core/assets/sounds/explosions/blockExplodeWall.ogg differ diff --git a/core/assets/sounds/loops/loopCircuit.ogg b/core/assets/sounds/loops/loopCircuit.ogg index 7928117498..02ffe8ac69 100644 Binary files a/core/assets/sounds/loops/loopCircuit.ogg and b/core/assets/sounds/loops/loopCircuit.ogg differ diff --git a/core/assets/sounds/movement/mechStep.ogg b/core/assets/sounds/movement/mechStep.ogg index f9e6f2e9fe..dcc4342b25 100644 Binary files a/core/assets/sounds/movement/mechStep.ogg and b/core/assets/sounds/movement/mechStep.ogg differ diff --git a/core/assets/sounds/movement/mechStepHeavy.ogg b/core/assets/sounds/movement/mechStepHeavy.ogg index 119028de7e..7ed118c80c 100644 Binary files a/core/assets/sounds/movement/mechStepHeavy.ogg and b/core/assets/sounds/movement/mechStepHeavy.ogg differ diff --git a/core/assets/sounds/movement/mechStepSmall.ogg b/core/assets/sounds/movement/mechStepSmall.ogg index 1a91fc7d11..41e5544f29 100644 Binary files a/core/assets/sounds/movement/mechStepSmall.ogg and b/core/assets/sounds/movement/mechStepSmall.ogg differ diff --git a/core/assets/sounds/movement/shipMove.ogg b/core/assets/sounds/movement/shipMove.ogg index 3df2c3e0c8..5cef76bc3b 100644 Binary files a/core/assets/sounds/movement/shipMove.ogg and b/core/assets/sounds/movement/shipMove.ogg differ diff --git a/core/assets/sounds/movement/shipMoveBig.ogg b/core/assets/sounds/movement/shipMoveBig.ogg index dfb9b6da2a..d741e42396 100644 Binary files a/core/assets/sounds/movement/shipMoveBig.ogg and b/core/assets/sounds/movement/shipMoveBig.ogg differ diff --git a/core/assets/sounds/movement/tankMove.ogg b/core/assets/sounds/movement/tankMove.ogg index 41115a5090..56deb4f63c 100644 Binary files a/core/assets/sounds/movement/tankMove.ogg and b/core/assets/sounds/movement/tankMove.ogg differ diff --git a/core/assets/sounds/movement/tankMoveHeavy.ogg b/core/assets/sounds/movement/tankMoveHeavy.ogg index 8152305d2e..eb011a5489 100644 Binary files a/core/assets/sounds/movement/tankMoveHeavy.ogg and b/core/assets/sounds/movement/tankMoveHeavy.ogg differ diff --git a/core/assets/sounds/movement/walkerStep.ogg b/core/assets/sounds/movement/walkerStep.ogg index 877b97b7b9..20ec2161e6 100644 Binary files a/core/assets/sounds/movement/walkerStep.ogg and b/core/assets/sounds/movement/walkerStep.ogg differ diff --git a/core/assets/sounds/movement/walkerStepSmall.ogg b/core/assets/sounds/movement/walkerStepSmall.ogg index 3c63c64222..6703c77238 100644 Binary files a/core/assets/sounds/movement/walkerStepSmall.ogg and b/core/assets/sounds/movement/walkerStepSmall.ogg differ diff --git a/core/assets/sounds/movement/walkerStepTiny.ogg b/core/assets/sounds/movement/walkerStepTiny.ogg index d05992beef..47df462f3a 100644 Binary files a/core/assets/sounds/movement/walkerStepTiny.ogg and b/core/assets/sounds/movement/walkerStepTiny.ogg differ diff --git a/core/src/mindustry/maps/generators/PlanetGenerator.java b/core/src/mindustry/maps/generators/PlanetGenerator.java index 61a5a0ff8f..1975ea3ae4 100644 --- a/core/src/mindustry/maps/generators/PlanetGenerator.java +++ b/core/src/mindustry/maps/generators/PlanetGenerator.java @@ -69,25 +69,24 @@ public abstract class PlanetGenerator extends BasicGenerator implements HexMeshe } //currently played (selected) sector has all the resources - if(selected != null && selected.planet == destination.planet && selected.hasBase() && selected.items().has(tmpItems)){ + if(selected != null && selected.planet == destination.planet && selected.hasBase() && selected.items().has(tmpItems) && !selected.isAttacked()){ return selected; }else{ //find the closest sector that has resources (ranked by distance, not item quantity) - return destination.planet.sectors.min(s -> s.hasBase() && s.items().has(tmpItems), s -> s.tile.v.dst(destination.tile.v)); + return destination.planet.sectors.min(s -> s.hasBase() && !s.isAttacked() && s.items().has(tmpItems), s -> s.tile.v.dst(destination.tile.v)); } }else{ - Sector launchSector = selected != null && selected.planet == destination.planet && selected.hasBase() ? selected : null; + Sector launchSector = selected != null && selected.planet == destination.planet && selected.hasBase() && !selected.isAttacked() ? selected : null; //directly nearby. if(destination.near().contains(launchSector)) return launchSector; Sector launchFrom = launchSector; if(launchFrom == null || destination.preset == null){ //TODO pick one with the most resources - launchFrom = destination.near().find(Sector::hasBase); + launchFrom = destination.near().find(s -> s.hasBase() && !s.isAttacked()); if(launchFrom == null && destination.preset != null){ if(launchSector != null) return launchSector; - launchFrom = destination.planet.sectors.min(s -> !s.hasBase() ? Float.MAX_VALUE : s.tile.v.dst2(destination.tile.v)); - if(!launchFrom.hasBase()) launchFrom = null; + launchFrom = destination.planet.sectors.min(s -> s.hasBase() && !s.isAttacked(), s -> s.tile.v.dst2(destination.tile.v)); } } diff --git a/core/src/mindustry/maps/planet/SerpuloPlanetGenerator.java b/core/src/mindustry/maps/planet/SerpuloPlanetGenerator.java index ee1d97202a..21dd664940 100644 --- a/core/src/mindustry/maps/planet/SerpuloPlanetGenerator.java +++ b/core/src/mindustry/maps/planet/SerpuloPlanetGenerator.java @@ -88,7 +88,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{ } public boolean allowNumberedLaunch(Sector s){ - return s.hasBase() && (s.info.bestCoreType.size >= 4 || s.isBeingPlayed() && state.rules.defaultTeam.cores().contains(b -> b.block.size >= 4)); + return s.hasBase() && !s.isAttacked() && (s.info.bestCoreType.size >= 4 || s.isBeingPlayed() && state.rules.defaultTeam.cores().contains(b -> b.block.size >= 4)); } @Override diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index 4f73a47695..9ea968aa91 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -434,7 +434,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ if(mode == planetLaunch || to.planet.generator == null) return launchSector; Sector candidate = to.planet.generator.findLaunchCandidate(to, launchSector); - return candidate == null ? launchSector : candidate; + return candidate == null && launchSector != null && (mode == planetLaunch || !launchSector.isAttacked()) ? launchSector : candidate; } boolean showing(){ @@ -1316,12 +1316,16 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ } } + boolean noCandidate = sector != sector.planet.getStartSector() && !sector.hasBase() && findLauncher(sector) == null; + stable.button( mode == select ? "@sectors.select" : sector.isBeingPlayed() ? "@sectors.resume" : sector.hasBase() ? "@sectors.go" : - locked ? "@locked" : "@sectors.launch", - locked ? Icon.lock : Icon.play, this::playSelected).growX().height(54f).minWidth(170f).padTop(4).disabled(locked); + locked ? "@locked" : + noCandidate ? "@sectors.nolaunchcandidate" : + "@sectors.launch", + locked ? Icon.lock : Icon.play, this::playSelected).growX().height(54f).minWidth(170f).padTop(4).disabled(locked || noCandidate); } stable.pack();