mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-05 18:30:22 -08:00
Step sounds for smaller mechs (bad)
This commit is contained in:
parent
ee8a258447
commit
2aeebb5aea
10 changed files with 35 additions and 7 deletions
BIN
core/assets/sounds/mechStepSmall.ogg
Normal file
BIN
core/assets/sounds/mechStepSmall.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
core/assets/sounds/walkerStepSmall.ogg
Normal file
BIN
core/assets/sounds/walkerStepSmall.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/walkerStepTiny.ogg
Normal file
BIN
core/assets/sounds/walkerStepTiny.ogg
Normal file
Binary file not shown.
|
|
@ -55,13 +55,16 @@ public class SoundPriority{
|
|||
sound.setMinConcurrentInterrupt(Math.min(0.25f, sound.getLength() * 0.5f));
|
||||
}
|
||||
|
||||
mechStepSmall.setMinConcurrentInterrupt(0.5f);
|
||||
mechStep.setMinConcurrentInterrupt(0.5f);
|
||||
walkerStep.setMinConcurrentInterrupt(0.6f);
|
||||
mechStepHeavy.setMinConcurrentInterrupt(0.6f);
|
||||
|
||||
shieldHit.setMaxConcurrent(4);
|
||||
|
||||
max(4, mechStep, mechStepHeavy, walkerStep);
|
||||
max(4, mechStep, mechStepHeavy, walkerStep, walkerStepSmall, walkerStepTiny, mechStepSmall);
|
||||
//step sounds are low priority
|
||||
set(-1f, mechStep, mechStepHeavy, walkerStep, walkerStepSmall, walkerStepTiny, mechStepSmall);
|
||||
}
|
||||
|
||||
static void max(int max, Sound... sounds){
|
||||
|
|
|
|||
|
|
@ -102,6 +102,8 @@ public class UnitTypes{
|
|||
speed = 0.5f;
|
||||
hitSize = 8f;
|
||||
health = 150;
|
||||
stepSoundVolume = 0.4f;
|
||||
|
||||
weapons.add(new Weapon("large-weapon"){{
|
||||
shootSound = Sounds.shootDagger;
|
||||
reload = 13f;
|
||||
|
|
@ -159,6 +161,8 @@ public class UnitTypes{
|
|||
armor = 9f;
|
||||
mechFrontSway = 0.55f;
|
||||
ammoType = new ItemAmmoType(Items.graphite);
|
||||
stepSoundPitch = 0.8f;
|
||||
stepSoundVolume = 0.65f;
|
||||
|
||||
weapons.add(new Weapon("artillery"){{
|
||||
top = false;
|
||||
|
|
@ -372,6 +376,7 @@ public class UnitTypes{
|
|||
|
||||
mineTier = 2;
|
||||
mineSpeed = 3f;
|
||||
stepSound = Sounds.mechStepSmall;
|
||||
|
||||
abilities.add(new ShieldRegenFieldAbility(20f, 40f, 60f * 5, 60f));
|
||||
ammoType = new PowerAmmoType(1300);
|
||||
|
|
@ -428,6 +433,8 @@ public class UnitTypes{
|
|||
|
||||
mechFrontSway = 0.55f;
|
||||
ammoType = new PowerAmmoType(1500);
|
||||
stepSoundPitch = 0.9f;
|
||||
stepSoundVolume = 0.6f;
|
||||
|
||||
speed = 0.5f;
|
||||
hitSize = 13f;
|
||||
|
|
@ -635,6 +642,8 @@ public class UnitTypes{
|
|||
mechSideSway = 0.25f;
|
||||
range = 40f;
|
||||
ammoType = new ItemAmmoType(Items.coal);
|
||||
stepSound = Sounds.walkerStepTiny;
|
||||
stepSoundVolume = 0.4f;
|
||||
|
||||
weapons.add(new Weapon(){{
|
||||
shootOnDeath = true;
|
||||
|
|
@ -672,6 +681,10 @@ public class UnitTypes{
|
|||
health = 600;
|
||||
immunities = ObjectSet.with(StatusEffects.burning, StatusEffects.melting);
|
||||
|
||||
stepSound = Sounds.walkerStepSmall;
|
||||
stepSoundPitch = 1f;
|
||||
stepSoundVolume = 0.3f;
|
||||
|
||||
legCount = 4;
|
||||
legLength = 9f;
|
||||
legForwardScl = 0.6f;
|
||||
|
|
@ -721,6 +734,10 @@ public class UnitTypes{
|
|||
shadowElevation = 0.3f;
|
||||
groundLayer = Layer.legUnit;
|
||||
|
||||
stepSound = Sounds.walkerStepSmall;
|
||||
stepSoundPitch = 0.7f;
|
||||
stepSoundVolume = 0.35f;
|
||||
|
||||
weapons.add(new Weapon("spiroct-weapon"){{
|
||||
shootY = 4f;
|
||||
reload = 14f;
|
||||
|
|
@ -788,7 +805,7 @@ public class UnitTypes{
|
|||
ammoType = new PowerAmmoType(2000);
|
||||
|
||||
stepSound = Sounds.walkerStep;
|
||||
stepSoundVolume = 0.75f;
|
||||
stepSoundVolume = 0.85f;
|
||||
stepSoundPitch = 1.1f;
|
||||
|
||||
legSplashDamage = 32;
|
||||
|
|
@ -3043,6 +3060,8 @@ public class UnitTypes{
|
|||
armor = 4f;
|
||||
legStraightness = 0.3f;
|
||||
stepShake = 0f;
|
||||
stepSound = Sounds.walkerStepTiny;
|
||||
stepSoundVolume = 0.7f;
|
||||
|
||||
legCount = 6;
|
||||
legLength = 8f;
|
||||
|
|
@ -3127,6 +3146,8 @@ public class UnitTypes{
|
|||
armor = 5f;
|
||||
stepShake = 0f;
|
||||
|
||||
stepSound = Sounds.walkerStepSmall;
|
||||
|
||||
legCount = 4;
|
||||
legLength = 14f;
|
||||
lockLegBase = true;
|
||||
|
|
@ -3234,6 +3255,9 @@ public class UnitTypes{
|
|||
fogRadius = 40f;
|
||||
stepShake = 0f;
|
||||
|
||||
stepSound = Sounds.walkerStepSmall;
|
||||
stepSoundPitch = 0.78f;
|
||||
|
||||
legCount = 6;
|
||||
legLength = 18f;
|
||||
legGroupSize = 3;
|
||||
|
|
@ -3271,6 +3295,7 @@ public class UnitTypes{
|
|||
|
||||
weapons.add(new Weapon("anthicus-weapon"){{
|
||||
shootSound = Sounds.missileLarge;
|
||||
shootSoundVolume = 0.8f;
|
||||
x = 29f / 4f;
|
||||
y = -11f / 4f;
|
||||
shootY = 1.5f;
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Unitc{
|
|||
floor.walkSound.at(x, y, 1f, floor.walkSoundVolume);
|
||||
}else{
|
||||
Fx.unitLandSmall.at(l.base.x, l.base.y, type.rippleScale, floor.mapColor);
|
||||
type.stepSound.at(l.base.x, l.base.y, type.stepSoundPitch + Mathf.range(0.1f), type.stepSoundVolume);
|
||||
type.stepSound.at(l.base.x, l.base.y, type.stepSoundPitch + Mathf.range(type.stepSoundPitchRange), type.stepSoundVolume);
|
||||
}
|
||||
|
||||
//shake when legs contact ground
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ public class AIController implements UnitController{
|
|||
|
||||
if(arrive){
|
||||
Tmp.v3.set(-unit.vel.x / unit.type.accel * 2f, -unit.vel.y / unit.type.accel * 2f).add((target.getX() - unit.x), (target.getY() - unit.y));
|
||||
if(unit.type.omniMovement){
|
||||
if(unit.type.omniMovement || unit.type.rotateMoveFirst){
|
||||
vec.add(Tmp.v3).limit(speed * length);
|
||||
}else{
|
||||
//directly move the unit to prevent a backwards movement vector from messing things up
|
||||
|
|
|
|||
|
|
@ -301,11 +301,11 @@ public class UnitType extends UnlockableContent implements Senseable{
|
|||
/** volume of loop sound */
|
||||
public float loopSoundVolume = 0.5f;
|
||||
/** sound played when this mech/insect unit does a step */
|
||||
public Sound stepSound = Sounds.none;
|
||||
public Sound stepSound = Sounds.mechStepSmall;
|
||||
/** volume of step sound */
|
||||
public float stepSoundVolume = 0.5f;
|
||||
/** base pitch of step sound */
|
||||
public float stepSoundPitch = 1f;
|
||||
public float stepSoundPitch = 1f, stepSoundPitchRange = 0.1f;
|
||||
/** effect that this unit emits when falling */
|
||||
public Effect fallEffect = Fx.fallSmoke;
|
||||
/** effect created at engine when unit falls. */
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ public class DesktopLauncher extends ClientLauncher{
|
|||
case "antialias" -> samples = 16;
|
||||
case "debug" -> Log.level = LogLevel.debug;
|
||||
case "maximized" -> maximized = Boolean.parseBoolean(arg[i + 1]);
|
||||
case "testMobile" -> testMobile = true;
|
||||
case "gltrace" -> {
|
||||
Events.on(ClientCreateEvent.class, e -> {
|
||||
var profiler = new GLProfiler(Core.graphics);
|
||||
|
|
@ -115,7 +116,6 @@ public class DesktopLauncher extends ClientLauncher{
|
|||
|
||||
Version.init();
|
||||
boolean useSteam = Version.modifier.contains("steam");
|
||||
testMobile = Seq.with(args).contains("-testMobile");
|
||||
|
||||
if(useDiscord){
|
||||
Threads.daemon(() -> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue