diff --git a/core/src/mindustry/world/blocks/production/Drill.java b/core/src/mindustry/world/blocks/production/Drill.java index 407b2715d0..9ee6eb8e6d 100644 --- a/core/src/mindustry/world/blocks/production/Drill.java +++ b/core/src/mindustry/world/blocks/production/Drill.java @@ -46,6 +46,8 @@ public class Drill extends Block{ public boolean drawMineItem = true; /** Effect played when an item is produced. This is colored. */ public Effect drillEffect = Fx.mine; + /** Drill effect randomness. Block size by default. */ + public float drillEffectRnd = -1f; /** Speed the drill bit rotates at. */ public float rotateSpeed = 2f; /** Effect randomly played while drilling. */ @@ -73,6 +75,12 @@ public class Drill extends Block{ ambientSoundVolume = 0.018f; } + @Override + public void init(){ + super.init(); + if(drillEffectRnd < 0) drillEffectRnd = size; + } + @Override public void drawRequestConfigTop(BuildPlan req, Eachable list){ if(!req.worldContext) return; @@ -285,7 +293,7 @@ public class Drill extends Block{ progress %= delay; - drillEffect.at(x + Mathf.range(size), y + Mathf.range(size), dominantItem.color); + drillEffect.at(x + Mathf.range(drillEffectRnd), y + Mathf.range(drillEffectRnd), dominantItem.color); } }