This commit is contained in:
Anuken 2024-10-04 14:13:17 -04:00
parent 2112c5c654
commit 2ad1044d73

View File

@ -1674,7 +1674,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
/** Tries to begin mining a tile, returns true if successful. */
boolean tryBeginMine(Tile tile){
if(canMine(tile)){
if(!player.dead() && canMine(tile)){
player.unit().mineTile = tile;
return true;
}
@ -1683,7 +1683,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
/** Tries to stop mining, returns true if mining was stopped. */
boolean tryStopMine(){
if(player.unit().mining()){
if(!player.dead() && player.unit().mining()){
player.unit().mineTile = null;
return true;
}
@ -1691,7 +1691,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
}
boolean tryStopMine(Tile tile){
if(player.unit().mineTile == tile){
if(!player.dead() && player.unit().mineTile == tile){
player.unit().mineTile = null;
return true;
}