Fixed #877 / Fixed #871 / Other fixes

This commit is contained in:
Anuken
2019-10-25 12:58:07 -04:00
parent 15cbc5fe42
commit b7e788d529
11 changed files with 50 additions and 23 deletions

View File

@@ -302,12 +302,12 @@ public class DesktopInput extends InputHandler{
player.clearBuilding();
}
if(Core.input.keyTap(Binding.schematic_select)){
if(Core.input.keyTap(Binding.schematic_select) && !ui.chatfrag.chatOpen()){
schemX = rawCursorX;
schemY = rawCursorY;
}
if(Core.input.keyTap(Binding.schematic_menu)){
if(Core.input.keyTap(Binding.schematic_menu) && !ui.chatfrag.chatOpen()){
ui.schematics.show();
}

View File

@@ -401,6 +401,11 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
protected void flushSelectRequests(Array<BuildRequest> requests){
for(BuildRequest req : requests){
if(req.block != null && validPlace(req.x, req.y, req.block, req.rotation)){
BuildRequest other = getRequest(req.x, req.y);
if(other != null){
selectRequests.remove(other);
}
selectRequests.add(req.copy());
}
}