diff --git a/core/assets-raw/sprites/blocks/environment/ore-beryllium1.png b/core/assets-raw/sprites/blocks/environment/ore-beryllium1.png new file mode 100644 index 0000000000..2cadc169ad Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/ore-beryllium1.png differ diff --git a/core/assets-raw/sprites/blocks/environment/ore-beryllium2.png b/core/assets-raw/sprites/blocks/environment/ore-beryllium2.png new file mode 100644 index 0000000000..8f1d546d2c Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/ore-beryllium2.png differ diff --git a/core/assets-raw/sprites/blocks/environment/ore-beryllium3.png b/core/assets-raw/sprites/blocks/environment/ore-beryllium3.png new file mode 100644 index 0000000000..a037c879de Binary files /dev/null and b/core/assets-raw/sprites/blocks/environment/ore-beryllium3.png differ diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index 42c465dcf0..9237ae8fa7 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -544,3 +544,4 @@ 63159=core-zone|block-core-zone-ui 63158=fabricator|block-fabricator-ui 63157=stell|unit-stell-ui +63156=ore-beryllium|block-ore-beryllium-ui diff --git a/core/src/mindustry/ai/types/CommandAI.java b/core/src/mindustry/ai/types/CommandAI.java index ee85c18074..2e59927e7b 100644 --- a/core/src/mindustry/ai/types/CommandAI.java +++ b/core/src/mindustry/ai/types/CommandAI.java @@ -1,6 +1,8 @@ package mindustry.ai.types; +import arc.math.*; import arc.math.geom.*; +import arc.struct.*; import arc.util.*; import mindustry.*; import mindustry.ai.*; @@ -9,12 +11,14 @@ import mindustry.gen.*; import mindustry.world.*; public class CommandAI extends AIController{ - static Vec2 vecOut = new Vec2(); + private static final float localInterval = 30f; + private static final Vec2 vecOut = new Vec2(); public @Nullable Vec2 targetPos; public @Nullable Teamc attackTarget; private int pathId = -1; + private Seq local = new Seq<>(false); @Override public void updateUnit(){ @@ -26,6 +30,17 @@ public class CommandAI extends AIController{ targetPos = null; } + if(targetPos != null){ + if(timer.get(timerTarget3, localInterval)){ + local.clear(); + float size = unit.hitSize * 3f; + unit.team.data().tree().intersect(unit.x - size / 2f, unit.y - size/2f, size, size, local); + } + }else{ + //make sure updates are staggered randomly + timer.reset(timerTarget3, Mathf.random(localInterval)); + } + if(attackTarget != null){ if(targetPos == null) targetPos = new Vec2(); targetPos.set(attackTarget); diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index b68aff3c3d..2f815b6cf2 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -60,10 +60,10 @@ public class Blocks{ //ores oreCopper, oreLead, oreScrap, oreCoal, oreTitanium, oreThorium, - oreTungsten, oreCrystalThorium, wallOreThorium, + oreBeryllium, oreTungsten, oreCrystalThorium, wallOreThorium, //wall ores - wallOreBeryl, graphiticWall, wallOreTungsten, + wallOreBeryllium, graphiticWall, wallOreTungsten, //crafting siliconSmelter, siliconCrucible, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer, @@ -823,6 +823,8 @@ public class Blocks{ oreScale = 25.380953f; }}; + oreBeryllium = new OreBlock(Items.beryllium); + oreTungsten = new OreBlock(Items.tungsten); oreCrystalThorium = new OreBlock("ore-crystal-thorium", Items.thorium); @@ -831,7 +833,7 @@ public class Blocks{ wallOre = true; }}; - wallOreBeryl = new OreBlock("ore-wall-beryllium", Items.beryllium){{ + wallOreBeryllium = new OreBlock("ore-wall-beryllium", Items.beryllium){{ wallOre = true; }}; diff --git a/core/src/mindustry/maps/planet/AsteroidGenerator.java b/core/src/mindustry/maps/planet/AsteroidGenerator.java index 09112f83f3..959d1564e5 100644 --- a/core/src/mindustry/maps/planet/AsteroidGenerator.java +++ b/core/src/mindustry/maps/planet/AsteroidGenerator.java @@ -116,7 +116,7 @@ public class AsteroidGenerator extends BlankPlanetGenerator{ wallOre(Blocks.carbonWall, Blocks.graphiticWall, 35f, 0.57f * graphiteScale); - wallOre(Blocks.beryllicStoneWall, Blocks.wallOreBeryl, 50f, 0.62f * berylliumScale); + wallOre(Blocks.beryllicStoneWall, Blocks.wallOreBeryllium, 50f, 0.62f * berylliumScale); //titanium pass((x, y) -> { diff --git a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java index fa207636f2..7c606678e7 100644 --- a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java +++ b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java @@ -277,7 +277,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ if(block == Blocks.carbonWall && noise(x + 78, y, 4, 0.7f, 33f, 1f) > 0.52f){ block = Blocks.graphiticWall; }else if(block != Blocks.carbonWall && noise(x + 782, y, 4, 0.8f, 38f, 1f) > 0.665f){ - ore = Blocks.wallOreBeryl; + ore = Blocks.wallOreBeryllium; } }