More sound effects + core destruction sound

This commit is contained in:
Anuken
2025-12-06 23:14:08 -05:00
parent 65c63c292e
commit e255912156
19 changed files with 130 additions and 8 deletions
@@ -2178,7 +2178,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
public void killed(){
dead = true;
Events.fire(new BlockDestroyEvent(tile));
block.destroySound.at(tile, Mathf.random(block.destroyPitchMin, block.destroyPitchMax));
if(!headless) playDestroySound();
onDestroyed();
if(tile != emptyTile){
tile.remove();
@@ -2187,6 +2187,10 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
afterDestroyed();
}
public void playDestroySound(){
block.destroySound.at(tile, Mathf.random(block.destroyPitchMin, block.destroyPitchMax), block.destroySoundVolume);
}
public void checkAllowUpdate(){
if(!allowUpdate()){
enabled = false;