Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Sep 13, 2021
2 parents 087cd2c + ca62dea commit edbe795
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions core/src/mindustry/entities/abilities/EnergyFieldAbility.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class EnergyFieldAbility extends Ability{
public Sound shootSound = Sounds.spark;
public float statusDuration = 60f * 6f;
public float x, y;
public boolean hitBuildings = true;
public boolean targetGround = true, targetAir = true, hitBuildings = true, hitUnits = true;
public int maxTargets = 25;
public float healPercent = 2.5f;

Expand Down Expand Up @@ -99,13 +99,15 @@ public void update(Unit unit){

all.clear();

Units.nearby(null, rx, ry, range, other -> {
if(other != unit){
all.add(other);
}
});
if(hitUnits){
Units.nearby(null, rx, ry, range, other -> {
if(other != unit && (other.isFlying() ? targetAir : targetGround)){
all.add(other);
}
});
}

if(hitBuildings){
if(hitBuildings && targetGround){
Units.nearbyBuildings(rx, ry, range, b -> {
if(b.team != Team.derelict || state.rules.coreCapture){
all.add(b);
Expand Down
2 changes: 1 addition & 1 deletion servers_v7.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
{
"name": "io",
"address": ["mindustry.io.community", "mindustry.io.community:1000", "mindustry.io.community:2000", "mindustry.io.community:3000", "mindustry.io.community:4000", "mindustry.io.community:5000"]
"address": ["mindustry.io.community", "mindustry.io.community:1000", "mindustry.io.community:2000", "mindustry.io.community:3000", "mindustry.io.community:4000", "labs.io.community"]
},
{
"name": "Korea",
Expand Down

0 comments on commit edbe795

Please sign in to comment.