Skip to content

Commit

Permalink
Lumoni techtree additions & Surface Detonator rework
Browse files Browse the repository at this point in the history
  • Loading branch information
Slotterleet committed Sep 8, 2024
1 parent 91d081e commit fe4126a
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 43 deletions.
5 changes: 4 additions & 1 deletion src/fos/content/FOSBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -2135,7 +2135,10 @@ public void setBars() {
surfaceDetonator = new SurfaceExplosive("surface-detonator"){{
health = 160;
size = 3;
requirements(Category.effect, with(diamond, 100, brass, 75, vanadium, 100)); // TODO: temporary recipe
hasItems = true;
itemCapacity = 15;
consumeItem(sulphur, 15);
requirements(Category.effect, with(diamond, 50, brass, 50, vanadium, 50));
}};
orbitalAccelerator = new OrbitalAccelerator("orbital-accelerator"){{
health = 5000;
Expand Down
1 change: 1 addition & 0 deletions src/fos/content/FOSItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public static void load(){
}};
sulphur = new Item("sulphur", Color.valueOf("f0b454")){{
flammability = 0.6f;
explosiveness = 0.4f;
cost = 0.5f;
}};
cuberium = new Item("cuberium", Color.valueOf("855992")){{
Expand Down
67 changes: 31 additions & 36 deletions src/fos/content/LumoniTechTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,29 +98,6 @@ public static void load() {
soontm();
});

// DRILLS
node(crudeDrill, () -> {
node(improvedDrill, Seq.with(new OnSector(ruins)), () -> {
node(draugFactory, Seq.with(new SectorComplete(zincMiningSite)), () ->
node(draug, ItemStack.with(), Seq.with(new Research(draugFactory)), () -> {})
);
soontm();
/*
node(proficientDrill));
*/
});
});

// UNDERGROUND DRILLS
node(zincDrill, () ->
node(silverDrill, () -> {
node(diamondDrill, Seq.with(new OnSector(intruders)), () -> {
node(surfaceDetonator);
soontm();
});
})
);

// DEFENCE
node(helix, Seq.with(new OnSector(ruins)), () -> {
node(sticker, () -> {
Expand Down Expand Up @@ -148,7 +125,30 @@ public static void load() {
});
});

// FLUIDS
// DRILLS
node(crudeDrill, () -> {
node(improvedDrill, Seq.with(new OnSector(ruins)), () -> {
node(draugFactory, Seq.with(new SectorComplete(zincMiningSite)), () ->
node(draug, ItemStack.with(), Seq.with(new Research(draugFactory)), () -> {})
);
soontm();
/*
node(proficientDrill));
*/
});
});

// UNDERGROUND DRILLS
node(zincDrill, () ->
node(silverDrill, () -> {
node(diamondDrill, Seq.with(new OnSector(intruders)), () -> {
node(surfaceDetonator);
soontm();
});
})
);

// FLUID BLOCKS
node(pneumaticPump, () -> {
node(pumpjack);
node(copperPipe, () -> {
Expand Down Expand Up @@ -243,18 +243,13 @@ public static void load() {
nodeProduce(silver, () ->
nodeProduce(diamond, () -> {
nodeProduce(silicon, () -> {});
nodeProduce(vanadium, () ->
soontm()
/*
nodeProduce(nickel, () ->
nodeProduce(luminium, () -> {})
)
*/
);
soontm();
nodeProduce(vanadium, () -> {
nodeProduce(sulphur, Seq.with(new Research(arkyciteRefinery)), () -> {});
soontm();
/*
nodeProduce(sulphur, Seq.with(new Research(arkyciteRefinery)), () -> {});
nodeProduce(nickel)
*/
});
})
);
nodeProduce(copper, () ->
Expand All @@ -266,8 +261,8 @@ public static void load() {
nodeProduce(water, () -> {
nodeProduce(tokicite, () -> {});
nodeProduce(arkycite, () -> {
soontm();
//nodeProduce(oil, () -> {});
nodeProduce(oil, () -> {});
nodeProduce(nitrogen, () -> {});
});
});

Expand Down
15 changes: 9 additions & 6 deletions src/fos/type/blocks/special/SurfaceExplosive.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import arc.audio.Sound;
import arc.graphics.Color;
import arc.graphics.g2d.Draw;
import arc.math.Mathf;
import arc.math.geom.*;
import arc.struct.Seq;
Expand All @@ -16,7 +17,7 @@
import mindustry.ui.Fonts;
import mindustry.world.*;

import static fos.content.FOSBlocks.tokiciteFloor;
import static fos.content.FOSBlocks.*;
import static mindustry.Vars.*;
import static mindustry.content.Blocks.*;

Expand All @@ -28,7 +29,7 @@ public class SurfaceExplosive extends Block {
public Sound explosionSound = Sounds.explosionbig;
public float explosionShake = 10f;
public float damage = 2000f;
public Seq<Block> bannedFloors = Seq.with(arkyicStone, arkyciteFloor, tokiciteFloor, deepwater);
public Seq<Block> bannedFloors = Seq.with(arkyicStone, arkyciteFloor, tokiciteFloor, murmur, deepwater);

public SurfaceExplosive(String name) {
super(name);
Expand Down Expand Up @@ -70,16 +71,18 @@ public class SurfaceExplosiveBuild extends Building {
public void draw() {
super.draw();

Fonts.def.draw(Strings.fixed(Mathf.ceil(counter / 60f), 0), x, y + 2, Pal.redSpark, 0.2f, false, Align.center);
Draw.z(Layer.endPixeled);
if (counter < 180f)
Fonts.def.draw(Strings.fixed(Mathf.ceil(counter / 60f), 0), x, y + 2, Pal.redSpark, 0.2f, false, Align.center);
}

@Override
public void updateTile() {
if (counter <= 0) {
if (counter <= 0)
detonate();
}

counter -= Time.delta;
if (canConsume())
counter -= Time.delta;
}

// hard-coded for now
Expand Down

0 comments on commit fe4126a

Please sign in to comment.