Minor sound tweaks

This commit is contained in:
Anuken
2022-08-25 15:09:21 -04:00
parent 276a59b874
commit 8dca512b37
7 changed files with 28 additions and 10 deletions

View File

@@ -60,7 +60,7 @@ public class BeamDrill extends Block{
solid = true;
drawArrow = false;
regionRotated1 = 1;
ambientSoundVolume = 0.04f;
ambientSoundVolume = 0.05f;
ambientSound = Sounds.minebeam;
envEnabled |= Env.space;

View File

@@ -34,6 +34,7 @@ public class Reconstructor extends UnitBlock{
regionRotated1 = 1;
regionRotated2 = 2;
commandable = true;
ambientSound = Sounds.respawning;
}
@Override
@@ -134,6 +135,11 @@ public class Reconstructor extends UnitBlock{
return progress / constructTime;
}
@Override
public boolean shouldActiveSound(){
return shouldConsume();
}
@Override
public Vec2 getCommandPosition(){
return commandPos;

View File

@@ -35,6 +35,7 @@ public class UnitCargoLoader extends Block{
update = true;
hasItems = true;
itemCapacity = 200;
ambientSound = Sounds.respawning;
}
@Override
@@ -133,6 +134,11 @@ public class UnitCargoLoader extends Block{
return unit == null;
}
@Override
public boolean shouldActiveSound(){
return shouldConsume() && warmup > 0.01f;
}
@Override
public void draw(){
Draw.rect(block.region, x, y);

View File

@@ -42,6 +42,7 @@ public class UnitFactory extends UnitBlock{
rotate = true;
regionRotated1 = 1;
commandable = true;
ambientSound = Sounds.respawning;
config(Integer.class, (UnitFactoryBuild tile, Integer i) -> {
if(!configurable) return;
@@ -194,6 +195,11 @@ public class UnitFactory extends UnitBlock{
return super.senseObject(sensor);
}
@Override
public boolean shouldActiveSound(){
return shouldConsume();
}
@Override
public double sense(LAccess sensor){
if(sensor == LAccess.progress) return Mathf.clamp(fraction());