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

Binary file not shown.

View file

@ -1263,6 +1263,7 @@ public class Blocks{
size = 2;
heatOutput = 3f;
regionRotated1 = 1;
ambientSound = Sounds.hum;
consumePower(100f / 60f);
}};
@ -1276,6 +1277,7 @@ public class Blocks{
liquidCapacity = 40f;
rotateDraw = false;
regionRotated1 = 1;
ambientSound = Sounds.hum;
consumeLiquid(Liquids.slag, 40f / 60f);
heatOutput = 8f;
}};
@ -1287,6 +1289,7 @@ public class Blocks{
size = 2;
heatOutput = 15f;
craftTime = 60f * 8f;
ambientSound = Sounds.hum;
consumeItem(Items.phaseFabric);
}};
@ -3650,13 +3653,13 @@ public class Blocks{
requirements(Category.turret, with(Items.copper, 200, Items.titanium, 125, Items.plastanium, 80));
ammo(
Items.metaglass, new FlakBulletType(4f, 10){{
ammoMultiplier = 3f;
ammoMultiplier = 2f;
shootEffect = Fx.shootSmall;
reloadMultiplier = 0.8f;
width = 6f;
height = 8f;
hitEffect = Fx.flakExplosion;
splashDamage = 55f;
splashDamage = 50f;
splashDamageRadius = 25f;
fragBullet = new BasicBulletType(3f, 12, "bullet"){{
width = 5f;
@ -3674,7 +3677,7 @@ public class Blocks{
Items.blastCompound, new FlakBulletType(4f, 5){{
shootEffect = Fx.shootBig;
ammoMultiplier = 5f;
splashDamage = 26f * 1.5f;
splashDamage = 30f * 1.5f;
splashDamageRadius = 60f;
collidesGround = true;
@ -3682,6 +3685,7 @@ public class Blocks{
statusDuration = 60f;
}},
Items.plastanium, new FlakBulletType(4f, 6){{
ammoMultiplier = 4f;
splashDamageRadius = 40f;
splashDamage = 25f * 1.5f;
fragBullet = new BasicBulletType(2.5f, 12, "bullet"){{

View file

@ -661,12 +661,8 @@ public class LExecutor{
int address = exec.numi(position);
Building from = exec.building(target);
if(from instanceof MemoryBuild mem && (exec.privileged || from.team == exec.team)){
if(address >= 0 && address < mem.memory.length){
mem.memory[address] = exec.num(value);
}
if(from instanceof MemoryBuild mem && (exec.privileged || from.team == exec.team) && address >= 0 && address < mem.memory.length){
mem.memory[address] = exec.num(value);
}
}
}

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());