mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-09-11 08:15:35 +03:00
Vanquish weapons & sprite tweaks
This commit is contained in:
parent
53b55a9f0e
commit
32cb25af62
BIN
core/assets-raw/sprites/units/vanquish-point-weapon.png
Normal file
BIN
core/assets-raw/sprites/units/vanquish-point-weapon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 437 B |
BIN
core/assets-raw/sprites/units/vanquish-weapon.png
Normal file
BIN
core/assets-raw/sprites/units/vanquish-weapon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
@ -2429,10 +2429,89 @@ public class UnitTypes{
|
||||
|
||||
vanquish = new TankUnitType("vanquish"){{
|
||||
hitSize = 28f;
|
||||
treadPullOffset = 4;
|
||||
speed = 0.6f;
|
||||
health = 10000;
|
||||
armor = 20f;
|
||||
treadRect = new Rect(22f, 16f, 28f, 130f);
|
||||
|
||||
weapons.add(new Weapon("vanquish-weapon"){{
|
||||
layerOffset = 0.0001f;
|
||||
reload = 120f;
|
||||
shootY = 7f;
|
||||
shake = 2f;
|
||||
recoil = 4f;
|
||||
rotate = true;
|
||||
rotateSpeed = 1f;
|
||||
mirror = false;
|
||||
x = 0f;
|
||||
y = -4;
|
||||
shadow = 30f;
|
||||
|
||||
//TODO better bullet / weapon
|
||||
bullet = new ArtilleryBulletType(2f, 20, "shell"){{
|
||||
hitEffect = Fx.massiveExplosion;
|
||||
knockback = 0.8f;
|
||||
lifetime = 100f;
|
||||
width = height = 14f;
|
||||
collidesTiles = false;
|
||||
splashDamageRadius = 60f;
|
||||
splashDamage = 60f;
|
||||
backColor = Color.valueOf("feb380");
|
||||
frontColor = Color.white;
|
||||
|
||||
width = 9f;
|
||||
height = 15f;
|
||||
|
||||
status = StatusEffects.blasted;
|
||||
lightning = 5;
|
||||
|
||||
trailLength = 28;
|
||||
trailWidth = 4f;
|
||||
trailEffect = Fx.none;
|
||||
trailColor = backColor;
|
||||
|
||||
shrinkX = 0.1f;
|
||||
shrinkY = 0.5f;
|
||||
|
||||
fragBullets = 9;
|
||||
fragVelocityMin = 0.7f;
|
||||
fragLifeMin = 0.1f;
|
||||
fragBullet = new BasicBulletType(5f, 15){{
|
||||
width = 7f;
|
||||
height = 9f;
|
||||
lifetime = 20f;
|
||||
backColor = Color.valueOf("feb380");
|
||||
frontColor = Color.white;
|
||||
}};
|
||||
}};
|
||||
}});
|
||||
|
||||
int i = 0;
|
||||
for(float f : new float[]{34f / 4f, -36f / 4f}){
|
||||
int fi = i ++;
|
||||
weapons.add(new Weapon("vanquish-point-weapon"){{
|
||||
reload = 35f + fi * 5;
|
||||
x = 48f / 4f;
|
||||
y = f;
|
||||
shootY = 5.5f;
|
||||
recoil = 2f;
|
||||
rotate = true;
|
||||
rotateSpeed = 2f;
|
||||
|
||||
bullet = new BasicBulletType(4.5f, 14){{
|
||||
width = 6.5f;
|
||||
height = 11f;
|
||||
shootEffect = Fx.sparkShoot;
|
||||
smokeEffect = Fx.shootBigSmoke;
|
||||
hitColor = backColor = trailColor = Color.valueOf("feb380");
|
||||
frontColor = Color.white;
|
||||
trailWidth = 1.5f;
|
||||
trailLength = 6;
|
||||
hitEffect = despawnEffect = Fx.hitBulletColor;
|
||||
}};
|
||||
}});
|
||||
}
|
||||
}};
|
||||
|
||||
//endregion
|
||||
|
@ -34,7 +34,7 @@ abstract class TankComp implements Posc, Flyingc, Hitboxc, Unitc, ElevationMovec
|
||||
float yOffset = (treadRegion.height/2f - (treadRect.y + treadRect.height/2f)) / 4f;
|
||||
|
||||
for(int i : Mathf.signs){
|
||||
Tmp.v1.set(xOffset * i, yOffset - treadRect.height / 2f / 4f).rotate(rotation - 90);
|
||||
Tmp.v1.set(xOffset * i, yOffset - treadRect.height / 2f / 4f - 2f).rotate(rotation - 90);
|
||||
|
||||
Effect.floorDustAngle(type.treadEffect, Tmp.v1.x + x, Tmp.v1.y + y, rotation + 180f);
|
||||
}
|
||||
@ -49,8 +49,6 @@ abstract class TankComp implements Posc, Flyingc, Hitboxc, Unitc, ElevationMovec
|
||||
treadTime += len;
|
||||
walked = false;
|
||||
}
|
||||
|
||||
//TODO treads should create dust, see MechComp
|
||||
}
|
||||
|
||||
@Replace
|
||||
|
@ -437,9 +437,10 @@ public class Schematics implements Loadable{
|
||||
if(check && !(st.block instanceof CoreBlock)){
|
||||
seq.clear();
|
||||
tile.getLinkedTilesAs(st.block, seq);
|
||||
if(seq.contains(t -> !t.block().alwaysReplace && !t.synthetic())){
|
||||
return;
|
||||
}
|
||||
//remove env blocks, or not?
|
||||
//if(seq.contains(t -> !t.block().alwaysReplace && !t.synthetic())){
|
||||
// return;
|
||||
//}
|
||||
for(var t : seq){
|
||||
if(t.block() != Blocks.air){
|
||||
t.remove();
|
||||
|
@ -121,6 +121,7 @@ public class UnitType extends UnlockableContent{
|
||||
|
||||
public Rect treadRect = new Rect();
|
||||
public int treadFrames = 18;
|
||||
public int treadPullOffset = 0;
|
||||
|
||||
public int itemCapacity = -1;
|
||||
public int ammoCapacity = -1;
|
||||
@ -442,12 +443,12 @@ public class UnitType extends UnlockableContent{
|
||||
}
|
||||
|
||||
if(treadEffect == null){
|
||||
treadEffect = new Effect(45, e -> {
|
||||
treadEffect = new Effect(50, e -> {
|
||||
color(Tmp.c1.set(e.color).mul(1.5f));
|
||||
Fx.rand.setSeed(e.id);
|
||||
for(int i = 0; i < 3; i++){
|
||||
Fx.v.trns(e.rotation + Fx.rand.range(40f), Fx.rand.random(6f * e.finpow()));
|
||||
Fill.circle(e.x + Fx.v.x + Fx.rand.range(3f), e.y + Fx.v.y + Fx.rand.range(3f), e.fout() * hitSize / 28f * 3f * Fx.rand.random(0.8f, 1.1f) + 0.3f);
|
||||
Fill.circle(e.x + Fx.v.x + Fx.rand.range(4f), e.y + Fx.v.y + Fx.rand.range(4f), e.fout() * hitSize / 28f * 3f * Fx.rand.random(0.8f, 1.1f) + 0.3f);
|
||||
}
|
||||
}).layer(Layer.debris);
|
||||
}
|
||||
|
@ -516,7 +516,7 @@ public class Generators{
|
||||
Pixmap slice = pix.crop((int)type.treadRect.x, (int)type.treadRect.y, 1, (int)type.treadRect.height);
|
||||
int frames = type.treadFrames;
|
||||
for(int i = 0; i < frames; i++){
|
||||
int pullOffset = 4;
|
||||
int pullOffset = type.treadPullOffset;
|
||||
Pixmap frame = new Pixmap(slice.width, slice.height);
|
||||
for(int y = 0; y < slice.height; y++){
|
||||
int idx = y + i;
|
||||
|
Loading…
Reference in New Issue
Block a user