Variable mass driver bullets
This commit is contained in:
@@ -14,12 +14,11 @@ import static mindustry.Vars.content;
|
|||||||
public class MassDriverBolt extends BulletType{
|
public class MassDriverBolt extends BulletType{
|
||||||
|
|
||||||
public MassDriverBolt(){
|
public MassDriverBolt(){
|
||||||
super(5.3f, 50);
|
super(1f, 50);
|
||||||
collidesTiles = false;
|
collidesTiles = false;
|
||||||
lifetime = 200f;
|
lifetime = 1f;
|
||||||
despawnEffect = Fx.smeltsmoke;
|
despawnEffect = Fx.smeltsmoke;
|
||||||
hitEffect = Fx.hitBulletBig;
|
hitEffect = Fx.hitBulletBig;
|
||||||
drag = 0.005f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import mindustry.world.blocks.payloads.*;
|
|||||||
/** An entity that holds a payload. */
|
/** An entity that holds a payload. */
|
||||||
@Component
|
@Component
|
||||||
abstract class PayloadComp implements Posc, Rotc{
|
abstract class PayloadComp implements Posc, Rotc{
|
||||||
@Import float x, y;
|
@Import float x, y, rotation;
|
||||||
|
|
||||||
Array<Payload> payloads = new Array<>();
|
Array<Payload> payloads = new Array<>();
|
||||||
|
|
||||||
@@ -44,7 +44,6 @@ abstract class PayloadComp implements Posc, Rotc{
|
|||||||
|
|
||||||
if(tryDropPayload(load)){
|
if(tryDropPayload(load)){
|
||||||
payloads.pop();
|
payloads.pop();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -70,6 +69,7 @@ abstract class PayloadComp implements Posc, Rotc{
|
|||||||
|
|
||||||
u.set(this);
|
u.set(this);
|
||||||
u.trns(Tmp.v1.rnd(Mathf.random(2f)));
|
u.trns(Tmp.v1.rnd(Mathf.random(2f)));
|
||||||
|
u.rotation(rotation);
|
||||||
u.add();
|
u.add();
|
||||||
Fx.unitDrop.at(u);
|
Fx.unitDrop.at(u);
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import mindustry.graphics.*;
|
|||||||
|
|
||||||
public class SurgeWall extends Wall{
|
public class SurgeWall extends Wall{
|
||||||
public float lightningChance = 0.05f;
|
public float lightningChance = 0.05f;
|
||||||
public float lightningDamage = 15f;
|
public float lightningDamage = 20f;
|
||||||
public int lightningLength = 17;
|
public int lightningLength = 17;
|
||||||
|
|
||||||
public SurgeWall(String name){
|
public SurgeWall(String name){
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ public class MassDriver extends Block{
|
|||||||
public int minDistribute = 10;
|
public int minDistribute = 10;
|
||||||
public float knockback = 4f;
|
public float knockback = 4f;
|
||||||
public float reloadTime = 100f;
|
public float reloadTime = 100f;
|
||||||
|
public float bulletSpeed = 5.5f;
|
||||||
|
public float bulletLifetime = 200f;
|
||||||
public Effect shootEffect = Fx.shootBig2;
|
public Effect shootEffect = Fx.shootBig2;
|
||||||
public Effect smokeEffect = Fx.shootBigSmoke2;
|
public Effect smokeEffect = Fx.shootBigSmoke2;
|
||||||
public Effect recieveEffect = Fx.mineBig;
|
public Effect recieveEffect = Fx.mineBig;
|
||||||
@@ -252,8 +254,8 @@ public class MassDriver extends Block{
|
|||||||
float angle = tile.angleTo(target);
|
float angle = tile.angleTo(target);
|
||||||
|
|
||||||
Bullets.driverBolt.create(this, team(),
|
Bullets.driverBolt.create(this, team(),
|
||||||
x + Angles.trnsx(angle, translation), y + Angles.trnsy(angle, translation),
|
x + Angles.trnsx(angle, translation), y + Angles.trnsy(angle, translation),
|
||||||
angle, -1f, 1f, 1f, data);
|
angle, -1f, bulletSpeed, bulletLifetime, data);
|
||||||
|
|
||||||
shootEffect.at(x + Angles.trnsx(angle, translation),
|
shootEffect.at(x + Angles.trnsx(angle, translation),
|
||||||
y + Angles.trnsy(angle, translation), angle);
|
y + Angles.trnsy(angle, translation), angle);
|
||||||
|
|||||||
Reference in New Issue
Block a user