mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-26 22:42:41 -08:00
Enable mining of sand when double click to mine is enabled (#4788)
* Sand mineable with double click to mine enabled Since the only reason sand is un-mineable in the first place is because accidentally mining it is annoying, it should be enabled for double click to mine. * only show sand as mineable when double click mine is enabled Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
parent
d89a1fac70
commit
53214f0ddc
2 changed files with 2 additions and 2 deletions
|
|
@ -1027,7 +1027,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
return !Core.scene.hasMouse()
|
||||
&& tile.drop() != null
|
||||
&& player.unit().validMine(tile)
|
||||
&& !(tile.floor().playerUnmineable && tile.overlay().itemDrop == null)
|
||||
&& !((!Core.settings.getBool("doubletapmine") && tile.floor().playerUnmineable) && tile.overlay().itemDrop == null)
|
||||
&& player.unit().acceptsItem(tile.drop())
|
||||
&& tile.block() == Blocks.air;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ public class UnitType extends UnlockableContent{
|
|||
|
||||
if(mineTier >= 1){
|
||||
stats.addPercent(Stat.mineSpeed, mineSpeed);
|
||||
stats.add(Stat.mineTier, StatValues.blocks(b -> b instanceof Floor f && f.itemDrop != null && f.itemDrop.hardness <= mineTier && !f.playerUnmineable));
|
||||
stats.add(Stat.mineTier, StatValues.blocks(b -> b instanceof Floor f && f.itemDrop != null && f.itemDrop.hardness <= mineTier && (!f.playerUnmineable || Core.settings.getBool("doubletapmine"))));
|
||||
}
|
||||
if(buildSpeed > 0){
|
||||
stats.addPercent(Stat.buildSpeed, buildSpeed);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue