1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-21 21:38:29 +03:00

Crash/visual fixes

This commit is contained in:
Anuken 2019-03-21 15:37:36 -04:00
parent 83a5a82e18
commit 8413046dd8
5 changed files with 7 additions and 9 deletions

View File

@ -241,7 +241,7 @@ public abstract class InputHandler implements InputProcessor{
boolean canMine(Tile tile){
return !Core.scene.hasMouse()
&& tile.drop() != null && tile.drop().hardness <= player.mech.drillPower
&& !tile.floor().playerUnmineable
&& !(tile.floor().playerUnmineable && tile.ore() == Blocks.air)
&& player.acceptsItem(tile.drop())
&& tile.block() == Blocks.air && player.dst(tile.worldx(), tile.worldy()) <= Player.mineDistance;
}

View File

@ -365,7 +365,7 @@ public class MobileInput extends InputHandler implements GestureListener{
if(!request.remove && request == lastPlaced && request.block != null){
Draw.mixcol();
drawArrow(request.block, tile.x, tile.y, request.rotation);
if(request.block.rotate) drawArrow(request.block, tile.x, tile.y, request.rotation);
}
Draw.mixcol(Tmp.c1, 1f);

View File

@ -143,6 +143,10 @@ public class Block extends BlockStorage{
}
protected void powerGraphRemoved(Tile tile){
if(tile.entity == null || tile.entity.power == null || tile.entity.power.graph == null){
return;
}
tile.entity.power.graph.remove(tile);
for(int i = 0; i < tile.entity.power.links.size; i++){
Tile other = world.tile(tile.entity.power.links.get(i));

View File

@ -125,7 +125,7 @@ public class PowerNode extends PowerBlock{
@Override
public void update(Tile tile){
tile.entity.power.graph.update();
if(tile.entity != null && tile.entity.power != null && tile.entity.power.graph != null) tile.entity.power.graph.update();
}
@Override

View File

@ -69,12 +69,6 @@ task dist(type: Jar){
}
}
task ttt(){
fileTree("/home/anuke/Projects/Mindustry/deploy/Mindustry-Linux64-4-beta-66/jre/lib/amd64/newst").each{t ->
println("\"jre/lib/amd64/${t.absoluteFile.name}\",")
}
}
//note: call desktop:dist beforehand
task packrCmd(){