diff --git a/core/assets-raw/sprites/units/vanquish-point-weapon.png b/core/assets-raw/sprites/units/vanquish-point-weapon.png new file mode 100644 index 0000000000..f3b3434c71 Binary files /dev/null and b/core/assets-raw/sprites/units/vanquish-point-weapon.png differ diff --git a/core/assets-raw/sprites/units/vanquish-weapon.png b/core/assets-raw/sprites/units/vanquish-weapon.png new file mode 100644 index 0000000000..7a98d2a6c8 Binary files /dev/null and b/core/assets-raw/sprites/units/vanquish-weapon.png differ diff --git a/core/assets-raw/sprites/units/vanquish.png b/core/assets-raw/sprites/units/vanquish.png index a1b5c2d58b..3f6317a3d4 100644 Binary files a/core/assets-raw/sprites/units/vanquish.png and b/core/assets-raw/sprites/units/vanquish.png differ diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 9c961396bc..ff69b5773f 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -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 diff --git a/core/src/mindustry/entities/comp/TankComp.java b/core/src/mindustry/entities/comp/TankComp.java index 320ddcf555..6dfa5d0044 100644 --- a/core/src/mindustry/entities/comp/TankComp.java +++ b/core/src/mindustry/entities/comp/TankComp.java @@ -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 diff --git a/core/src/mindustry/game/Schematics.java b/core/src/mindustry/game/Schematics.java index f025eed055..9e6d726180 100644 --- a/core/src/mindustry/game/Schematics.java +++ b/core/src/mindustry/game/Schematics.java @@ -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(); diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 6e2a00ad57..f344fadcec 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -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); } diff --git a/tools/src/mindustry/tools/Generators.java b/tools/src/mindustry/tools/Generators.java index 6eededbe91..544b747f02 100644 --- a/tools/src/mindustry/tools/Generators.java +++ b/tools/src/mindustry/tools/Generators.java @@ -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;