Beryllium floor ore

This commit is contained in:
Anuken
2022-02-18 15:40:17 -05:00
parent f9c0065a99
commit 406d2b949b
8 changed files with 24 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

View File

@@ -544,3 +544,4 @@
63159=core-zone|block-core-zone-ui 63159=core-zone|block-core-zone-ui
63158=fabricator|block-fabricator-ui 63158=fabricator|block-fabricator-ui
63157=stell|unit-stell-ui 63157=stell|unit-stell-ui
63156=ore-beryllium|block-ore-beryllium-ui

View File

@@ -1,6 +1,8 @@
package mindustry.ai.types; package mindustry.ai.types;
import arc.math.*;
import arc.math.geom.*; import arc.math.geom.*;
import arc.struct.*;
import arc.util.*; import arc.util.*;
import mindustry.*; import mindustry.*;
import mindustry.ai.*; import mindustry.ai.*;
@@ -9,12 +11,14 @@ import mindustry.gen.*;
import mindustry.world.*; import mindustry.world.*;
public class CommandAI extends AIController{ 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 Vec2 targetPos;
public @Nullable Teamc attackTarget; public @Nullable Teamc attackTarget;
private int pathId = -1; private int pathId = -1;
private Seq<Unit> local = new Seq<>(false);
@Override @Override
public void updateUnit(){ public void updateUnit(){
@@ -26,6 +30,17 @@ public class CommandAI extends AIController{
targetPos = null; 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(attackTarget != null){
if(targetPos == null) targetPos = new Vec2(); if(targetPos == null) targetPos = new Vec2();
targetPos.set(attackTarget); targetPos.set(attackTarget);

View File

@@ -60,10 +60,10 @@ public class Blocks{
//ores //ores
oreCopper, oreLead, oreScrap, oreCoal, oreTitanium, oreThorium, oreCopper, oreLead, oreScrap, oreCoal, oreTitanium, oreThorium,
oreTungsten, oreCrystalThorium, wallOreThorium, oreBeryllium, oreTungsten, oreCrystalThorium, wallOreThorium,
//wall ores //wall ores
wallOreBeryl, graphiticWall, wallOreTungsten, wallOreBeryllium, graphiticWall, wallOreTungsten,
//crafting //crafting
siliconSmelter, siliconCrucible, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer, siliconSmelter, siliconCrucible, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer,
@@ -823,6 +823,8 @@ public class Blocks{
oreScale = 25.380953f; oreScale = 25.380953f;
}}; }};
oreBeryllium = new OreBlock(Items.beryllium);
oreTungsten = new OreBlock(Items.tungsten); oreTungsten = new OreBlock(Items.tungsten);
oreCrystalThorium = new OreBlock("ore-crystal-thorium", Items.thorium); oreCrystalThorium = new OreBlock("ore-crystal-thorium", Items.thorium);
@@ -831,7 +833,7 @@ public class Blocks{
wallOre = true; wallOre = true;
}}; }};
wallOreBeryl = new OreBlock("ore-wall-beryllium", Items.beryllium){{ wallOreBeryllium = new OreBlock("ore-wall-beryllium", Items.beryllium){{
wallOre = true; wallOre = true;
}}; }};

View File

@@ -116,7 +116,7 @@ public class AsteroidGenerator extends BlankPlanetGenerator{
wallOre(Blocks.carbonWall, Blocks.graphiticWall, 35f, 0.57f * graphiteScale); 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 //titanium
pass((x, y) -> { pass((x, y) -> {

View File

@@ -277,7 +277,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
if(block == Blocks.carbonWall && noise(x + 78, y, 4, 0.7f, 33f, 1f) > 0.52f){ if(block == Blocks.carbonWall && noise(x + 78, y, 4, 0.7f, 33f, 1f) > 0.52f){
block = Blocks.graphiticWall; block = Blocks.graphiticWall;
}else if(block != Blocks.carbonWall && noise(x + 782, y, 4, 0.8f, 38f, 1f) > 0.665f){ }else if(block != Blocks.carbonWall && noise(x + 782, y, 4, 0.8f, 38f, 1f) > 0.665f){
ore = Blocks.wallOreBeryl; ore = Blocks.wallOreBeryllium;
} }
} }