From fe4126a0ceff9cc683436aec69762ca1a87ac97e Mon Sep 17 00:00:00 2001 From: Slotterleet <62336673+Slotterleet@users.noreply.github.com> Date: Sun, 8 Sep 2024 17:48:11 +0300 Subject: [PATCH] Lumoni techtree additions & Surface Detonator rework --- src/fos/content/FOSBlocks.java | 5 +- src/fos/content/FOSItems.java | 1 + src/fos/content/LumoniTechTree.java | 67 +++++++++---------- .../type/blocks/special/SurfaceExplosive.java | 15 +++-- 4 files changed, 45 insertions(+), 43 deletions(-) diff --git a/src/fos/content/FOSBlocks.java b/src/fos/content/FOSBlocks.java index 564505d..747cafb 100644 --- a/src/fos/content/FOSBlocks.java +++ b/src/fos/content/FOSBlocks.java @@ -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; diff --git a/src/fos/content/FOSItems.java b/src/fos/content/FOSItems.java index da3f38d..41c3fbc 100644 --- a/src/fos/content/FOSItems.java +++ b/src/fos/content/FOSItems.java @@ -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")){{ diff --git a/src/fos/content/LumoniTechTree.java b/src/fos/content/LumoniTechTree.java index bbf57da..b208554 100644 --- a/src/fos/content/LumoniTechTree.java +++ b/src/fos/content/LumoniTechTree.java @@ -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, () -> { @@ -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, () -> { @@ -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, () -> @@ -266,8 +261,8 @@ public static void load() { nodeProduce(water, () -> { nodeProduce(tokicite, () -> {}); nodeProduce(arkycite, () -> { - soontm(); - //nodeProduce(oil, () -> {}); + nodeProduce(oil, () -> {}); + nodeProduce(nitrogen, () -> {}); }); }); diff --git a/src/fos/type/blocks/special/SurfaceExplosive.java b/src/fos/type/blocks/special/SurfaceExplosive.java index c8fd9a7..f3085b9 100644 --- a/src/fos/type/blocks/special/SurfaceExplosive.java +++ b/src/fos/type/blocks/special/SurfaceExplosive.java @@ -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; @@ -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.*; @@ -28,7 +29,7 @@ public class SurfaceExplosive extends Block { public Sound explosionSound = Sounds.explosionbig; public float explosionShake = 10f; public float damage = 2000f; - public Seq bannedFloors = Seq.with(arkyicStone, arkyciteFloor, tokiciteFloor, deepwater); + public Seq bannedFloors = Seq.with(arkyicStone, arkyciteFloor, tokiciteFloor, murmur, deepwater); public SurfaceExplosive(String name) { super(name); @@ -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