This commit is contained in:
Anuken 2024-06-20 10:49:14 -04:00
parent 56b0deb910
commit 3e3a24794c

View File

@ -114,12 +114,12 @@ public class DesktopInput extends InputHandler{
//draw break selection //draw break selection
if(mode == breaking){ if(mode == breaking){
drawBreakSelection(selectX, selectY, cursorX, cursorY, !Core.input.keyDown(Binding.schematic_select) ? maxLength : Vars.maxSchematicSize, false); drawBreakSelection(selectX, selectY, cursorX, cursorY, !(Core.input.keyDown(Binding.schematic_select) && schemX != -1 && schemY != -1) ? maxLength : Vars.maxSchematicSize, false);
} }
if(!Core.scene.hasKeyboard() && mode != breaking){ if(!Core.scene.hasKeyboard() && mode != breaking){
if(Core.input.keyDown(Binding.schematic_select)){ if(Core.input.keyDown(Binding.schematic_select) && schemX != -1 && schemY != -1){
drawSelection(schemX, schemY, cursorX, cursorY, Vars.maxSchematicSize); drawSelection(schemX, schemY, cursorX, cursorY, Vars.maxSchematicSize);
}else if(Core.input.keyDown(Binding.rebuild_select)){ }else if(Core.input.keyDown(Binding.rebuild_select)){
drawRebuildSelection(schemX, schemY, cursorX, cursorY); drawRebuildSelection(schemX, schemY, cursorX, cursorY);
@ -594,7 +594,7 @@ public class DesktopInput extends InputHandler{
selectPlans.clear(); selectPlans.clear();
} }
if( !Core.scene.hasKeyboard() && selectX == -1 && selectY == -1 && schemX != -1 && schemY != -1){ if(!Core.scene.hasKeyboard() && selectX == -1 && selectY == -1 && schemX != -1 && schemY != -1){
if(Core.input.keyRelease(Binding.schematic_select)){ if(Core.input.keyRelease(Binding.schematic_select)){
lastSchematic = schematics.create(schemX, schemY, rawCursorX, rawCursorY); lastSchematic = schematics.create(schemX, schemY, rawCursorX, rawCursorY);
useSchematic(lastSchematic); useSchematic(lastSchematic);