Merge branch 'new-sounds' of https://github.com/Anuken/Mindustry
This commit is contained in:
@@ -3,6 +3,7 @@ package mindustry.world.blocks.campaign;
|
||||
import arc.*;
|
||||
import arc.Graphics.*;
|
||||
import arc.Graphics.Cursor.*;
|
||||
import arc.audio.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
@@ -52,6 +53,10 @@ public class LandingPad extends Block{
|
||||
public float liquidPad = 2f;
|
||||
public Color bottomColor = Pal.darkerMetal;
|
||||
|
||||
public float landSoundVolume = 0.75f;
|
||||
//impact timing must be exactly equal to arrivalDuration
|
||||
public Sound landSound = Sounds.padLand;
|
||||
|
||||
public LandingPad(String name){
|
||||
super(name);
|
||||
|
||||
@@ -145,6 +150,7 @@ public class LandingPad extends Block{
|
||||
arriving = config;
|
||||
arrivingTimer = 0f;
|
||||
liquidRemoved = 0f;
|
||||
landSound.at(x, y, 1f, landSoundVolume);
|
||||
|
||||
if(state.isCampaign() && !isFake()){
|
||||
state.rules.sector.info.importCooldownTimers.put(config, 0f);
|
||||
|
||||
@@ -30,7 +30,8 @@ import static mindustry.Vars.*;
|
||||
public class LaunchPad extends Block{
|
||||
/** Time between launches. */
|
||||
public float launchTime = 1f;
|
||||
public Sound launchSound = Sounds.none;
|
||||
public float launchSoundPitchRand = 0.1f;
|
||||
public Sound launchSound = Sounds.padLaunch;
|
||||
|
||||
public @Load("@-light") TextureRegion lightRegion;
|
||||
public @Load(value = "@-pod", fallback = "launchpod") TextureRegion podRegion;
|
||||
@@ -145,7 +146,7 @@ public class LaunchPad extends Block{
|
||||
if((launchCounter += edelta()) >= launchTime && items.total() >= itemCapacity){
|
||||
//if there are item requirements, use those.
|
||||
consume();
|
||||
launchSound.at(x, y);
|
||||
launchSound.at(x, y, 1f + Mathf.range(launchSoundPitchRand));
|
||||
LaunchPayload entity = LaunchPayload.create();
|
||||
items.each((item, amount) -> entity.stacks.add(new ItemStack(item, amount)));
|
||||
entity.set(this);
|
||||
|
||||
@@ -27,7 +27,7 @@ public class PointDefenseTurret extends ReloadTurret{
|
||||
public Effect hitEffect = Fx.pointHit;
|
||||
public Effect shootEffect = Fx.sparkShoot;
|
||||
|
||||
public Sound shootSound = Sounds.lasershoot;
|
||||
public Sound shootSound = Sounds.shootSegment;
|
||||
|
||||
public float shootCone = 5f;
|
||||
public float bulletDamage = 10f;
|
||||
|
||||
@@ -119,6 +119,8 @@ public class Turret extends ReloadTurret{
|
||||
public Effect ammoUseEffect = Fx.none;
|
||||
/** Sound emitted when a single bullet is shot. */
|
||||
public Sound shootSound = Sounds.shoot;
|
||||
/** Volume of shooting sound. */
|
||||
public float shootSoundVolume = 1f;
|
||||
/** Sound emitted when shoot.firstShotDelay is >0 and shooting begins. */
|
||||
public Sound chargeSound = Sounds.none;
|
||||
/** The sound that this block makes while active. One sound loop. Do not overuse. */
|
||||
@@ -735,7 +737,7 @@ public class Turret extends ReloadTurret{
|
||||
|
||||
(shootEffect == null ? type.shootEffect : shootEffect).at(bulletX, bulletY, rotation + angleOffset, type.hitColor);
|
||||
(smokeEffect == null ? type.smokeEffect : smokeEffect).at(bulletX, bulletY, rotation + angleOffset, type.hitColor);
|
||||
shootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax));
|
||||
shootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax), shootSoundVolume);
|
||||
|
||||
ammoUseEffect.at(
|
||||
x - Angles.trnsx(rotation, ammoEjectBack),
|
||||
|
||||
@@ -36,7 +36,9 @@ public class MassDriver extends Block{
|
||||
public Effect shootEffect = Fx.shootBig2;
|
||||
public Effect smokeEffect = Fx.shootBigSmoke2;
|
||||
public Effect receiveEffect = Fx.mineBig;
|
||||
public Sound shootSound = Sounds.shootBig;
|
||||
public Sound shootSound = Sounds.massdriver;
|
||||
public Sound receiveSound = Sounds.massdriverReceive;
|
||||
public float shootSoundVolume = 0.5f;
|
||||
public float shake = 3f;
|
||||
public @Load("@-base") TextureRegion baseRegion;
|
||||
|
||||
@@ -306,7 +308,7 @@ public class MassDriver extends Block{
|
||||
|
||||
Effect.shake(shake, shake, this);
|
||||
|
||||
shootSound.at(tile, Mathf.random(0.9f, 1.1f));
|
||||
shootSound.at(x, y, 1f + Mathf.range(0.2f), shootSoundVolume);
|
||||
}
|
||||
|
||||
public void handlePayload(Bullet bullet, DriverBulletData data){
|
||||
@@ -326,6 +328,7 @@ public class MassDriver extends Block{
|
||||
|
||||
Effect.shake(shake, shake, this);
|
||||
receiveEffect.at(bullet);
|
||||
receiveSound.at(x, y, 1f + Mathf.range(0.2f), shootSoundVolume);
|
||||
|
||||
reloadCounter = 1f;
|
||||
bullet.remove();
|
||||
|
||||
@@ -32,7 +32,9 @@ public class PayloadMassDriver extends PayloadBlock{
|
||||
public Effect shootEffect = Fx.shootBig2;
|
||||
public Effect smokeEffect = Fx.shootPayloadDriver;
|
||||
public Effect receiveEffect = Fx.payloadReceive;
|
||||
public Sound shootSound = Sounds.shootBig;
|
||||
public Sound shootSound = Sounds.massdriver;
|
||||
public Sound receiveSound = Sounds.massdriverReceive;
|
||||
public float shootSoundVolume = 0.7f;
|
||||
public float shake = 3f;
|
||||
|
||||
public Effect transferEffect = new Effect(11f, 600f, e -> {
|
||||
@@ -176,6 +178,7 @@ public class PayloadMassDriver extends PayloadBlock{
|
||||
receiveEffect.at(x - cx/2f, y - cy/2f, turretRotation);
|
||||
reloadCounter = 1f;
|
||||
Effect.shake(shake, shake, this);
|
||||
receiveSound.at(x, y, 1f + Mathf.range(0.2f), shootSoundVolume);
|
||||
}
|
||||
|
||||
charging = false;
|
||||
@@ -294,7 +297,7 @@ public class PayloadMassDriver extends PayloadBlock{
|
||||
smokeEffect.at(x, y, turretRotation);
|
||||
|
||||
Effect.shake(shake, shake, this);
|
||||
shootSound.at(this, Mathf.random(0.9f, 1.1f));
|
||||
shootSound.at(x, y, Mathf.random(0.9f, 1.1f), shootSoundVolume);
|
||||
transferEffect.at(x + cx, y + cy, turretRotation, new PayloadMassDriverData(x + cx, y + cy, other.x - cx, other.y - cy, payload));
|
||||
Payload pay = payload;
|
||||
other.recPayload = payload;
|
||||
|
||||
@@ -34,6 +34,8 @@ public class NuclearReactor extends PowerGenerator{
|
||||
public float heatOutput = 15f;
|
||||
/** rate at which heat progress increases */
|
||||
public float heatWarmupRate = 1f;
|
||||
/** time taken to cool down if no fuel is inputted even if coolant is not present*/
|
||||
public float ambientCooldownTime = 60f * 20f;
|
||||
/** threshold at which block starts smoking */
|
||||
public float smokeThreshold = 0.3f;
|
||||
/** heat threshold at which lights start flashing */
|
||||
@@ -66,7 +68,7 @@ public class NuclearReactor extends PowerGenerator{
|
||||
explosionDamage = 1250 * 4;
|
||||
|
||||
explodeEffect = Fx.reactorExplosion;
|
||||
explodeSound = Sounds.explosionbig;
|
||||
explodeSound = Sounds.reactorExplosion;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -104,6 +106,7 @@ public class NuclearReactor extends PowerGenerator{
|
||||
}
|
||||
}else{
|
||||
productionEfficiency = 0f;
|
||||
heat = Math.max(0f, heat - Time.delta / ambientCooldownTime);
|
||||
}
|
||||
|
||||
if(heat > 0){
|
||||
|
||||
@@ -82,7 +82,7 @@ public class Drill extends Block{
|
||||
liquidCapacity = 5f;
|
||||
hasItems = true;
|
||||
ambientSound = Sounds.drill;
|
||||
ambientSoundVolume = 0.018f;
|
||||
ambientSoundVolume = 0.019f;
|
||||
//drills work in space I guess
|
||||
envEnabled |= Env.space;
|
||||
flags = EnumSet.of(BlockFlag.drill);
|
||||
|
||||
Reference in New Issue
Block a user