Add bare footstep sounds (#10272)

This commit is contained in:
Morb
2022-08-08 12:03:56 +03:00
committed by GitHub
parent 5fbecff3ad
commit 1e6e4a2e34
20 changed files with 52 additions and 7 deletions

View File

@@ -355,10 +355,10 @@ namespace Content.Shared.Movement.Systems
return true;
}
return TryGetFootstepSound(coordinates, out sound);
return TryGetFootstepSound(coordinates, shoes != null, out sound);
}
private bool TryGetFootstepSound(EntityCoordinates coordinates, [NotNullWhen(true)] out SoundSpecifier? sound)
private bool TryGetFootstepSound(EntityCoordinates coordinates, bool haveShoes, [NotNullWhen(true)] out SoundSpecifier? sound)
{
sound = null;
var gridUid = coordinates.GetGridUid(EntityManager);
@@ -393,7 +393,7 @@ namespace Content.Shared.Movement.Systems
// Walking on a tile.
var def = (ContentTileDefinition) _tileDefinitionManager[tile.Tile.TypeId];
sound = def.FootstepSounds;
sound = haveShoes ? def.FootstepSounds : def.BarestepSounds;
return sound != null;
}
}