Reorders Sound Systems signatures to match Popup Systems. (#8728)

This commit is contained in:
keronshb
2022-06-12 19:45:47 -04:00
committed by GitHub
parent 78fb4b88ed
commit f7b1bda3e5
138 changed files with 257 additions and 272 deletions

View File

@@ -207,7 +207,7 @@ public sealed partial class GunSystem : SharedGunSystem
{
if (string.IsNullOrEmpty(sound)) return;
SoundSystem.Play(Filter.Pvs(gun, entityManager: EntityManager).RemoveWhereAttachedEntity(e => e == user), sound, gun);
SoundSystem.Play(sound, Filter.Pvs(gun, entityManager: EntityManager).RemoveWhereAttachedEntity(e => e == user), gun);
}
protected override void Popup(string message, EntityUid? uid, EntityUid? user) {}
@@ -239,28 +239,24 @@ public sealed partial class GunSystem : SharedGunSystem
if (type != null && rangedSound.SoundTypes?.TryGetValue(type, out var damageSoundType) == true)
{
SoundSystem.Play(
SoundSystem.Play(damageSoundType!.GetSound(),
Filter.Pvs(otherEntity, entityManager: EntityManager),
damageSoundType!.GetSound(),
otherEntity,
AudioHelpers.WithVariation(DamagePitchVariation));
otherEntity, AudioHelpers.WithVariation(DamagePitchVariation));
playedSound = true;
}
else if (type != null && rangedSound.SoundGroups?.TryGetValue(type, out var damageSoundGroup) == true)
{
SoundSystem.Play(
SoundSystem.Play(damageSoundGroup!.GetSound(),
Filter.Pvs(otherEntity, entityManager: EntityManager),
damageSoundGroup!.GetSound(),
otherEntity,
AudioHelpers.WithVariation(DamagePitchVariation));
otherEntity, AudioHelpers.WithVariation(DamagePitchVariation));
playedSound = true;
}
}
if (!playedSound && weaponSound != null)
SoundSystem.Play(Filter.Pvs(otherEntity, entityManager: EntityManager), weaponSound.GetSound(), otherEntity);
SoundSystem.Play(weaponSound.GetSound(), Filter.Pvs(otherEntity, entityManager: EntityManager), otherEntity);
}
// TODO: Pseudo RNG so the client can predict these.