mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-11-11 03:31:19 +03:00
Crash/visual fixes
This commit is contained in:
parent
83a5a82e18
commit
8413046dd8
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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));
|
||||
|
@ -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
|
||||
|
@ -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(){
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user