diff --git a/core/src/mindustry/world/blocks/power/ImpactReactor.java b/core/src/mindustry/world/blocks/power/ImpactReactor.java index e2f3d41b18..3a03595b34 100644 --- a/core/src/mindustry/world/blocks/power/ImpactReactor.java +++ b/core/src/mindustry/world/blocks/power/ImpactReactor.java @@ -1,6 +1,7 @@ package mindustry.world.blocks.power; import arc.*; +import arc.audio.*; import arc.graphics.*; import arc.graphics.g2d.*; import arc.math.*; @@ -27,6 +28,7 @@ public class ImpactReactor extends PowerGenerator{ public int explosionRadius = 23; public int explosionDamage = 1900; public Effect explodeEffect = Fx.impactReactorExplosion; + public Sound explodeSound = Sounds.explosionbig; public Color plasma1 = Color.valueOf("ffd06b"), plasma2 = Color.valueOf("ff361b"); @@ -145,12 +147,11 @@ public class ImpactReactor extends PowerGenerator{ if(warmup < 0.3f || !state.rules.reactorExplosions) return; - Sounds.explosionbig.at(this); - Damage.damage(x, y, explosionRadius * tilesize, explosionDamage * 4); Effect.shake(6f, 16f, x, y); - explodeEffect.at(x, y); + explodeEffect.at(this); + explodeSound.at(this); } @Override diff --git a/core/src/mindustry/world/blocks/power/NuclearReactor.java b/core/src/mindustry/world/blocks/power/NuclearReactor.java index 01a0de88b6..f1c294bd09 100644 --- a/core/src/mindustry/world/blocks/power/NuclearReactor.java +++ b/core/src/mindustry/world/blocks/power/NuclearReactor.java @@ -1,6 +1,7 @@ package mindustry.world.blocks.power; import arc.*; +import arc.audio.*; import arc.graphics.*; import arc.graphics.g2d.*; import arc.math.*; @@ -30,6 +31,7 @@ public class NuclearReactor extends PowerGenerator{ public Color coolColor = new Color(1, 1, 1, 0f); public Color hotColor = Color.valueOf("ff9575a3"); public Effect explodeEffect = Fx.reactorExplosion; + public Sound explodeSound = Sounds.explosionbig; /** ticks to consume 1 fuel */ public float itemDuration = 120; /** heating per frame * fullness */ @@ -128,8 +130,6 @@ public class NuclearReactor extends PowerGenerator{ public void onDestroyed(){ super.onDestroyed(); - Sounds.explosionbig.at(this); - int fuel = items.get(fuelItem); if((fuel < 5 && heat < 0.5f) || !state.rules.reactorExplosions) return; @@ -138,7 +138,8 @@ public class NuclearReactor extends PowerGenerator{ // * ((float)fuel / itemCapacity) to scale based on fullness Damage.damage(x, y, explosionRadius * tilesize, explosionDamage * 4); - explodeEffect.at(x, y); + explodeEffect.at(this); + explodeSound.at(this); } @Override