Upgradeable cores

This commit is contained in:
Anuken
2020-06-27 19:16:39 -04:00
parent 313cadb763
commit 80332e37d5
63 changed files with 365 additions and 290 deletions
+4 -4
View File
@@ -496,9 +496,9 @@ public class MobileInput extends InputHandler implements GestureListener{
}else{
Tile tile = tileAt(screenX, screenY);
if(tile == null || tile.entity == null) return false;
if(tile == null || tile.build == null) return false;
tryDropItems(tile.entity, Core.input.mouseWorld(screenX, screenY).x, Core.input.mouseWorld(screenX, screenY).y);
tryDropItems(tile.build, Core.input.mouseWorld(screenX, screenY).x, Core.input.mouseWorld(screenX, screenY).y);
}
return false;
}
@@ -542,7 +542,7 @@ public class MobileInput extends InputHandler implements GestureListener{
//ignore off-screen taps
if(cursor == null || Core.scene.hasMouse(x, y)) return false;
Tile linked = cursor.entity == null ? cursor : cursor.entity.tile();
Tile linked = cursor.build == null ? cursor : cursor.build.tile();
checkTargets(worldx, worldy);
@@ -555,7 +555,7 @@ public class MobileInput extends InputHandler implements GestureListener{
}else if(mode == breaking && validBreak(linked.x,linked.y) && !hasRequest(linked)){
//add to selection queue if it's a valid BREAK position
selectRequests.add(new BuildPlan(linked.x, linked.y));
}else if(!canTapPlayer(worldx, worldy) && !tileTapped(linked.entity)){
}else if(!canTapPlayer(worldx, worldy) && !tileTapped(linked.build)){
tryBeginMine(cursor);
}