Progress on new SFX (WIP)

Pitch is broken in the sound engine - this has already been fixed, but I haven't updated the natives
This commit is contained in:
Anuken
2025-11-07 15:53:13 -05:00
parent 5397d8426c
commit 3f2aba4123
23 changed files with 86 additions and 46 deletions

View File

@@ -3290,6 +3290,7 @@ public class Blocks{
}
}};
shootSound = Sounds.shootDuo;
recoil = 0.5f;
shootY = 3f;
reload = 20f;
@@ -3792,7 +3793,7 @@ public class Blocks{
ammoUseEffect = Fx.casing2;
scaledHealth = 240;
shootSound = Sounds.shootBig;
shootSound = Sounds.shootFast;
limitRange();
coolant = consumeCoolant(0.2f);
@@ -3891,7 +3892,7 @@ public class Blocks{
envEnabled |= Env.space;
scaledHealth = 220;
shootSound = Sounds.shotgun;
shootSound = Sounds.fuse;
coolant = consumeCoolant(0.3f);
float brange = range + 10f;
@@ -3917,25 +3918,31 @@ public class Blocks{
ripple = new ItemTurret("ripple"){{
requirements(Category.turret, with(Items.copper, 150, Items.graphite, 135, Items.titanium, 60));
ammo(
Items.graphite, new ArtilleryBulletType(3f, 20){{
Items.graphite, new ArtilleryBulletType(3f, 40){{
hitEffect = new MultiEffect(Fx.flakExplosion, Fx.shockwaveSmaller);
knockback = 0.8f;
lifetime = 80f;
width = height = 11f;
width = 12f;
height = 14f;
collidesTiles = false;
splashDamageRadius = 25f * 0.75f;
splashDamage = 33f;
splashDamageRadius = 30f * 0.75f;
splashDamage = 70f;
backColor = hitColor = trailColor = Pal.graphiteAmmoBack;
frontColor = Pal.graphiteAmmoFront;
despawnEffect = Fx.hitBulletColor;
lifeScaleRandMax = 1.08f;
lifeScaleRandMin = 0.95f;
}},
Items.silicon, new ArtilleryBulletType(3f, 20){{
Items.silicon, new ArtilleryBulletType(3f, 40){{
hitEffect = new MultiEffect(Fx.flakExplosion, Fx.shockwaveSmaller);
knockback = 0.8f;
lifetime = 80f;
width = height = 11f;
width = 12f;
height = 14f;
collidesTiles = false;
splashDamageRadius = 25f * 0.75f;
splashDamage = 33f;
splashDamageRadius = 30f * 0.75f;
splashDamage = 70f;
reloadMultiplier = 1.2f;
ammoMultiplier = 3f;
homingPower = 0.08f;
@@ -3947,15 +3954,18 @@ public class Blocks{
despawnEffect = Fx.hitBulletColor;
backColor = hitColor = trailColor = Pal.siliconAmmoBack;
frontColor = Pal.siliconAmmoFront;
lifeScaleRandMax = 1.08f;
lifeScaleRandMin = 0.95f;
}},
Items.pyratite, new ArtilleryBulletType(3f, 24){{
hitEffect = Fx.blastExplosion;
Items.pyratite, new ArtilleryBulletType(3f, 48){{
hitEffect = new MultiEffect(Fx.blastExplosion, Fx.shockwave);
knockback = 0.8f;
lifetime = 80f;
width = height = 13f;
width = 13f;
height = 15f;
collidesTiles = false;
splashDamageRadius = 25f * 0.75f;
splashDamage = 45f;
splashDamageRadius = 30f * 0.75f;
splashDamage = 90f;
status = StatusEffects.burning;
statusDuration = 60f * 12f;
frontColor = Pal.lightishOrange;
@@ -3964,31 +3974,37 @@ public class Blocks{
trailEffect = Fx.incendTrail;
ammoMultiplier = 4f;
despawnEffect = Fx.hitBulletColor;
lifeScaleRandMax = 1.08f;
lifeScaleRandMin = 0.95f;
}},
Items.blastCompound, new ArtilleryBulletType(2f, 20, "shell"){{
hitEffect = Fx.blastExplosion;
Items.blastCompound, new ArtilleryBulletType(2f, 40, "shell"){{
hitEffect = new MultiEffect(Fx.blastExplosion, Fx.shockwave);
knockback = 0.8f;
lifetime = 80f;
width = height = 14f;
width = 14f;
height = 16f;
collidesTiles = false;
ammoMultiplier = 4f;
splashDamageRadius = 45f * 0.75f;
splashDamage = 55f;
splashDamageRadius = 50f * 0.75f;
splashDamage = 90f;
status = StatusEffects.blasted;
lifeScaleRandMax = 1.08f;
lifeScaleRandMin = 0.95f;
despawnEffect = Fx.hitBulletColor;
despawnEffect = Fx.hitBulletColor;
backColor = hitColor = trailColor = Pal.blastAmmoBack;
frontColor = Pal.blastAmmoFront;
}},
Items.plastanium, new ArtilleryBulletType(3.4f, 20, "shell"){{
hitEffect = Fx.plasticExplosion;
Items.plastanium, new ArtilleryBulletType(3.4f, 40, "shell"){{
hitEffect = new MultiEffect(Fx.plasticExplosion, Fx.shockwave);
knockback = 1f;
lifetime = 80f;
width = height = 13f;
width = 13f;
height = 15f;
collidesTiles = false;
splashDamageRadius = 35f * 0.75f;
splashDamage = 45f;
splashDamageRadius = 40f * 0.75f;
splashDamage = 90f;
fragBullet = new BasicBulletType(2.5f, 10, "bullet"){{
width = 10f;
height = 12f;
@@ -4002,18 +4018,21 @@ public class Blocks{
fragBullets = 10;
backColor = Pal.plastaniumBack;
frontColor = Pal.plastaniumFront;
lifeScaleRandMax = 1.08f;
lifeScaleRandMin = 0.95f;
}}
);
targetAir = false;
size = 3;
shoot.shots = 4;
inaccuracy = 12f;
reload = 60f;
inaccuracy = 11f;
reload = 120f;
ammoEjectBack = 5f;
ammoUseEffect = Fx.casing3Double;
ammoPerShot = 2;
velocityRnd = 0.2f;
scaleLifetimeOffset = 1f / 9f;
recoil = 6f;
shake = 2f;
@@ -4135,7 +4154,7 @@ public class Blocks{
rotateSpeed = 10f;
inaccuracy = 10f;
shootCone = 30f;
shootSound = Sounds.shootSnap;
shootSound = Sounds.shootCyclone;
coolant = consumeCoolant(0.3f);
scaledHealth = 145;
@@ -4243,7 +4262,7 @@ public class Blocks{
shake = 2f;
size = 4;
shootCone = 24f;
shootSound = Sounds.shootBig;
shootSound = Sounds.shootSpectre;
scaledHealth = 160;
coolant = consumeCoolant(1f);

View File

@@ -1530,6 +1530,12 @@ public class Fx{
Lines.circle(e.x, e.y, e.fin() * 28f);
}),
shockwaveSmaller = new Effect(9f, 80f, e -> {
color(Color.white, Color.lightGray, e.fin());
stroke(e.fout() * 2f + 0.2f);
Lines.circle(e.x, e.y, e.fin() * 22f);
}),
bigShockwave = new Effect(10f, 80f, e -> {
color(Color.white, Color.lightGray, e.fin());
stroke(e.fout() * 3f);

View File

@@ -197,6 +197,8 @@ public class UnitTypes{
stepShake = 0.15f;
singleTarget = true;
drownTimeMultiplier = 1.5f;
stepSound = Sounds.mechStep;
stepSoundVolume = 0.25f;
abilities.add(new ShieldRegenFieldAbility(25f, 250f, 60f * 1, 60f));
@@ -266,6 +268,7 @@ public class UnitTypes{
mechFrontSway = 1.9f;
mechSideSway = 0.6f;
ammoType = new ItemAmmoType(Items.thorium);
stepSound = Sounds.mechStep;
weapons.add(
new Weapon("reign-weapon"){{
@@ -475,6 +478,8 @@ public class UnitTypes{
immunities = ObjectSet.with(StatusEffects.burning);
singleTarget = true;
stepSound = Sounds.mechStep;
stepSoundVolume = 0.25f;
weapons.add(new Weapon("vela-weapon"){{
mirror = false;
@@ -1813,7 +1818,7 @@ public class UnitTypes{
shake = 6f;
recoil = 10.5f;
shadow = 50f;
shootSound = Sounds.railgun;
shootSound = Sounds.shootOmura;
ejectEffect = Fx.none;