This commit is contained in:
Anuken
2020-10-17 10:37:28 -04:00
parent 3a7ee50db3
commit 46ec457819
42 changed files with 142 additions and 118 deletions

View File

@@ -9,6 +9,8 @@ import mindustry.gen.*;
import mindustry.io.legacy.*;
import mindustry.type.*;
import java.util.*;
import static mindustry.Vars.*;
/**
@@ -138,4 +140,20 @@ public class SpawnGroup implements Serializable{
", items=" + items +
'}';
}
@Override
public boolean equals(Object o){
if(this == o) return true;
if(o == null || getClass() != o.getClass()) return false;
SpawnGroup group = (SpawnGroup)o;
return end == group.end && begin == group.begin && spacing == group.spacing && max == group.max
&& Float.compare(group.unitScaling, unitScaling) == 0 && Float.compare(group.shields, shields) == 0
&& Float.compare(group.shieldScaling, shieldScaling) == 0 && unitAmount == group.unitAmount &&
type == group.type && effect == group.effect && Structs.eq(items, group.items);
}
@Override
public int hashCode(){
return Arrays.hashCode(new Object[]{type, end, begin, spacing, max, unitScaling, shields, shieldScaling, unitAmount, effect, items});
}
}