diff --git a/core/assets-raw/sprites/blocks/props/crystal-orbs-shadow1.png b/core/assets-raw/sprites/blocks/props/crystal-orbs-shadow1.png new file mode 100644 index 0000000000..dda2465db7 Binary files /dev/null and b/core/assets-raw/sprites/blocks/props/crystal-orbs-shadow1.png differ diff --git a/core/assets-raw/sprites/blocks/props/crystal-orbs-shadow2.png b/core/assets-raw/sprites/blocks/props/crystal-orbs-shadow2.png new file mode 100644 index 0000000000..b741caed9d Binary files /dev/null and b/core/assets-raw/sprites/blocks/props/crystal-orbs-shadow2.png differ diff --git a/core/assets-raw/sprites/blocks/props/crystal-orbs-shadow3.png b/core/assets-raw/sprites/blocks/props/crystal-orbs-shadow3.png new file mode 100644 index 0000000000..e3fe7e1d8c Binary files /dev/null and b/core/assets-raw/sprites/blocks/props/crystal-orbs-shadow3.png differ diff --git a/core/assets-raw/sprites/blocks/props/crystal-orbs1.png b/core/assets-raw/sprites/blocks/props/crystal-orbs1.png new file mode 100644 index 0000000000..e45c8e8f60 Binary files /dev/null and b/core/assets-raw/sprites/blocks/props/crystal-orbs1.png differ diff --git a/core/assets-raw/sprites/blocks/props/crystal-orbs2.png b/core/assets-raw/sprites/blocks/props/crystal-orbs2.png new file mode 100644 index 0000000000..04a98d7e5a Binary files /dev/null and b/core/assets-raw/sprites/blocks/props/crystal-orbs2.png differ diff --git a/core/assets-raw/sprites/blocks/props/crystal-orbs3.png b/core/assets-raw/sprites/blocks/props/crystal-orbs3.png new file mode 100644 index 0000000000..bad75c084f Binary files /dev/null and b/core/assets-raw/sprites/blocks/props/crystal-orbs3.png differ diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index aad46669c8..6767647f4b 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -561,7 +561,7 @@ requirement.research = Research {0} requirement.produce = Produce {0} requirement.capture = Capture {0} requirement.onplanet = Control Sector On {0} -requirement.onsector = Land On Sector {0} +requirement.onsector = Land On Sector: {0} launch.text = Launch research.multiplayer = Only the host can research items. map.multiplayer = Only the host can view sectors. diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index 1dc325a414..71b7f7ee54 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -516,3 +516,4 @@ 63187=red-dimaond-wall|block-red-dimaond-wall-ui 63186=red-stone-boulder|block-red-stone-boulder-ui 63185=red-diamond-wall|block-red-diamond-wall-ui +63184=crystal-orbs|block-crystal-orbs-ui diff --git a/core/assets/maps/aware.msav b/core/assets/maps/aware.msav new file mode 100644 index 0000000000..d6aaee0e68 Binary files /dev/null and b/core/assets/maps/aware.msav differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 0ca01fdfe9..541ad4bf3c 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -50,7 +50,7 @@ public class Blocks{ iceSnow, sandWater, darksandWater, duneWall, sandWall, moss, sporeMoss, shale, shaleWall, grass, salt, //boulders shaleBoulder, sandBoulder, daciteBoulder, boulder, snowBoulder, basaltBoulder, carbonBoulder, ferricBoulder, beryllicBoulder, yellowStoneBoulder, - arkyicBoulder, crystalCluster, vibrantCrystalCluster, crystalBlocks, crystallineBoulder, redIceBoulder, rhyoliteBoulder, redStoneBoulder, + arkyicBoulder, crystalCluster, vibrantCrystalCluster, crystalBlocks, crystalOrbs, crystallineBoulder, redIceBoulder, rhyoliteBoulder, redStoneBoulder, metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor4, metalFloor5, basalt, magmarock, hotrock, snowWall, saltWall, darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6, darkMetal, pebbles, tendrils, @@ -705,6 +705,13 @@ public class Blocks{ shadowOffset = -2.5f; }}; + crystalOrbs = new TallBlock("crystal-orbs"){{ + variants = 3; + clipSize = 128f; + shadowAlpha = 0.5f; + shadowOffset = -2.5f; + }}; + crystallineBoulder = new Prop("crystalline-boulder"){{ variants = 2; crystallineStone.asFloor().decoration = this; @@ -725,7 +732,6 @@ public class Blocks{ denseRedStone.asFloor().decoration = redStone.asFloor().decoration = this; }}; - metalFloor = new Floor("metal-floor", 0); metalFloorDamaged = new Floor("metal-floor-damaged", 3); diff --git a/core/src/mindustry/content/ErekirTechTree.java b/core/src/mindustry/content/ErekirTechTree.java index ec619e11c9..3f6e8e8720 100644 --- a/core/src/mindustry/content/ErekirTechTree.java +++ b/core/src/mindustry/content/ErekirTechTree.java @@ -11,6 +11,7 @@ import static mindustry.content.TechTree.*; public class ErekirTechTree{ public static void load(){ + //TODO might be unnecessary with no asteroids Seq erekirSector = Seq.with(new OnPlanet(Planets.erekir)); var costMultipliers = new ObjectFloatMap(); @@ -25,7 +26,7 @@ public class ErekirTechTree{ Planets.erekir.techTree = nodeRoot("erekir", coreBastion, true, () -> { context().researchCostMultipliers = costMultipliers; - node(duct, () -> { + node(duct, erekirSector, () -> { node(ductRouter, () -> { node(ductBridge, () -> { node(surgeConveyor, () -> { @@ -76,8 +77,7 @@ public class ErekirTechTree{ //TODO move into turbine condenser? node(plasmaBore, () -> { - - node(impactDrill, erekirSector, () -> { + node(impactDrill, Seq.with(new OnSector(aware)), () -> { node(largePlasmaBore, () -> { node(eruptionDrill, () -> { @@ -88,7 +88,7 @@ public class ErekirTechTree{ node(turbineCondenser, () -> { node(beamNode, () -> { - node(ventCondenser, erekirSector, () -> { + node(ventCondenser, Seq.with(new OnSector(aware)), () -> { node(chemicalCombustionChamber, () -> { node(pyrolysisGenerator, () -> { @@ -109,8 +109,9 @@ public class ErekirTechTree{ }); }); - node(reinforcedConduit, erekirSector, () -> { - node(reinforcedPump, () -> { + node(reinforcedConduit, () -> { + //TODO so should this be *on* or *complete*? + node(reinforcedPump, Seq.with(new SectorComplete(aware)), () -> { //TODO T2 pump }); @@ -131,7 +132,7 @@ public class ErekirTechTree{ node(siliconArcFurnace, () -> { node(cliffCrusher, () -> { - node(electrolyzer, erekirSector, () -> { + node(electrolyzer, () -> { node(oxidationChamber, () -> { node(electricHeater, () -> { node(heatRedirector, () -> { @@ -201,7 +202,9 @@ public class ErekirTechTree{ //TODO more sectors node(onset, () -> { + node(aware, Seq.with(new SectorComplete(onset), new Research(ductRouter)), () -> { + }); }); nodeProduce(Items.beryllium, () -> { diff --git a/core/src/mindustry/content/SectorPresets.java b/core/src/mindustry/content/SectorPresets.java index 25c1a187fc..8f20be8e7c 100644 --- a/core/src/mindustry/content/SectorPresets.java +++ b/core/src/mindustry/content/SectorPresets.java @@ -12,7 +12,7 @@ public class SectorPresets{ impact0078, desolateRift, nuclearComplex, planetaryTerminal, coastline, navalFortress, - onset + onset, aware ; public static void load(){ @@ -118,6 +118,11 @@ public class SectorPresets{ difficulty = 1; }}; + aware = new SectorPreset("aware", erekir, 88){{ + captureWave = 5; + difficulty = 3; + }}; + //endregion } } diff --git a/core/src/mindustry/editor/MapRenderer.java b/core/src/mindustry/editor/MapRenderer.java index 73eae4e683..367c40ccc7 100644 --- a/core/src/mindustry/editor/MapRenderer.java +++ b/core/src/mindustry/editor/MapRenderer.java @@ -115,15 +115,21 @@ public class MapRenderer implements Disposable{ boolean center = tile.isCenter(); boolean useSyntheticWall = wall.synthetic() || overlay.wallOre; - //draw synthetic wall or floor + //draw synthetic wall or floor OR standard wall if wall ore if(wall != Blocks.air && useSyntheticWall){ region = !center ? clearEditor : getIcon(wall, idxWall); - float width = region.width * Draw.scl, height = region.height * Draw.scl; + float width = region.width * Draw.scl, height = region.height * Draw.scl, ox = wall.offset + (tilesize - width) / 2f, oy = wall.offset + (tilesize - height) / 2f; + + //force fit to tile + if(overlay.wallOre && !wall.synthetic()){ + width = height = tilesize; + ox = oy = 0f; + } mesh.draw(idxWall, region, - wx * tilesize + wall.offset + (tilesize - width) / 2f, - wy * tilesize + wall.offset + (tilesize - height) / 2f, + wx * tilesize + ox, + wy * tilesize + oy, width, height, tile.build == null || !wall.rotate ? 0 : tile.build.rotdeg()); }else{ @@ -159,10 +165,8 @@ public class MapRenderer implements Disposable{ float width = region.width * Draw.scl, height = region.height * Draw.scl; if(!wall.synthetic() && wall != Blocks.air && !wall.isMultiblock()){ - offsetX = 0; - offsetY = 0; - width = tilesize; - height = tilesize; + offsetX = offsetY = 0f; + width = height = tilesize; } mesh.draw(idxDecal, region, wx * tilesize + offsetX, wy * tilesize + offsetY, width, height); diff --git a/core/src/mindustry/maps/generators/BasicGenerator.java b/core/src/mindustry/maps/generators/BasicGenerator.java index 73fb451d14..57cd4a583b 100644 --- a/core/src/mindustry/maps/generators/BasicGenerator.java +++ b/core/src/mindustry/maps/generators/BasicGenerator.java @@ -364,6 +364,20 @@ public abstract class BasicGenerator implements WorldGenerator{ return false; } + public void removeWall(int cx, int cy, int rad, Boolf pred){ + for(int x = -rad; x <= rad; x++){ + for(int y = -rad; y <= rad; y++){ + int wx = cx + x, wy = cy + y; + if(Structs.inBounds(wx, wy, width, height) && Mathf.within(x, y, rad)){ + Tile other = tiles.getn(wx, wy); + if(pred.get(other.block())){ + other.setBlock(Blocks.air); + } + } + } + } + } + public boolean near(int cx, int cy, int rad, Block block){ for(int x = -rad; x <= rad; x++){ for(int y = -rad; y <= rad; y++){ diff --git a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java index 2df53700b6..15228ff3ed 100644 --- a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java +++ b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java @@ -93,8 +93,6 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ position = Tmp.v32; - //TODO arkycite should NOT generate around slag. - //TODO tweak this to make it more natural //TODO edge distortion? if(ice < redThresh - noArkThresh && Ridged.noise3d(seed + arkSeed, position.x + 2f, position.y + 8f, position.z + 1f, arkOct, arkScl) > arkThresh){ @@ -104,7 +102,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ if(ice > redThresh){ result = Blocks.redStone; - }else if(ice > redThresh - 0.33f){ + }else if(ice > redThresh - 0.3f){ result = Blocks.regolith; } @@ -160,6 +158,9 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ cells(4); + //TODO: yellow regolith biome tweaks + //TODO: crystal biome + float length = width/3f; Vec2 trns = Tmp.v1.trns(rand.random(360f), length); int @@ -259,6 +260,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ }else if(block != Blocks.carbonWall && noise(x + 782, y, 4, 0.8f, 38f, 1f) > 0.665f){ ore = Blocks.wallOreBeryl; } + } }else if(!nearWall(x, y)){ @@ -280,12 +282,19 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ if(block == Blocks.air && (floor == Blocks.crystallineStone || floor == Blocks.crystalFloor) && rand.chance(0.09) && nearWall(x, y) && !near(x, y, 4, Blocks.crystalCluster) && !near(x, y, 4, Blocks.vibrantCrystalCluster)){ block = floor == Blocks.crystalFloor ? Blocks.vibrantCrystalCluster : Blocks.crystalCluster; + ore = Blocks.air; + } + + if(block == Blocks.arkyicWall && rand.chance(0.2) && nearAir(x, y) && !near(x, y, 3, Blocks.crystalOrbs)){ + block = Blocks.crystalOrbs; + ore = Blocks.air; } //TODO test, different placement //TODO this biome should have more blocks in general - if(block == Blocks.regolithWall && rand.chance(0.2) && nearAir(x, y) && !near(x, y, 3, Blocks.crystalBlocks)){ + if(block == Blocks.regolithWall && rand.chance(0.3) && nearAir(x, y) && !near(x, y, 3, Blocks.crystalBlocks)){ block = Blocks.crystalBlocks; + ore = Blocks.air; } //this is annoying as blocks under it can't be seen @@ -294,8 +303,17 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ //} }); + //remove props near ores, they're too annoying + //TODO for standard ores too maybe? + pass((x, y) -> { + if(ore.asFloor().wallOre || block.itemDrop != null){ + removeWall(x, y, 3, b -> b instanceof TallBlock); + } + }); + trimDark(); + //TODO vents everywhere! //vents outer: for(Tile tile : tiles){