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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user