Rotation & repair sounds / Explosion sound rename

This commit is contained in:
Anuken
2025-12-10 11:55:00 -05:00
parent c5656278ad
commit dc4eada23f
29 changed files with 55 additions and 36 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -19,10 +19,11 @@ public class SoundPriority{
beamMeltdown, beamMeltdown,
beamLustre, beamLustre,
beamPlasma, beamPlasma,
reactorExplosion, explosionReactor,
reactorExplosion2, explosionReactor2,
coreExplode, explosionReactorNeoplasm,
blockExplodeElectricBig, blockExplodeExplosive explosionCore,
blockExplodeElectricBig, blockExplodeExplosive, blockExplodeExplosiveAlt
); );
//priority 1.5: big weapon sounds, not loops //priority 1.5: big weapon sounds, not loops
@@ -35,7 +36,14 @@ public class SoundPriority{
shootCorvus, shootCorvus,
chargeCorvus, chargeCorvus,
chargeVela, chargeVela,
chargeLancer chargeLancer,
shootReign,
shootEclipse,
shootArtillerySapBig,
shootToxopidShotgun,
beamPlasmaSmall,
shootNavanax,
explosionNavanax
); );
//priority 1: ambient noises //priority 1: ambient noises
@@ -78,7 +86,7 @@ public class SoundPriority{
//step sounds are low priority //step sounds are low priority
set(-2f, mechStep, mechStepHeavy, walkerStep, walkerStepSmall, walkerStepTiny, mechStepSmall); set(-2f, mechStep, mechStepHeavy, walkerStep, walkerStepSmall, walkerStepTiny, mechStepSmall);
coreExplode.setFalloffOffset(100f); explosionCore.setFalloffOffset(100f);
} }
static void max(int max, Sound... sounds){ static void max(int max, Sound... sounds){

View File

@@ -2807,7 +2807,7 @@ public class Blocks{
explosionRadius = 9; explosionRadius = 9;
explosionDamage = 2000; explosionDamage = 2000;
explodeEffect = new MultiEffect(Fx.bigShockwave, new WrapEffect(Fx.titanSmoke, Liquids.neoplasm.color), Fx.neoplasmSplat); explodeEffect = new MultiEffect(Fx.bigShockwave, new WrapEffect(Fx.titanSmoke, Liquids.neoplasm.color), Fx.neoplasmSplat);
explodeSound = Sounds.largeExplosion; explodeSound = Sounds.explosionReactorNeoplasm;
powerProduction = 140f; powerProduction = 140f;
@@ -4619,7 +4619,7 @@ public class Blocks{
backColor = hitColor = trailColor = Color.valueOf("ea8878").lerp(Pal.redLight, 0.5f); backColor = hitColor = trailColor = Color.valueOf("ea8878").lerp(Pal.redLight, 0.5f);
frontColor = Color.white; frontColor = Color.white;
ammoMultiplier = 1f; ammoMultiplier = 1f;
hitSound = Sounds.titanExplosion; hitSound = Sounds.explosionTitan;
status = StatusEffects.blasted; status = StatusEffects.blasted;
@@ -4653,7 +4653,7 @@ public class Blocks{
backColor = hitColor = trailColor = Color.valueOf("ab8ec5"); backColor = hitColor = trailColor = Color.valueOf("ab8ec5");
frontColor = Color.white; frontColor = Color.white;
ammoMultiplier = 1f; ammoMultiplier = 1f;
hitSound = Sounds.titanExplosion; hitSound = Sounds.explosionTitan;
status = StatusEffects.blasted; status = StatusEffects.blasted;
@@ -4713,7 +4713,7 @@ public class Blocks{
hitColor = backColor = trailColor = Color.valueOf("a0b380"); hitColor = backColor = trailColor = Color.valueOf("a0b380");
frontColor = Color.valueOf("e4ffd6"); frontColor = Color.valueOf("e4ffd6");
ammoMultiplier = 1f; ammoMultiplier = 1f;
hitSound = Sounds.titanExplosion; hitSound = Sounds.explosionTitan;
trailLength = 32; trailLength = 32;
trailWidth = 3.35f; trailWidth = 3.35f;
@@ -5007,7 +5007,7 @@ public class Blocks{
waveRad = 40f; waveRad = 40f;
}}; }};
despawnSound = Sounds.afflictExplosion; despawnSound = Sounds.explosionAfflict;
shootSound = Sounds.shootAfflict; shootSound = Sounds.shootAfflict;
fragBullet = intervalBullet = new BasicBulletType(3f, 35){{ fragBullet = intervalBullet = new BasicBulletType(3f, 35){{
@@ -5183,7 +5183,7 @@ public class Blocks{
lowAltitude = true; lowAltitude = true;
loopSound = Sounds.loopMissileTrail; loopSound = Sounds.loopMissileTrail;
loopSoundVolume = 0.6f; loopSoundVolume = 0.6f;
deathSound = Sounds.largeExplosion; deathSound = Sounds.explosionMissile;
targetAir = false; targetAir = false;
targetUnderBlocks = false; targetUnderBlocks = false;
@@ -5270,7 +5270,7 @@ public class Blocks{
lowAltitude = true; lowAltitude = true;
loopSound = Sounds.loopMissileTrail; loopSound = Sounds.loopMissileTrail;
loopSoundVolume = 0.6f; loopSoundVolume = 0.6f;
deathSound = Sounds.largeExplosion; deathSound = Sounds.explosionMissile;
targetAir = false; targetAir = false;
targetUnderBlocks = false; targetUnderBlocks = false;
@@ -5376,7 +5376,7 @@ public class Blocks{
lowAltitude = true; lowAltitude = true;
loopSound = Sounds.loopMissileTrail; loopSound = Sounds.loopMissileTrail;
loopSoundVolume = 0.6f; loopSoundVolume = 0.6f;
deathSound = Sounds.largeExplosion; deathSound = Sounds.explosionMissile;
targetAir = false; targetAir = false;
targetUnderBlocks = false; targetUnderBlocks = false;
@@ -5431,7 +5431,7 @@ public class Blocks{
lowAltitude = true; lowAltitude = true;
loopSound = Sounds.loopMissileTrail; loopSound = Sounds.loopMissileTrail;
loopSoundVolume = 0.6f; loopSoundVolume = 0.6f;
deathSound = Sounds.largeExplosion; deathSound = Sounds.explosionMissile;
targetAir = false; targetAir = false;
targetUnderBlocks = false; targetUnderBlocks = false;

View File

@@ -648,7 +648,7 @@ public class UnitTypes{
reload = 24f; reload = 24f;
shootCone = 180f; shootCone = 180f;
ejectEffect = Fx.none; ejectEffect = Fx.none;
shootSound = Sounds.crawlerExplosion; shootSound = Sounds.explosionCrawler;
shootSoundVolume = 0.4f; shootSoundVolume = 0.4f;
x = shootY = 0f; x = shootY = 0f;
mirror = false; mirror = false;
@@ -864,7 +864,7 @@ public class UnitTypes{
bullet = new ArtilleryBulletType(2f, 12){{ bullet = new ArtilleryBulletType(2f, 12){{
hitEffect = Fx.sapExplosion; hitEffect = Fx.sapExplosion;
despawnSound = Sounds.artilleryShockExplosion; despawnSound = Sounds.explosionArtilleryShock;
knockback = 0.8f; knockback = 0.8f;
lifetime = 70f; lifetime = 70f;
width = height = 19f; width = height = 19f;
@@ -965,7 +965,7 @@ public class UnitTypes{
rotationLimit = 80f; rotationLimit = 80f;
bullet = new ArtilleryBulletType(3f, 50){{ bullet = new ArtilleryBulletType(3f, 50){{
despawnSound = Sounds.artilleryShockExplosionBig; despawnSound = Sounds.explosionArtilleryShockBig;
hitEffect = Fx.sapExplosion; hitEffect = Fx.sapExplosion;
knockback = 0.8f; knockback = 0.8f;
lifetime = 80f; lifetime = 80f;
@@ -991,7 +991,7 @@ public class UnitTypes{
fragBullets = 9; fragBullets = 9;
fragBullet = new ArtilleryBulletType(2.3f, 30){{ fragBullet = new ArtilleryBulletType(2.3f, 30){{
despawnSound = Sounds.artilleryShockExplosion; despawnSound = Sounds.explosionArtilleryShock;
hitEffect = Fx.sapExplosion; hitEffect = Fx.sapExplosion;
knockback = 0.8f; knockback = 0.8f;
lifetime = 90f; lifetime = 90f;
@@ -1481,7 +1481,7 @@ public class UnitTypes{
frontColor = Color.white; frontColor = Color.white;
mixColorTo = Color.white; mixColorTo = Color.white;
hitSound = Sounds.explodePlasma; hitSound = Sounds.explosionQuad;
shootCone = 180f; shootCone = 180f;
ejectEffect = Fx.none; ejectEffect = Fx.none;
@@ -2451,9 +2451,9 @@ public class UnitTypes{
x = 2.75f; x = 2.75f;
y = 1f; y = 1f;
top = false; top = false;
shootSound = Sounds.shootAlpha;
bullet = new LaserBoltBulletType(2.5f, 11){{ bullet = new LaserBoltBulletType(2.5f, 11){{
shootSound = Sounds.shootAlpha;
keepVelocity = false; keepVelocity = false;
width = 1.5f; width = 1.5f;
height = 4.5f; height = 4.5f;
@@ -2500,9 +2500,9 @@ public class UnitTypes{
recoil = 1f; recoil = 1f;
shoot.shots = 2; shoot.shots = 2;
shoot.shotDelay = 4f; shoot.shotDelay = 4f;
shootSound = Sounds.shootAlpha;
bullet = new LaserBoltBulletType(3f, 11){{ bullet = new LaserBoltBulletType(3f, 11){{
shootSound = Sounds.shootAlpha;
keepVelocity = false; keepVelocity = false;
width = 1.5f; width = 1.5f;
height = 4.5f; height = 4.5f;
@@ -2553,9 +2553,9 @@ public class UnitTypes{
}}; }};
inaccuracy = 3f; inaccuracy = 3f;
shootSound = Sounds.shootAlpha;
bullet = new LaserBoltBulletType(3.5f, 11){{ bullet = new LaserBoltBulletType(3.5f, 11){{
shootSound = Sounds.shootAlpha;
keepVelocity = false; keepVelocity = false;
width = 1.5f; width = 1.5f;
height = 5f; height = 5f;
@@ -2721,7 +2721,7 @@ public class UnitTypes{
researchCostMultiplier = 0f; researchCostMultiplier = 0f;
weapons.add(new Weapon("precept-weapon"){{ weapons.add(new Weapon("precept-weapon"){{
shootSound = Sounds.dullExplosion; shootSound = Sounds.explosionDull;
layerOffset = 0.0001f; layerOffset = 0.0001f;
reload = 80f; reload = 80f;
shootY = 16f; shootY = 16f;
@@ -2835,7 +2835,7 @@ public class UnitTypes{
fragSpread = 10f; fragSpread = 10f;
fragBullets = 5; fragBullets = 5;
fragVelocityMin = 1f; fragVelocityMin = 1f;
despawnSound = Sounds.dullExplosion; despawnSound = Sounds.explosionDull;
fragBullet = new BasicBulletType(8f, 35){{ fragBullet = new BasicBulletType(8f, 35){{
sprite = "missile-large"; sprite = "missile-large";
@@ -3507,7 +3507,7 @@ public class UnitTypes{
trailWidth = 2.8f; trailWidth = 2.8f;
trailLength = 20; trailLength = 20;
trailChance = -1f; trailChance = -1f;
despawnSound = Sounds.dullExplosion; despawnSound = Sounds.explosionDull;
despawnEffect = Fx.none; despawnEffect = Fx.none;
hitEffect = new ExplosionEffect(){{ hitEffect = new ExplosionEffect(){{
@@ -3629,7 +3629,7 @@ public class UnitTypes{
trailChance = -1f; trailChance = -1f;
despawnEffect = Fx.none; despawnEffect = Fx.none;
despawnSound = Sounds.dullExplosion; despawnSound = Sounds.explosionDull;
hitEffect = despawnEffect = new ExplosionEffect(){{ hitEffect = despawnEffect = new ExplosionEffect(){{
lifetime = 50f; lifetime = 50f;
@@ -3876,7 +3876,7 @@ public class UnitTypes{
}}); }});
smokeEffect = Fx.shootSmokeTitan; smokeEffect = Fx.shootSmokeTitan;
hitColor = Pal.sapBullet; hitColor = Pal.sapBullet;
despawnSound = Sounds.artilleryShockExplosion; despawnSound = Sounds.explosionArtilleryShock;
sprite = "large-orb"; sprite = "large-orb";
trailEffect = Fx.missileTrail; trailEffect = Fx.missileTrail;

View File

@@ -14,7 +14,7 @@ public class ArtilleryBulletType extends BasicBulletType{
collidesAir = false; collidesAir = false;
scaleLife = true; scaleLife = true;
hitShake = 1f; hitShake = 1f;
hitSound = Sounds.artilleryExplosion; hitSound = Sounds.explosionArtillery;
hitEffect = Fx.flakExplosion; hitEffect = Fx.flakExplosion;
shootEffect = Fx.shootBig; shootEffect = Fx.shootBig;
trailEffect = Fx.artilleryTrail; trailEffect = Fx.artilleryTrail;

View File

@@ -682,6 +682,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
build.updateProximity(); build.updateProximity();
build.noSleep(); build.noSleep();
Fx.rotateBlock.at(build.x, build.y, build.block.size); Fx.rotateBlock.at(build.x, build.y, build.block.size);
if(!headless) Sounds.blockRotate.at(build, 1f + Mathf.range(0.1f), 1f);
Events.fire(new BuildRotateEvent(build, player == null ? null : player.unit(), previous)); Events.fire(new BuildRotateEvent(build, player == null ? null : player.unit(), previous));
} }

View File

@@ -1263,7 +1263,7 @@ public class Block extends UnlockableContent implements Senseable{
if(destroySound == Sounds.unset){ if(destroySound == Sounds.unset){
destroySound = destroySound =
size >= 3 ? Sounds.blockExplode3 : size >= 3 ? Sounds.blockExplode3 :
size >= 2 ? Sounds.blockExplode2 : size >= 2 ? new RandomSound(Sounds.blockExplode2, Sounds.blockExplode2Alt) :
new RandomSound(Sounds.blockExplode1, Sounds.blockExplode1Alt); new RandomSound(Sounds.blockExplode1, Sounds.blockExplode1Alt);
} }

View File

@@ -87,6 +87,7 @@ public class Build{
tile.build.noSleep(); tile.build.noSleep();
Fx.rotateBlock.at(tile.build.x, tile.build.y, tile.build.block.size); Fx.rotateBlock.at(tile.build.x, tile.build.y, tile.build.block.size);
Events.fire(new BuildRotateEvent(tile.build, unit, previous)); Events.fire(new BuildRotateEvent(tile.build, unit, previous));
if(!headless) Sounds.blockRotate.at(tile.build, 1f + Mathf.range(0.1f), 1f);
return; return;
} }
@@ -108,7 +109,7 @@ public class Build{
if(fogControl.isVisibleTile(team, tile.x, tile.y)){ if(fogControl.isVisibleTile(team, tile.x, tile.y)){
result.placeEffect.at(tile.drawx(), tile.drawy(), result.size); result.placeEffect.at(tile.drawx(), tile.drawy(), result.size);
Fx.rotateBlock.at(tile.build.x, tile.build.y, tile.build.block.size); Fx.rotateBlock.at(tile.build.x, tile.build.y, tile.build.block.size);
//doesn't play a sound ConstructBlock.playRepairSound(team, tile);
} }
Events.fire(new BlockBuildEndEvent(tile, unit, team, false, tile.build.config())); Events.fire(new BlockBuildEndEvent(tile, unit, team, false, tile.build.config()));

View File

@@ -144,6 +144,10 @@ public class ConstructBlock extends Block{
} }
} }
public static void playRepairSound(Team team, Tile tile){
if(!headless && shouldPlay() && fogControl.isVisibleTile(team, tile.x, tile.y)) Sounds.blockRepair.at(tile, calcPitch(true));
}
public static void constructed(Tile tile, Block block, Unit builder, byte rotation, Team team, Object config){ public static void constructed(Tile tile, Block block, Unit builder, byte rotation, Team team, Object config){
Call.constructFinish(tile, block, builder, rotation, team, config); Call.constructFinish(tile, block, builder, rotation, team, config);
if(tile.build != null){ if(tile.build != null){

View File

@@ -41,7 +41,6 @@ public class Wall extends Block{
//it's a wall of course it's supported everywhere //it's a wall of course it's supported everywhere
envEnabled = Env.any; envEnabled = Env.any;
destroySound = Sounds.blockExplodeWall;
} }
@Override @Override
@@ -55,6 +54,12 @@ public class Wall extends Block{
} }
} }
@Override
public void init(){
if(size == 2 && destroySound == Sounds.unset) destroySound = Sounds.blockExplodeWall;
super.init();
}
@Override @Override
public TextureRegion[] icons(){ public TextureRegion[] icons(){
return new TextureRegion[]{Core.atlas.find(Core.atlas.has(name) ? name : name + "1")}; return new TextureRegion[]{Core.atlas.find(Core.atlas.has(name) ? name : name + "1")};

View File

@@ -38,7 +38,7 @@ public class ImpactReactor extends PowerGenerator{
explosionDamage = 1900 * 4; explosionDamage = 1900 * 4;
explosionMinWarmup = 0.3f; explosionMinWarmup = 0.3f;
explodeEffect = Fx.impactReactorExplosion; explodeEffect = Fx.impactReactorExplosion;
explodeSound = Sounds.reactorExplosion2; explodeSound = Sounds.explosionReactor2;
} }
@Override @Override

View File

@@ -68,7 +68,7 @@ public class NuclearReactor extends PowerGenerator{
explosionDamage = 1250 * 4; explosionDamage = 1250 * 4;
explodeEffect = Fx.reactorExplosion; explodeEffect = Fx.reactorExplosion;
explodeSound = Sounds.reactorExplosion; explodeSound = Sounds.explosionReactor;
} }
@Override @Override

View File

@@ -41,7 +41,7 @@ public class VariableReactor extends PowerGenerator{
explosionRadius = 16; explosionRadius = 16;
explosionDamage = 1500; explosionDamage = 1500;
explodeEffect = new MultiEffect(Fx.bigShockwave, new WrapEffect(Fx.titanSmoke, Color.valueOf("e3ae6f"))); explodeEffect = new MultiEffect(Fx.bigShockwave, new WrapEffect(Fx.titanSmoke, Color.valueOf("e3ae6f")));
explodeSound = Sounds.reactorExplosion2; explodeSound = Sounds.explosionReactor2;
explosionPuddles = 70; explosionPuddles = 70;
explosionPuddleRange = tilesize * 6f; explosionPuddleRange = tilesize * 6f;

View File

@@ -82,7 +82,7 @@ public class CoreBlock extends StorageBlock{
//support everything //support everything
replaceable = false; replaceable = false;
destroySound = Sounds.coreExplode; destroySound = Sounds.explosionCore;
destroySoundVolume = 1.6f; destroySoundVolume = 1.6f;
} }