Rotation & repair sounds / Explosion sound rename
This commit is contained in:
@@ -1263,7 +1263,7 @@ public class Block extends UnlockableContent implements Senseable{
|
||||
if(destroySound == Sounds.unset){
|
||||
destroySound =
|
||||
size >= 3 ? Sounds.blockExplode3 :
|
||||
size >= 2 ? Sounds.blockExplode2 :
|
||||
size >= 2 ? new RandomSound(Sounds.blockExplode2, Sounds.blockExplode2Alt) :
|
||||
new RandomSound(Sounds.blockExplode1, Sounds.blockExplode1Alt);
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@ public class Build{
|
||||
tile.build.noSleep();
|
||||
Fx.rotateBlock.at(tile.build.x, tile.build.y, tile.build.block.size);
|
||||
Events.fire(new BuildRotateEvent(tile.build, unit, previous));
|
||||
if(!headless) Sounds.blockRotate.at(tile.build, 1f + Mathf.range(0.1f), 1f);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -108,7 +109,7 @@ public class Build{
|
||||
if(fogControl.isVisibleTile(team, tile.x, tile.y)){
|
||||
result.placeEffect.at(tile.drawx(), tile.drawy(), result.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()));
|
||||
|
||||
@@ -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){
|
||||
Call.constructFinish(tile, block, builder, rotation, team, config);
|
||||
if(tile.build != null){
|
||||
|
||||
@@ -41,7 +41,6 @@ public class Wall extends Block{
|
||||
|
||||
//it's a wall of course it's supported everywhere
|
||||
envEnabled = Env.any;
|
||||
destroySound = Sounds.blockExplodeWall;
|
||||
}
|
||||
|
||||
@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
|
||||
public TextureRegion[] icons(){
|
||||
return new TextureRegion[]{Core.atlas.find(Core.atlas.has(name) ? name : name + "1")};
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ImpactReactor extends PowerGenerator{
|
||||
explosionDamage = 1900 * 4;
|
||||
explosionMinWarmup = 0.3f;
|
||||
explodeEffect = Fx.impactReactorExplosion;
|
||||
explodeSound = Sounds.reactorExplosion2;
|
||||
explodeSound = Sounds.explosionReactor2;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -68,7 +68,7 @@ public class NuclearReactor extends PowerGenerator{
|
||||
explosionDamage = 1250 * 4;
|
||||
|
||||
explodeEffect = Fx.reactorExplosion;
|
||||
explodeSound = Sounds.reactorExplosion;
|
||||
explodeSound = Sounds.explosionReactor;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -41,7 +41,7 @@ public class VariableReactor extends PowerGenerator{
|
||||
explosionRadius = 16;
|
||||
explosionDamage = 1500;
|
||||
explodeEffect = new MultiEffect(Fx.bigShockwave, new WrapEffect(Fx.titanSmoke, Color.valueOf("e3ae6f")));
|
||||
explodeSound = Sounds.reactorExplosion2;
|
||||
explodeSound = Sounds.explosionReactor2;
|
||||
|
||||
explosionPuddles = 70;
|
||||
explosionPuddleRange = tilesize * 6f;
|
||||
|
||||
@@ -82,7 +82,7 @@ public class CoreBlock extends StorageBlock{
|
||||
|
||||
//support everything
|
||||
replaceable = false;
|
||||
destroySound = Sounds.coreExplode;
|
||||
destroySound = Sounds.explosionCore;
|
||||
destroySoundVolume = 1.6f;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user