Beryllium floor ore
This commit is contained in:
@@ -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<Unit> 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);
|
||||
|
||||
@@ -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;
|
||||
}};
|
||||
|
||||
|
||||
@@ -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) -> {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user