From 06d527a7ca89114570466b3dceeb6b0fe95daf89 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 31 Aug 2026 21:08:01 -0400 Subject: [PATCH] Generator explosion tweaks --- core/src/mindustry/content/Blocks.java | 5 +++-- .../mindustry/world/blocks/power/PowerGenerator.java | 12 +++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index b788b2c65f..a2672de9d6 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -2529,7 +2529,7 @@ public class Blocks{ explosionShake = 1f; explosionScorchSize = 1; - explosionIgnitionChance = 0.2f; + explosionFireballs = 3; consume(new ConsumeItemFlammable()); consume(new ConsumeItemExplode()); @@ -2563,7 +2563,7 @@ public class Blocks{ explosionShake = 1f; explosionScorchSize = 2; - explosionIgnitionChance = 0.2f; + explosionFireballs = 6; consume(new ConsumeItemFlammable()); consume(new ConsumeItemExplode()); @@ -2639,6 +2639,7 @@ public class Blocks{ explosionShake = 4f; explosionScorchSize = 8; explosionIgnitionChance = 0.5f; + explosionFireballs = 11; consumeItem(Items.thorium); consumeLiquid(Liquids.cryofluid, heating / coolantPower).update(false); diff --git a/core/src/mindustry/world/blocks/power/PowerGenerator.java b/core/src/mindustry/world/blocks/power/PowerGenerator.java index 20d59c6f59..d51b499ada 100644 --- a/core/src/mindustry/world/blocks/power/PowerGenerator.java +++ b/core/src/mindustry/world/blocks/power/PowerGenerator.java @@ -12,6 +12,7 @@ import mindustry.*; import mindustry.content.*; import mindustry.entities.*; import mindustry.entities.units.*; +import mindustry.game.*; import mindustry.gen.*; import mindustry.graphics.*; import mindustry.type.*; @@ -49,7 +50,9 @@ public class PowerGenerator extends PowerDistributor{ /** If true, the ignition chance decreases with distance. */ public boolean explosionScaleIgnitionChance = true; /** The speed at which ignition spreads. */ - public float explosionSpeed = 0.5f; + public float explosionSpeed = 0.4f; + /** Extra number of fireballs spawned from explosions. */ + public int explosionFireballs = 0; public PowerGenerator(String name){ super(name); @@ -163,6 +166,13 @@ public class PowerGenerator extends PowerDistributor{ }); } + if(explosionFireballs > 0){ + int amount = Mathf.random(1, explosionFireballs); + for(int i = 0; i < amount; i++){ + Bullets.fireball.createNet(Team.derelict, x, y, Mathf.random(360f), -1f, Mathf.random(0.5f, 1f), 1); + } + } + explodeEffect.at(this); explodeSound.at(this);