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
+4 -4
View File
@@ -133,10 +133,10 @@ public class Teams{
private void count(Unit unit){
unit.team.data().updateCount(unit.type, 1);
if(unit instanceof Payloadc){
((Payloadc)unit).payloads().each(p -> {
if(p instanceof UnitPayload){
count(((UnitPayload)p).unit);
if(unit instanceof Payloadc payloadc){
payloadc.payloads().each(p -> {
if(p instanceof UnitPayload payload){
count(payload.unit);
}
});
}