Crash/visual fixes
This commit is contained in:
@@ -241,7 +241,7 @@ public abstract class InputHandler implements InputProcessor{
|
|||||||
boolean canMine(Tile tile){
|
boolean canMine(Tile tile){
|
||||||
return !Core.scene.hasMouse()
|
return !Core.scene.hasMouse()
|
||||||
&& tile.drop() != null && tile.drop().hardness <= player.mech.drillPower
|
&& tile.drop() != null && tile.drop().hardness <= player.mech.drillPower
|
||||||
&& !tile.floor().playerUnmineable
|
&& !(tile.floor().playerUnmineable && tile.ore() == Blocks.air)
|
||||||
&& player.acceptsItem(tile.drop())
|
&& player.acceptsItem(tile.drop())
|
||||||
&& tile.block() == Blocks.air && player.dst(tile.worldx(), tile.worldy()) <= Player.mineDistance;
|
&& 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){
|
if(!request.remove && request == lastPlaced && request.block != null){
|
||||||
Draw.mixcol();
|
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);
|
Draw.mixcol(Tmp.c1, 1f);
|
||||||
|
|||||||
@@ -143,6 +143,10 @@ public class Block extends BlockStorage{
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void powerGraphRemoved(Tile tile){
|
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);
|
tile.entity.power.graph.remove(tile);
|
||||||
for(int i = 0; i < tile.entity.power.links.size; i++){
|
for(int i = 0; i < tile.entity.power.links.size; i++){
|
||||||
Tile other = world.tile(tile.entity.power.links.get(i));
|
Tile other = world.tile(tile.entity.power.links.get(i));
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ public class PowerNode extends PowerBlock{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(Tile tile){
|
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
|
@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
|
//note: call desktop:dist beforehand
|
||||||
task packrCmd(){
|
task packrCmd(){
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user