mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-12 10:59:22 +07:00
Add Drill.drillEffectChance (for very fast drills) (#7704)
This commit is contained in:
parent
0ca33477d8
commit
d6fc4bfdb1
@ -50,6 +50,8 @@ public class Drill extends Block{
|
||||
public Effect drillEffect = Fx.mine;
|
||||
/** Drill effect randomness. Block size by default. */
|
||||
public float drillEffectRnd = -1f;
|
||||
/** Chance of displaying the effect. Useful for extremely fast drills. */
|
||||
public float drillEffectChance = 1f;
|
||||
/** Speed the drill bit rotates at. */
|
||||
public float rotateSpeed = 2f;
|
||||
/** Effect randomly played while drilling. */
|
||||
@ -306,7 +308,7 @@ public class Drill extends Block{
|
||||
|
||||
progress %= delay;
|
||||
|
||||
if(wasVisible) drillEffect.at(x + Mathf.range(drillEffectRnd), y + Mathf.range(drillEffectRnd), dominantItem.color);
|
||||
if(wasVisible && Mathf.chanceDelta(updateEffectChance * warmup)) drillEffect.at(x + Mathf.range(drillEffectRnd), y + Mathf.range(drillEffectRnd), dominantItem.color);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user