Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features
This commit is contained in:
@@ -35,7 +35,7 @@ public class Effect{
|
||||
/** Amount added to rotation */
|
||||
public float baseRotation;
|
||||
/** If true, parent unit is data are followed. */
|
||||
public boolean followParent;
|
||||
public boolean followParent = true;
|
||||
/** If this and followParent are true, the effect will offset and rotate with the parent's rotation. */
|
||||
public boolean rotWithParent;
|
||||
|
||||
|
||||
@@ -359,8 +359,9 @@ public class BulletType extends Content implements Cloneable{
|
||||
//home in on allies if possible
|
||||
if(healPercent > 0){
|
||||
target = Units.closestTarget(null, b.x, b.y, homingRange,
|
||||
e -> e.checkTarget(collidesAir, collidesGround) && e.team != b.team,
|
||||
t -> collidesGround && (t.team != b.team || t.damaged()));
|
||||
e -> e.checkTarget(collidesAir, collidesGround) && e.team != b.team && !b.hasCollided(e.id),
|
||||
t -> collidesGround && (t.team != b.team || t.damaged()) && !b.hasCollided(t.id)
|
||||
);
|
||||
}else{
|
||||
target = Units.closestTarget(b.team, b.x, b.y, homingRange, e -> e.checkTarget(collidesAir, collidesGround) && !b.hasCollided(e.id), t -> collidesGround && !b.hasCollided(t.id));
|
||||
}
|
||||
|
||||
@@ -1294,6 +1294,14 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
}
|
||||
|
||||
public void pickedUp(){
|
||||
if(power != null){
|
||||
if(power.graph != null){
|
||||
power.graph.removeList(self());
|
||||
power.graph = new PowerGraph();
|
||||
}
|
||||
power.links.clear();
|
||||
power.status = 0f;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user