Fuse shot implemented
This commit is contained in:
@@ -26,7 +26,7 @@ allprojects {
|
|||||||
appName = 'Mindustry'
|
appName = 'Mindustry'
|
||||||
gdxVersion = '1.9.8'
|
gdxVersion = '1.9.8'
|
||||||
roboVMVersion = '2.3.0'
|
roboVMVersion = '2.3.0'
|
||||||
uCoreVersion = 'cb0b78be5e6d7f3bf036b1d24bf6eda4372da907'
|
uCoreVersion = '4d8019c8f37fdc2a7a64cbd55ef6ee30fb9f1ba5'
|
||||||
|
|
||||||
getVersionString = {
|
getVersionString = {
|
||||||
String buildVersion = getBuildVersion()
|
String buildVersion = getBuildVersion()
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 719 B After Width: | Height: | Size: 714 B |
@@ -78,7 +78,6 @@ text.players.single={0} player online
|
|||||||
text.server.mismatch=Packet error: possible client/server version mismatch.\nMake sure you and the host have the\nlatest version of Mindustry!
|
text.server.mismatch=Packet error: possible client/server version mismatch.\nMake sure you and the host have the\nlatest version of Mindustry!
|
||||||
text.server.closing=[accent]Closing server...
|
text.server.closing=[accent]Closing server...
|
||||||
text.server.kicked.kick=You have been kicked from the server!
|
text.server.kicked.kick=You have been kicked from the server!
|
||||||
text.server.kicked.fastShoot=You are shooting too quickly.
|
|
||||||
text.server.kicked.serverClose=Server closed.
|
text.server.kicked.serverClose=Server closed.
|
||||||
text.server.kicked.sectorComplete=Sector completed.
|
text.server.kicked.sectorComplete=Sector completed.
|
||||||
text.server.kicked.sectorComplete.text=Your mission is complete.\nThe server will now continue at the next sector.
|
text.server.kicked.sectorComplete.text=Your mission is complete.\nThe server will now continue at the next sector.
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
@@ -131,7 +131,7 @@ public class AmmoTypes implements ContentList{
|
|||||||
flakSurge = new AmmoType(Items.surgealloy, FlakBullets.surge, 5){{
|
flakSurge = new AmmoType(Items.surgealloy, FlakBullets.surge, 5){{
|
||||||
shootEffect = ShootFx.shootBig;
|
shootEffect = ShootFx.shootBig;
|
||||||
smokeEffect = ShootFx.shootBigSmoke;
|
smokeEffect = ShootFx.shootBigSmoke;
|
||||||
reloadMultiplier = 2f;
|
reloadMultiplier = 1/2f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//missiles
|
//missiles
|
||||||
@@ -201,7 +201,7 @@ public class AmmoTypes implements ContentList{
|
|||||||
meltdownLaser = new AmmoType(TurretBullets.lancerLaser);
|
meltdownLaser = new AmmoType(TurretBullets.lancerLaser);
|
||||||
|
|
||||||
fuseShotgun = new AmmoType(Items.densealloy, TurretBullets.fuseShot, 1f){{
|
fuseShotgun = new AmmoType(Items.densealloy, TurretBullets.fuseShot, 1f){{
|
||||||
shootEffect = ShootFx.shootBig2;
|
shootEffect = Fx.none;
|
||||||
smokeEffect = ShootFx.shootBigSmoke2;
|
smokeEffect = ShootFx.shootBigSmoke2;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
@@ -207,8 +207,7 @@ public class TurretBlocks extends BlockList implements ContentList{
|
|||||||
range = 140f;
|
range = 140f;
|
||||||
size = 3;
|
size = 3;
|
||||||
recoil = 3f;
|
recoil = 3f;
|
||||||
shots = 2;
|
rotatespeed = 10f;
|
||||||
rotatespeed = 20f;
|
|
||||||
inaccuracy = 13f;
|
inaccuracy = 13f;
|
||||||
shootCone = 30f;
|
shootCone = 30f;
|
||||||
}};
|
}};
|
||||||
@@ -218,7 +217,9 @@ public class TurretBlocks extends BlockList implements ContentList{
|
|||||||
ammoTypes = new AmmoType[]{AmmoTypes.fuseShotgun};
|
ammoTypes = new AmmoType[]{AmmoTypes.fuseShotgun};
|
||||||
reload = 50f;
|
reload = 50f;
|
||||||
shootShake = 4f;
|
shootShake = 4f;
|
||||||
range = 70f;
|
range = 80f;
|
||||||
|
recoil = 5f;
|
||||||
|
restitution = 0.1f;
|
||||||
size = 3;
|
size = 3;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
@@ -160,13 +160,13 @@ public class TurretBullets extends BulletList implements ContentList{
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
fuseShot = new BulletType(0.01f, 0){
|
fuseShot = new BulletType(0.01f, 60){
|
||||||
int rays = 3;
|
int rays = 3;
|
||||||
float raySpace = 2f;
|
float raySpace = 2f;
|
||||||
float rayLength = 70f;
|
float rayLength = 80f;
|
||||||
{
|
{
|
||||||
hiteffect = BulletFx.hitBulletBig;
|
hiteffect = BulletFx.hitFuse;
|
||||||
lifetime = 10f;
|
lifetime = 13f;
|
||||||
despawneffect = Fx.none;
|
despawneffect = Fx.none;
|
||||||
pierce = true;
|
pierce = true;
|
||||||
}
|
}
|
||||||
@@ -184,7 +184,14 @@ public class TurretBullets extends BulletList implements ContentList{
|
|||||||
public void draw(Bullet b) {
|
public void draw(Bullet b) {
|
||||||
super.draw(b);
|
super.draw(b);
|
||||||
Draw.color(Color.WHITE, Palette.surge, b.fin());
|
Draw.color(Color.WHITE, Palette.surge, b.fin());
|
||||||
Shapes.tri(b.x, b.y, 12f, (rayLength+10) * b.fout(), b.angle());
|
for(int i = 0; i < 7; i++){
|
||||||
|
vector.trns(b.angle(), i * 8f);
|
||||||
|
float sl = Mathf.clamp(b.fout()-0.5f) * (80f - i *10);
|
||||||
|
Shapes.tri(b.x + vector.x, b.y + vector.y, 4f, sl, b.angle() + 90);
|
||||||
|
Shapes.tri(b.x + vector.x, b.y + vector.y, 4f, sl, b.angle() - 90);
|
||||||
|
}
|
||||||
|
Shapes.tri(b.x, b.y, 13f, (rayLength+50) * b.fout(), b.angle());
|
||||||
|
Shapes.tri(b.x, b.y, 13f, 10f * b.fout(), b.angle() + 180f);
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import io.anuke.ucore.util.Angles;
|
|||||||
import io.anuke.ucore.util.Mathf;
|
import io.anuke.ucore.util.Mathf;
|
||||||
|
|
||||||
public class BulletFx extends FxList implements ContentList{
|
public class BulletFx extends FxList implements ContentList{
|
||||||
public static Effect hitBulletSmall, hitBulletBig, hitFlameSmall, hitLiquid, hitLaser, hitLancer, despawn, flakExplosion, blastExplosion, plasticExplosion,
|
public static Effect hitBulletSmall, hitFuse, hitBulletBig, hitFlameSmall, hitLiquid, hitLaser, hitLancer, despawn, flakExplosion, blastExplosion, plasticExplosion,
|
||||||
artilleryTrail, incendTrail, missileTrail, absorb, flakExplosionBig, plasticExplosionFlak;
|
artilleryTrail, incendTrail, missileTrail, absorb, flakExplosionBig, plasticExplosionFlak;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -36,6 +36,25 @@ public class BulletFx extends FxList implements ContentList{
|
|||||||
Draw.reset();
|
Draw.reset();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
hitFuse = new Effect(14, e -> {
|
||||||
|
Draw.color(Color.WHITE, Palette.surge, e.fin());
|
||||||
|
|
||||||
|
e.scaled(7f, s -> {
|
||||||
|
Lines.stroke(0.5f + s.fout());
|
||||||
|
Lines.circle(e.x, e.y, s.fin()*7f);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Lines.stroke(0.5f + e.fout());
|
||||||
|
|
||||||
|
Angles.randLenVectors(e.id, 6, e.fin() * 15f, (x, y) -> {
|
||||||
|
float ang = Mathf.atan2(x, y);
|
||||||
|
Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f);
|
||||||
|
});
|
||||||
|
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
|
||||||
hitBulletBig = new Effect(13, e -> {
|
hitBulletBig = new Effect(13, e -> {
|
||||||
Draw.color(Color.WHITE, Palette.lightOrange, e.fin());
|
Draw.color(Color.WHITE, Palette.lightOrange, e.fin());
|
||||||
Lines.stroke(0.5f + e.fout() * 1.5f);
|
Lines.stroke(0.5f + e.fout() * 1.5f);
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ public abstract class Turret extends Block{
|
|||||||
protected float reload = 10f;
|
protected float reload = 10f;
|
||||||
protected float inaccuracy = 0f;
|
protected float inaccuracy = 0f;
|
||||||
protected int shots = 1;
|
protected int shots = 1;
|
||||||
|
protected float spread = 4f;
|
||||||
protected float recoil = 1f;
|
protected float recoil = 1f;
|
||||||
protected float restitution = 0.02f;
|
protected float restitution = 0.02f;
|
||||||
protected float cooldown = 0.02f;
|
protected float cooldown = 0.02f;
|
||||||
@@ -278,7 +279,9 @@ public abstract class Turret extends Block{
|
|||||||
|
|
||||||
tr.trns(entity.rotation, size * tilesize / 2, Mathf.range(xRand));
|
tr.trns(entity.rotation, size * tilesize / 2, Mathf.range(xRand));
|
||||||
|
|
||||||
bullet(tile, ammo.bullet, entity.rotation + Mathf.range(inaccuracy + type.inaccuracy));
|
for(int i = 0; i < shots; i++){
|
||||||
|
bullet(tile, ammo.bullet, entity.rotation + Mathf.range(inaccuracy + type.inaccuracy) + (i-shots/2) * spread);
|
||||||
|
}
|
||||||
|
|
||||||
effects(tile);
|
effects(tile);
|
||||||
useAmmo(tile);
|
useAmmo(tile);
|
||||||
|
|||||||
Reference in New Issue
Block a user