From 6492ffd35d171651b48735cbf97cfb7c2293c9c9 Mon Sep 17 00:00:00 2001 From: LeoDog896 Date: Fri, 25 Sep 2020 07:58:44 -0400 Subject: [PATCH] More sort and target options --- core/src/mindustry/logic/RadarSort.java | 4 +++- core/src/mindustry/logic/RadarTarget.java | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/logic/RadarSort.java b/core/src/mindustry/logic/RadarSort.java index 4164563f6d..50e553b70f 100644 --- a/core/src/mindustry/logic/RadarSort.java +++ b/core/src/mindustry/logic/RadarSort.java @@ -6,6 +6,8 @@ import mindustry.gen.*; public enum RadarSort{ distance((pos, other) -> -pos.dst2(other)), health((pos, other) -> other.health()), + shield((pos, other) -> other.shield()), + armor((pos, other) -> other.armor()), maxHealth((pos, other) -> other.maxHealth()); public final RadarSortFunc func; @@ -17,6 +19,6 @@ public enum RadarSort{ } public interface RadarSortFunc{ - float get(Position pos, Healthc other); + float get(Position pos, Unit other); } } diff --git a/core/src/mindustry/logic/RadarTarget.java b/core/src/mindustry/logic/RadarTarget.java index f6499db8c8..ddd7a1f368 100644 --- a/core/src/mindustry/logic/RadarTarget.java +++ b/core/src/mindustry/logic/RadarTarget.java @@ -8,6 +8,7 @@ public enum RadarTarget{ enemy((team, other) -> team != other.team), ally((team, other) -> team == other.team), player((team, other) -> other.isPlayer()), + attacker((pos, other) -> other.canShoot()), flying((team, other) -> other.isFlying()), boss((team, other) -> other.isBoss()), ground((team, other) -> other.isGrounded());