mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-03-15 03:11:07 -07:00
Beryllium floor ore
This commit is contained in:
parent
f9c0065a99
commit
406d2b949b
8 changed files with 24 additions and 6 deletions
BIN
core/assets-raw/sprites/blocks/environment/ore-beryllium1.png
Normal file
BIN
core/assets-raw/sprites/blocks/environment/ore-beryllium1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 301 B |
BIN
core/assets-raw/sprites/blocks/environment/ore-beryllium2.png
Normal file
BIN
core/assets-raw/sprites/blocks/environment/ore-beryllium2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 328 B |
BIN
core/assets-raw/sprites/blocks/environment/ore-beryllium3.png
Normal file
BIN
core/assets-raw/sprites/blocks/environment/ore-beryllium3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 273 B |
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue