More sounds

This commit is contained in:
Anuken
2025-11-10 22:48:01 -05:00
parent 3b10100ae4
commit d934a02791
7 changed files with 11 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -3828,7 +3828,7 @@ public class Blocks{
damage = 0.2f; damage = 0.2f;
layer = Layer.bullet - 2f; layer = Layer.bullet - 2f;
}}, }},
Liquids.slag, new LiquidBulletType(Liquids.slag){{ Liquids.slag, new LiquidBulletType(Liquids.slag){{
lifetime = 49f; lifetime = 49f;
speed = 4f; speed = 4f;
knockback = 1.3f; knockback = 1.3f;

View File

@@ -3,6 +3,7 @@ package mindustry.world.blocks.campaign;
import arc.*; import arc.*;
import arc.Graphics.*; import arc.Graphics.*;
import arc.Graphics.Cursor.*; import arc.Graphics.Cursor.*;
import arc.audio.*;
import arc.graphics.*; import arc.graphics.*;
import arc.graphics.g2d.*; import arc.graphics.g2d.*;
import arc.math.*; import arc.math.*;
@@ -52,6 +53,10 @@ public class LandingPad extends Block{
public float liquidPad = 2f; public float liquidPad = 2f;
public Color bottomColor = Pal.darkerMetal; public Color bottomColor = Pal.darkerMetal;
public float landSoundVolume = 0.75f;
//sound duration must be exactly equal to arrivalDuration
public Sound landSound = Sounds.padLand;
public LandingPad(String name){ public LandingPad(String name){
super(name); super(name);
@@ -145,6 +150,7 @@ public class LandingPad extends Block{
arriving = config; arriving = config;
arrivingTimer = 0f; arrivingTimer = 0f;
liquidRemoved = 0f; liquidRemoved = 0f;
landSound.at(x, y, 1f, landSoundVolume);
if(state.isCampaign() && !isFake()){ if(state.isCampaign() && !isFake()){
state.rules.sector.info.importCooldownTimers.put(config, 0f); state.rules.sector.info.importCooldownTimers.put(config, 0f);

View File

@@ -30,7 +30,8 @@ import static mindustry.Vars.*;
public class LaunchPad extends Block{ public class LaunchPad extends Block{
/** Time between launches. */ /** Time between launches. */
public float launchTime = 1f; 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("@-light") TextureRegion lightRegion;
public @Load(value = "@-pod", fallback = "launchpod") TextureRegion podRegion; 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((launchCounter += edelta()) >= launchTime && items.total() >= itemCapacity){
//if there are item requirements, use those. //if there are item requirements, use those.
consume(); consume();
launchSound.at(x, y); launchSound.at(x, y, 1f + Mathf.range(launchSoundPitchRand));
LaunchPayload entity = LaunchPayload.create(); LaunchPayload entity = LaunchPayload.create();
items.each((item, amount) -> entity.stacks.add(new ItemStack(item, amount))); items.each((item, amount) -> entity.stacks.add(new ItemStack(item, amount)));
entity.set(this); entity.set(this);

View File

@@ -82,7 +82,7 @@ public class Drill extends Block{
liquidCapacity = 5f; liquidCapacity = 5f;
hasItems = true; hasItems = true;
ambientSound = Sounds.drill; ambientSound = Sounds.drill;
ambientSoundVolume = 0.018f; ambientSoundVolume = 0.019f;
//drills work in space I guess //drills work in space I guess
envEnabled |= Env.space; envEnabled |= Env.space;
flags = EnumSet.of(BlockFlag.drill); flags = EnumSet.of(BlockFlag.drill);