Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -39,7 +39,7 @@ public class FlyingFollowAI extends FlyingAI{
|
||||
@Override
|
||||
public void updateVisuals(){
|
||||
if(unit.isFlying()){
|
||||
unit.wobble();
|
||||
if(unit.type.wobble) unit.wobble();
|
||||
|
||||
if(!shouldFaceTarget()){
|
||||
unit.lookAt(unit.prefRotation());
|
||||
|
||||
@@ -10,31 +10,24 @@ import mindustry.world.blocks.distribution.MassDriver.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class MassDriverBolt extends BulletType{
|
||||
public class MassDriverBolt extends BasicBulletType{
|
||||
|
||||
public MassDriverBolt(){
|
||||
super(1f, 75);
|
||||
collidesTiles = false;
|
||||
lifetime = 1f;
|
||||
width = 11f;
|
||||
height = 13f;
|
||||
shrinkY = 0f;
|
||||
sprite = "shell";
|
||||
despawnEffect = Fx.smeltsmoke;
|
||||
hitEffect = Fx.hitBulletBig;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Bullet b){
|
||||
float w = 11f, h = 13f;
|
||||
|
||||
Draw.color(Pal.bulletYellowBack);
|
||||
Draw.rect("shell-back", b.x, b.y, w, h, b.rotation() + 90);
|
||||
|
||||
Draw.color(Pal.bulletYellow);
|
||||
Draw.rect("shell", b.x, b.y, w, h, b.rotation() + 90);
|
||||
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Bullet b){
|
||||
super.update(b);
|
||||
|
||||
//data MUST be an instance of DriverBulletData
|
||||
if(!(b.data() instanceof DriverBulletData data)){
|
||||
hit(b);
|
||||
|
||||
@@ -83,7 +83,7 @@ public class AIController implements UnitController{
|
||||
|
||||
public void updateVisuals(){
|
||||
if(unit.isFlying()){
|
||||
unit.wobble();
|
||||
if(unit.type.wobble) unit.wobble();
|
||||
|
||||
unit.lookAt(unit.prefRotation());
|
||||
}
|
||||
|
||||
@@ -954,6 +954,8 @@ public class ContentParser{
|
||||
case "min" -> base.min(parser.readValue(PartProgress.class, data.get("other")));
|
||||
case "sin" -> base.sin(data.has("offset") ? data.getFloat("offset") : 0f, data.getFloat("scl"), data.getFloat("mag"));
|
||||
case "absin" -> base.absin(data.getFloat("scl"), data.getFloat("mag"));
|
||||
case "mod" -> base.mod(data.getFloat("amount"));
|
||||
case "loop" -> base.loop(data.getFloat("time"));
|
||||
case "curve" -> data.has("interp") ? base.curve(parser.readValue(Interp.class, data.get("interp"))) : base.curve(data.getFloat("offset"), data.getFloat("duration"));
|
||||
default -> throw new RuntimeException("Unknown operation '" + op + "', check PartProgress class for a list of methods.");
|
||||
};
|
||||
|
||||
@@ -141,8 +141,10 @@ public class UnitType extends UnlockableContent implements Senseable{
|
||||
|
||||
/** if true, this unit counts as an enemy in the wave counter (usually false for support-only units) */
|
||||
public boolean isEnemy = true,
|
||||
/** If true, the unit is always at elevation 1. */
|
||||
/** if true, the unit is always at elevation 1 */
|
||||
flying = false,
|
||||
/** whether this flying unit should wobble around */
|
||||
wobble = true,
|
||||
/** whether this unit tries to attack air units */
|
||||
targetAir = true,
|
||||
/** whether this unit tries to attack ground units */
|
||||
|
||||
Reference in New Issue
Block a user