diff --git a/core/assets-raw/sprites/blocks/environment/coralchunk-cluster0.png b/core/assets-raw/sprites/blocks/environment/coralchunk-cluster0.png deleted file mode 100644 index c4bb752bdf..0000000000 Binary files a/core/assets-raw/sprites/blocks/environment/coralchunk-cluster0.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/environment/coralchunk1.png b/core/assets-raw/sprites/blocks/environment/coralchunk1.png deleted file mode 100644 index 3596d0a5e6..0000000000 Binary files a/core/assets-raw/sprites/blocks/environment/coralchunk1.png and /dev/null differ diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index c26f50834b..1dc325a414 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -389,7 +389,6 @@ 63319=redweed|block-redweed-ui 63318=pur-bush|block-pur-bush-ui 63317=yellowcoral|block-yellowcoral-ui -63316=coralchunk|block-coralchunk-ui 63315=carbon-boulder|block-carbon-boulder-ui 63314=ferric-boulder|block-ferric-boulder-ui 63313=beryllic-boulder|block-beryllic-boulder-ui diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 06501850ee..077d2c2619 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -44,7 +44,7 @@ public class Blocks{ arkyciteFloor, arkyicStone, redmat, bluemat, stoneWall, dirtWall, sporeWall, iceWall, daciteWall, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster, - redweed, purbush, coralChunk, yellowCoral, + redweed, purbush, yellowCoral, regolithWall, yellowStoneWall, rhyoliteWall, steamVent, carbonWall, redIceWall, ferricStoneWall, beryllicStoneWall, arkyicWall, crystallineStoneWall, redStoneWall, redDiamondWall, ferricStone, ferricCraters, carbonStone, beryllicStone, crystallineStone, crystalFloor, yellowStonePlates, iceSnow, sandWater, darksandWater, duneWall, sandWall, moss, sporeMoss, shale, shaleWall, grass, salt, @@ -631,10 +631,6 @@ public class Blocks{ sclMax = 100f; }}; - coralChunk = new StaticCoralWall("coralchunk"){{ - - }}; - boulder = new Prop("boulder"){{ variants = 2; stone.asFloor().decoration = craters.asFloor().decoration = charr.asFloor().decoration = this; diff --git a/core/src/mindustry/content/ErekirTechTree.java b/core/src/mindustry/content/ErekirTechTree.java index ef60a72ba6..64bf774662 100644 --- a/core/src/mindustry/content/ErekirTechTree.java +++ b/core/src/mindustry/content/ErekirTechTree.java @@ -14,11 +14,11 @@ public class ErekirTechTree{ Seq erekirSector = Seq.with(new OnPlanet(Planets.erekir)); var costMultipliers = new ObjectFloatMap(); - costMultipliers.put(Items.silicon, 7); + costMultipliers.put(Items.silicon, 8); costMultipliers.put(Items.surgeAlloy, 4); costMultipliers.put(Items.phaseFabric, 4); - costMultipliers.put(Items.thorium, 8); - costMultipliers.put(Items.graphite, 6); + costMultipliers.put(Items.thorium, 9); + costMultipliers.put(Items.graphite, 9); Planets.erekir.techTree = nodeRoot("erekir", coreBastion, true, () -> { context().researchCostMultipliers = costMultipliers; @@ -71,6 +71,18 @@ public class ErekirTechTree{ }); }); + //TODO move into turbine condenser? + node(plasmaBore, () -> { + + node(impactDrill, erekirSector, () -> { + node(largePlasmaBore, () -> { + node(eruptionDrill, () -> { + + }); + }); + }); + }); + node(turbineCondenser, () -> { node(beamNode, () -> { node(ventCondenser, erekirSector, () -> { @@ -93,75 +105,63 @@ public class ErekirTechTree{ }); }); }); - }); - node(siliconArcFurnace, () -> { - node(cliffCrusher, () -> { - node(electrolyzer, erekirSector, () -> { - node(oxidationChamber, () -> { - node(electricHeater, () -> { - node(heatRedirector, () -> { + node(reinforcedConduit, erekirSector, () -> { + node(reinforcedPump, () -> { + //TODO T2 pump + }); + + node(reinforcedLiquidJunction, () -> { + node(reinforcedBridgeConduit, () -> { + + }); + + node(reinforcedLiquidRouter, () -> { + node(reinforcedLiquidContainer, () -> { + node(reinforcedLiquidTank, () -> { }); + }); + }); + }); + }); - node(atmosphericConcentrator, () -> { - node(cyanogenSynthesizer, () -> { + node(siliconArcFurnace, () -> { + node(cliffCrusher, () -> { + node(electrolyzer, erekirSector, () -> { + node(oxidationChamber, () -> { + node(electricHeater, () -> { + node(heatRedirector, () -> { }); - }); - node(carbideCrucible, () -> { - node(surgeCrucible, () -> { - node(phaseSynthesizer, () -> { - node(phaseHeater, () -> { + node(atmosphericConcentrator, () -> { + node(cyanogenSynthesizer, () -> { + }); + }); + + node(carbideCrucible, () -> { + node(surgeCrucible, () -> { + node(phaseSynthesizer, () -> { + node(phaseHeater, () -> { + + }); }); }); }); }); }); - }); - node(slagIncinerator, () -> { + node(slagIncinerator, () -> { - node(slagCentrifuge, () -> { + node(slagCentrifuge, () -> { - }); + }); - node(heatReactor, () -> { - - }); - }); - }); - }); - }); - - //TODO move into turbine condenser? - node(plasmaBore, () -> { - - node(impactDrill, erekirSector, () -> { - node(largePlasmaBore, () -> { - node(eruptionDrill, () -> { - - }); - }); - }); - }); - - node(reinforcedConduit, erekirSector, () -> { - node(reinforcedPump, () -> { - //TODO T2 pump - }); - - node(reinforcedLiquidJunction, () -> { - node(reinforcedBridgeConduit, () -> { - - }); - - node(reinforcedLiquidRouter, () -> { - node(reinforcedLiquidContainer, () -> { - node(reinforcedLiquidTank, () -> { + node(heatReactor, () -> { + }); }); }); }); diff --git a/core/src/mindustry/content/Planets.java b/core/src/mindustry/content/Planets.java index f3e45c83a0..caf7b1139d 100644 --- a/core/src/mindustry/content/Planets.java +++ b/core/src/mindustry/content/Planets.java @@ -57,12 +57,6 @@ public class Planets{ totalRadius += 2.6f; lightSrcTo = 0.5f; lightDstFrom = 0.2f; - - unlockedOnLand.addAll( - Blocks.plasmaBore, Blocks.duct, - Blocks.turbineCondenser, Blocks.breach, - Blocks.coreCitadel - ); }}; //TODO names diff --git a/core/src/mindustry/content/SerpuloTechTree.java b/core/src/mindustry/content/SerpuloTechTree.java index 504a0d2724..8603d2bed2 100644 --- a/core/src/mindustry/content/SerpuloTechTree.java +++ b/core/src/mindustry/content/SerpuloTechTree.java @@ -42,9 +42,7 @@ public class SerpuloTechTree{ node(titaniumConveyor, Seq.with(new SectorComplete(craters)), () -> { node(phaseConveyor, () -> { node(massDriver, () -> { - node(payloadPropulsionTower, () -> { - }); }); }); diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index e09491d0b1..c80d59aa17 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -2700,9 +2700,11 @@ public class UnitTypes{ outlineColor = Pal.darkOutline; lowAltitude = false; + mineWalls = true; + mineFloor = false; flying = true; - mineSpeed = 6.5f; - mineTier = 1; + mineSpeed = 4f; + mineTier = 4; buildSpeed = 0.8f; drag = 0.06f; speed = 2.9f; @@ -2758,9 +2760,11 @@ public class UnitTypes{ outlineColor = Pal.darkOutline; lowAltitude = false; flying = true; + mineWalls = true; targetAir = false; - mineSpeed = 8f; - mineTier = 2; + mineFloor = false; + mineSpeed = 5f; + mineTier = 4; buildSpeed = 1.4f; drag = 0.06f; speed = 2.8f; @@ -2816,8 +2820,10 @@ public class UnitTypes{ lowAltitude = false; flying = true; targetAir = false; - mineSpeed = 8f; - mineTier = 3; + mineWalls = true; + mineFloor = false; + mineSpeed = 6f; + mineTier = 4; buildSpeed = 2f; drag = 0.06f; speed = 2.6f; diff --git a/core/src/mindustry/editor/MapEditorDialog.java b/core/src/mindustry/editor/MapEditorDialog.java index 0fd6fcca25..0d714263bc 100644 --- a/core/src/mindustry/editor/MapEditorDialog.java +++ b/core/src/mindustry/editor/MapEditorDialog.java @@ -293,6 +293,12 @@ public class MapEditorDialog extends Dialog implements Disposable{ player.clearUnit(); + //remove player unit + Unit unit = Groups.unit.find(u -> u.spawnedByCore); + if(unit != null){ + unit.remove(); + } + Map returned = null; if(name.isEmpty()){ diff --git a/core/src/mindustry/entities/comp/MinerComp.java b/core/src/mindustry/entities/comp/MinerComp.java index 11f9b1af47..c9759b9c8a 100644 --- a/core/src/mindustry/entities/comp/MinerComp.java +++ b/core/src/mindustry/entities/comp/MinerComp.java @@ -23,7 +23,8 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{ transient float mineTimer; @Nullable @SyncLocal Tile mineTile; - public boolean canMine(Item item){ + public boolean canMine(@Nullable Item item){ + if(item == null) return false; return type.mineTier >= item.hardness; } @@ -35,9 +36,28 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{ return mineTile != null && !this.self().activelyBuilding(); } + public @Nullable Item getMineResult(@Nullable Tile tile){ + if(tile == null) return null; + Item result; + if(type.mineFloor && tile.block() == Blocks.air){ + result = tile.drop(); + }else if(type.mineWalls){ + result = tile.wallDrop(); + }else{ + return null; + } + + return canMine(result) ? result : null; + } + public boolean validMine(Tile tile, boolean checkDst){ - return !(tile == null || tile.block() != Blocks.air || (!within(tile.worldx(), tile.worldy(), type.miningRange) && checkDst) - || tile.drop() == null || !canMine(tile.drop())); + if(tile == null) return false; + + if(checkDst && !within(tile.worldx(), tile.worldy(), type.miningRange)){ + return false; + } + + return getMineResult(tile) != null; } public boolean validMine(Tile tile){ @@ -50,9 +70,12 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{ @Override public void update(){ - Building core = closestCore(); + if(mineTile == null) return; - if(core != null && mineTile != null && mineTile.drop() != null && !acceptsItem(mineTile.drop()) && within(core, mineTransferRange) && !offloadImmediately()){ + Building core = closestCore(); + Item item = getMineResult(mineTile); + + if(core != null && item != null && !acceptsItem(item) && within(core, mineTransferRange) && !offloadImmediately()){ int accepted = core.acceptStack(item(), stack().amount, this); if(accepted > 0){ Call.transferItemTo(self(), item(), accepted, @@ -65,8 +88,7 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{ if((!net.client() || isLocal()) && !validMine(mineTile)){ mineTile = null; mineTimer = 0f; - }else if(mining()){ - Item item = mineTile.drop(); + }else if(mining() && item != null){ mineTimer += Time.delta *type.mineSpeed; if(Mathf.chance(0.06 * Time.delta)){ diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index d8a580d212..1e501d7174 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -1048,11 +1048,9 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ boolean canMine(Tile tile){ return !Core.scene.hasMouse() - && tile.drop() != null && player.unit().validMine(tile) - && !((!Core.settings.getBool("doubletapmine") && tile.floor().playerUnmineable) && tile.overlay().itemDrop == null) - && player.unit().acceptsItem(tile.drop()) - && tile.block() == Blocks.air; + && player.unit().acceptsItem(player.unit().getMineResult(tile)) + && !((!Core.settings.getBool("doubletapmine") && tile.floor().playerUnmineable) && tile.overlay().itemDrop == null); } /** Returns the tile at the specified MOUSE coordinates. */ diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index a8e4fcc44e..33c730da97 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -127,6 +127,7 @@ public class UnitType extends UnlockableContent{ public int ammoCapacity = -1; public AmmoType ammoType = new ItemAmmoType(Items.copper); public int mineTier = -1; + public boolean mineWalls = false, mineFloor = true; public float buildSpeed = -1f, mineSpeed = 1f; public Sound mineSound = Sounds.minebeam; public float mineSoundVolume = 0.6f; diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index 9a8f21861e..8fc6120251 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -761,7 +761,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ } if(state.planet.hasGrid()){ - hovered = state.planet.getSector(planets.cam.getMouseRay(), PlanetRenderer.outlineRad); + hovered = Core.scene.getDialog() == this ? state.planet.getSector(planets.cam.getMouseRay(), PlanetRenderer.outlineRad) : null; }else if(state.planet.isLandable()){ boolean wasNull = selected == null; //always have the first sector selected.