Merge branch 'master' of https://github.com/Anuken/Mindustry
This commit is contained in:
@@ -77,6 +77,7 @@ public abstract class BulletType extends Content{
|
|||||||
//additional effects
|
//additional effects
|
||||||
|
|
||||||
public float fragCone = 360f;
|
public float fragCone = 360f;
|
||||||
|
public float fragAngle = 0f;
|
||||||
public int fragBullets = 9;
|
public int fragBullets = 9;
|
||||||
public float fragVelocityMin = 0.2f, fragVelocityMax = 1f, fragLifeMin = 1f, fragLifeMax = 1f;
|
public float fragVelocityMin = 0.2f, fragVelocityMax = 1f, fragLifeMin = 1f, fragLifeMax = 1f;
|
||||||
public BulletType fragBullet = null;
|
public BulletType fragBullet = null;
|
||||||
@@ -101,6 +102,8 @@ public abstract class BulletType extends Content{
|
|||||||
public int lightningLength = 5, lightningLengthRand = 0;
|
public int lightningLength = 5, lightningLengthRand = 0;
|
||||||
/** Use a negative value to use default bullet damage. */
|
/** Use a negative value to use default bullet damage. */
|
||||||
public float lightningDamage = -1;
|
public float lightningDamage = -1;
|
||||||
|
public float lightningCone = 360f;
|
||||||
|
public float lightningAngle = 0f;
|
||||||
|
|
||||||
public float weaveScale = 1f;
|
public float weaveScale = 1f;
|
||||||
public float weaveMag = -1f;
|
public float weaveMag = -1f;
|
||||||
@@ -156,7 +159,7 @@ public abstract class BulletType extends Content{
|
|||||||
if(fragBullet != null){
|
if(fragBullet != null){
|
||||||
for(int i = 0; i < fragBullets; i++){
|
for(int i = 0; i < fragBullets; i++){
|
||||||
float len = Mathf.random(1f, 7f);
|
float len = Mathf.random(1f, 7f);
|
||||||
float a = b.rotation() + Mathf.range(fragCone/2);
|
float a = b.rotation() + Mathf.range(fragCone/2) + fragAngle;
|
||||||
fragBullet.create(b, x + Angles.trnsx(a, len), y + Angles.trnsy(a, len), a, Mathf.random(fragVelocityMin, fragVelocityMax), Mathf.random(fragLifeMin, fragLifeMax));
|
fragBullet.create(b, x + Angles.trnsx(a, len), y + Angles.trnsy(a, len), a, Mathf.random(fragVelocityMin, fragVelocityMax), Mathf.random(fragLifeMin, fragLifeMax));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -181,7 +184,7 @@ public abstract class BulletType extends Content{
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < lightning; i++){
|
for(int i = 0; i < lightning; i++){
|
||||||
Lightning.create(b, lightningColor, lightningDamage < 0 ? damage : lightningDamage, b.x, b.y, Mathf.random(360f), lightningLength + Mathf.random(lightningLengthRand));
|
Lightning.create(b, lightningColor, lightningDamage < 0 ? damage : lightningDamage, b.x, b.y, b.rotation() + Mathf.range(lightningCone/2) + lightningAngle, lightningLength + Mathf.random(lightningLengthRand));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import mindustry.gen.*;
|
|||||||
public enum RadarSort{
|
public enum RadarSort{
|
||||||
distance((pos, other) -> -pos.dst2(other)),
|
distance((pos, other) -> -pos.dst2(other)),
|
||||||
health((pos, other) -> other.health()),
|
health((pos, other) -> other.health()),
|
||||||
|
shield((pos, other) -> other.shield()),
|
||||||
|
armor((pos, other) -> other.armor()),
|
||||||
maxHealth((pos, other) -> other.maxHealth());
|
maxHealth((pos, other) -> other.maxHealth());
|
||||||
|
|
||||||
public final RadarSortFunc func;
|
public final RadarSortFunc func;
|
||||||
@@ -17,6 +19,6 @@ public enum RadarSort{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface RadarSortFunc{
|
public interface RadarSortFunc{
|
||||||
float get(Position pos, Healthc other);
|
float get(Position pos, Unit other);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ public enum RadarTarget{
|
|||||||
enemy((team, other) -> team != other.team),
|
enemy((team, other) -> team != other.team),
|
||||||
ally((team, other) -> team == other.team),
|
ally((team, other) -> team == other.team),
|
||||||
player((team, other) -> other.isPlayer()),
|
player((team, other) -> other.isPlayer()),
|
||||||
|
attacker((pos, other) -> other.canShoot()),
|
||||||
flying((team, other) -> other.isFlying()),
|
flying((team, other) -> other.isFlying()),
|
||||||
boss((team, other) -> other.isBoss()),
|
boss((team, other) -> other.isBoss()),
|
||||||
ground((team, other) -> other.isGrounded());
|
ground((team, other) -> other.isGrounded());
|
||||||
|
|||||||
Reference in New Issue
Block a user