Added random slopes, various bugfixes and balance fixes

This commit is contained in:
Anuken
2018-06-23 11:53:14 -04:00
parent f9947d2e53
commit a4edf827c8
19 changed files with 102 additions and 26 deletions

View File

@@ -156,7 +156,9 @@ public class DesktopInput extends InputHandler{
Tile cursor = tileAt(control.gdxInput().getX(), control.gdxInput().getY());
if(cursor != null){
if(player.isDead()){
cursorType = normal;
}else if(cursor != null){
cursor = cursor.target();
cursorType = cursor.block().getCursor(cursor);
@@ -197,7 +199,7 @@ public class DesktopInput extends InputHandler{
mode = placing;
} else {
//only begin shooting if there's no cursor event
if(!tileTapped(cursor) && player.getPlaceQueue().size == 0 && !tryTapPlayer(worldx, worldy) && !droppingItem &&
if(!tileTapped(cursor) && !tryTapPlayer(worldx, worldy) && player.getPlaceQueue().size == 0 && !droppingItem &&
!tryBeginMine(cursor) && player.getMineTile() == null){
CallEntity.setShooting(true);
}

View File

@@ -162,6 +162,7 @@ public abstract class InputHandler extends InputAdapter{
boolean canMine(Tile tile){
return tile.floor().drops != null && tile.floor().drops.item.hardness <= player.mech.drillPower
&& !tile.floor().playerUnmineable
&& player.inventory.canAcceptItem(tile.floor().drops.item)
&& tile.block() == Blocks.air && player.distanceTo(tile.worldx(), tile.worldy()) <= Player.mineDistance;
}