Breach turret done / DrawTurret & reload fixes

This commit is contained in:
Anuken
2021-12-03 12:28:13 -05:00
parent 9c9d147b95
commit 61bb4d2dac
11 changed files with 65 additions and 8 deletions

View File

@@ -2767,7 +2767,7 @@ public class Blocks{
consumes.add(new ConsumeCoolant(0.5f)).update(false);
}};
//TODO tungsten?
//TODO tungsten support?
breach = new ItemTurret("breach"){{
requirements(Category.turret, with(Items.beryllium, 35, Items.silicon, 20), true);
ammo(
@@ -2783,7 +2783,21 @@ public class Blocks{
frontColor = Color.white;
trailWidth = 1.5f;
trailLength = 10;
//TODO different effect?
hitEffect = despawnEffect = Fx.hitBulletColor;
}},
Items.tungsten, new BasicBulletType(6.6f, 46){{
width = 9f;
height = 14f;
shootEffect = Fx.tungstenSpark;
smokeEffect = Fx.shootBigSmoke;
ammoMultiplier = 1;
reloadMultiplier = 1.4f;
pierce = true;
pierceBuilding = true;
hitColor = backColor = trailColor = Pal.tungstenShot;
frontColor = Color.white;
trailWidth = 1.6f;
trailLength = 10;
hitEffect = despawnEffect = Fx.hitBulletColor;
}}
);

View File

@@ -1392,6 +1392,16 @@ public class Fx{
});
}),
//TODO just make it properly colored...
tungstenSpark = new Effect(23f, e -> {
color(Color.white, Pal.tungstenShot, e.fin());
stroke(e.fout() * 1.1f + 0.5f);
randLenVectors(e.id, 5, 28f * e.fin(), e.rotation, 10f, (x, y) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 5f + 0.5f);
});
}),
shootPayloadDriver = new Effect(30f, e -> {
color(Pal.accent);
Lines.stroke(0.5f + 0.5f*e.fout());