Back to OGG

This commit is contained in:
Anuken
2020-11-11 10:55:19 -05:00
parent 4f4f8f08bb
commit a4f5c1c55f
139 changed files with 54 additions and 7 deletions

View File

@@ -26,6 +26,7 @@ public class LiquidTurret extends Turret{
acceptCoolant = false;
hasLiquids = true;
loopSound = Sounds.spray;
shootSound = Sounds.none;
}
/** Initializes accepted ammo map. Format: [liquid1, bullet1, liquid2, bullet2...] */
@@ -75,7 +76,7 @@ public class LiquidTurret extends Turret{
@Override
public boolean shouldActiveSound(){
return target != null && hasAmmo();
return wasShooting;
}
@Override

View File

@@ -136,6 +136,7 @@ public abstract class Turret extends ReloadTurret{
public @Nullable Posc target;
public Vec2 targetPos = new Vec2();
public BlockUnitc unit = Nulls.blockUnit;
public boolean wasShooting;
@Override
public void created(){
@@ -176,11 +177,15 @@ public abstract class Turret extends ReloadTurret{
case rotation -> rotation;
case shootX -> World.conv(targetPos.x);
case shootY -> World.conv(targetPos.y);
case shooting -> (isControlled() ? unit.isShooting() : logicControlled() ? logicShooting : validateTarget()) ? 1 : 0;
case shooting -> isShooting() ? 1 : 0;
default -> super.sense(sensor);
};
}
public boolean isShooting(){
return (isControlled() ? unit.isShooting() : logicControlled() ? logicShooting : target != null);
}
@Override
public Unit unit(){
return (Unit)unit;
@@ -228,6 +233,8 @@ public abstract class Turret extends ReloadTurret{
public void updateTile(){
if(!validateTarget()) target = null;
wasShooting = false;
recoil = Mathf.lerpDelta(recoil, 0f, restitution);
heat = Mathf.lerpDelta(heat, 0f, cooldown);
@@ -269,6 +276,7 @@ public abstract class Turret extends ReloadTurret{
}
if(Angles.angleDist(rotation, targetRot) < shootCone && canShoot){
wasShooting = true;
updateShooting();
}
}

View File

@@ -42,7 +42,7 @@ public class Conveyor extends Block implements Autotiler{
conveyorPlacement = true;
ambientSound = Sounds.conveyor;
ambientSoundVolume = 0.0015f;
ambientSoundVolume = 0.0022f;
unloadable = false;
noUpdateDisabled = false;
}

View File

@@ -67,7 +67,7 @@ public class Drill extends Block{
liquidCapacity = 5f;
hasItems = true;
ambientSound = Sounds.drill;
ambientSoundVolume = 0.016f;
ambientSoundVolume = 0.015f;
}
@Override