Bugfixes
This commit is contained in:
@@ -758,8 +758,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
if(req != ignore
|
if(req != ignore
|
||||||
&& !req.breaking
|
&& !req.breaking
|
||||||
&& req.block.bounds(req.x, req.y, Tmp.r1).overlaps(type.bounds(x, y, Tmp.r2))
|
&& req.block.bounds(req.x, req.y, Tmp.r1).overlaps(type.bounds(x, y, Tmp.r2))
|
||||||
&& !(type.canReplace(req.block) && Tmp.r1.equals(Tmp.r2))
|
&& !(type.canReplace(req.block) && Tmp.r1.equals(Tmp.r2))){
|
||||||
){
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -217,11 +217,15 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
//actually place/break all selected blocks
|
//actually place/break all selected blocks
|
||||||
if(tile != null){
|
if(tile != null){
|
||||||
if(!request.breaking){
|
if(!request.breaking){
|
||||||
|
if(validPlace(request.x, request.y, request.block, request.rotation)){
|
||||||
|
BuildRequest other = getRequest(request.x, request.y);
|
||||||
|
if(other != null){
|
||||||
|
player.buildQueue().remove(other);
|
||||||
|
}
|
||||||
|
player.addBuildRequest(request.copy());
|
||||||
|
}
|
||||||
|
|
||||||
rotation = request.rotation;
|
rotation = request.rotation;
|
||||||
Block before = block;
|
|
||||||
block = request.block;
|
|
||||||
tryPlaceBlock(tile.x, tile.y);
|
|
||||||
block = before;
|
|
||||||
}else{
|
}else{
|
||||||
tryBreakBlock(tile.x, tile.y);
|
tryBreakBlock(tile.x, tile.y);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class SchematicsDialog extends FloatingDialog{
|
|||||||
Label label = c.add(s.name()).style(Styles.outlineLabel).color(Color.white).top().growX().maxWidth(200f - 8f).get();
|
Label label = c.add(s.name()).style(Styles.outlineLabel).color(Color.white).top().growX().maxWidth(200f - 8f).get();
|
||||||
label.setEllipsis(true);
|
label.setEllipsis(true);
|
||||||
label.setAlignment(Align.center);
|
label.setAlignment(Align.center);
|
||||||
}).growX().margin(1).pad(4).maxWidth(200f - 8f).padBottom(0);
|
}).growX().margin(1).pad(4).maxWidth(Scl.scl(200f - 8f)).padBottom(0);
|
||||||
})).size(200f);
|
})).size(200f);
|
||||||
}, () -> {
|
}, () -> {
|
||||||
if(sel[0].childrenPressed()) return;
|
if(sel[0].childrenPressed()) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user