Many bugfixes / Support for repairing derelict in selection

This commit is contained in:
Anuken
2024-09-18 16:27:54 -04:00
parent 63e246cc9d
commit e521a56712
8 changed files with 66 additions and 11 deletions

View File

@@ -112,6 +112,10 @@ public class Units{
return player == null || tile == null || tile.interactable(player.team()) || state.rules.editor;
}
public static boolean isHittable(@Nullable Posc target, boolean air, boolean ground){
return target != null && (target instanceof Buildingc ? ground : (target instanceof Unit u && u.checkTarget(air, ground)));
}
/**
* Validates a target.
* @param target The target to validate