Added target cursor

This commit is contained in:
Anuken
2022-02-19 08:58:24 -05:00
parent 1a9fe45e8e
commit 63eeaae22d
4 changed files with 7 additions and 2 deletions

View File

@@ -399,6 +399,10 @@ public class DesktopInput extends InputHandler{
cursorType = ui.drillCursor;
}
if(commandMode && selectedUnits.any() && ((cursor.build != null && cursor.build.team != player.team()) || (selectedEnemyUnit(input.mouseWorldX(), input.mouseWorldY()) != null))){
cursorType = ui.targetCursor;
}
if(getRequest(cursor.x, cursor.y) != null && mode == none){
cursorType = SystemCursor.hand;
}
@@ -407,6 +411,7 @@ public class DesktopInput extends InputHandler{
cursorType = ui.unloadCursor;
}
if(cursor.build != null && cursor.interactable(player.team()) && !isPlacing() && Math.abs(Core.input.axisTap(Binding.rotate)) > 0 && Core.input.keyDown(Binding.rotateplaced) && cursor.block().rotate && cursor.block().quickRotate){
Call.rotateBlock(player, cursor.build, Core.input.axisTap(Binding.rotate) > 0);
}

View File

@@ -190,7 +190,6 @@ public class Placement{
(plan.tile() != null && plan.tile().block() == plan.block)); //don't count the same block as inaccessible
var result = plans1.clear();
var team = player.team();
outer:
for(int i = 0; i < plans.size;){