Great cleanup

This commit is contained in:
Skat
2020-11-07 11:37:46 +03:00
parent 29b8db0a85
commit ed36390f3c
45 changed files with 134 additions and 189 deletions
+5 -3
View File
@@ -128,7 +128,9 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
!netServer.admins.allowAction(player, ActionType.withdrawItem, tile.tile(), action -> {
action.item = item;
action.itemAmount = amount;
}))) throw new ValidateException(player, "Player cannot request items.");
}))){
throw new ValidateException(player, "Player cannot request items.");
}
//remove item for every controlling unit
player.unit().eachGroup(unit -> {
@@ -984,7 +986,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
}
public @Nullable Unit selectedUnit(){
Unit unit = Units.closest(player.team(), Core.input.mouseWorld().x, Core.input.mouseWorld().y, 40f, u -> u.isAI());
Unit unit = Units.closest(player.team(), Core.input.mouseWorld().x, Core.input.mouseWorld().y, 40f, Unitc::isAI);
if(unit != null){
unit.hitbox(Tmp.r1);
Tmp.r1.grow(6f);
@@ -1160,7 +1162,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
if(block instanceof PowerNode){
Seq<Point2> skip = new Seq<>();
for(int i = 1; i < points.size; i++){
int overlaps = 0;
Point2 point = points.get(i);