Fix warnings and code cleanup/fixes (#13570)

This commit is contained in:
Visne
2023-01-19 03:56:45 +01:00
committed by GitHub
parent 3ca5a0224b
commit c6d3e4f3bd
265 changed files with 499 additions and 666 deletions

View File

@@ -96,10 +96,7 @@ namespace Content.Server.Lock
_sharedPopupSystem.PopupEntity(Loc.GetString("lock-comp-do-lock-success", ("entityName", EntityManager.GetComponent<MetaDataComponent>(uid).EntityName)), uid, user);
lockComp.Locked = true;
if(lockComp.LockSound != null)
{
_audio.PlayPvs(_audio.GetSound(lockComp.LockSound), uid, AudioParams.Default.WithVolume(-5));
}
_audio.PlayPvs(_audio.GetSound(lockComp.LockSound), uid, AudioParams.Default.WithVolume(-5));
if (EntityManager.TryGetComponent(uid, out AppearanceComponent? appearanceComp))
{
@@ -123,10 +120,7 @@ namespace Content.Server.Lock
lockComp.Locked = false;
if (lockComp.UnlockSound != null)
{
_audio.PlayPvs(_audio.GetSound(lockComp.UnlockSound), uid, AudioParams.Default.WithVolume(-5));
}
_audio.PlayPvs(_audio.GetSound(lockComp.UnlockSound), uid, AudioParams.Default.WithVolume(-5));
if (EntityManager.TryGetComponent(lockComp.Owner, out AppearanceComponent? appearanceComp))
{
@@ -198,10 +192,7 @@ namespace Content.Server.Lock
{
if (component.Locked)
{
if (component.UnlockSound != null)
{
_audio.PlayPvs(_audio.GetSound(component.UnlockSound), uid, AudioParams.Default.WithVolume(-5));
}
_audio.PlayPvs(_audio.GetSound(component.UnlockSound), uid, AudioParams.Default.WithVolume(-5));
if (EntityManager.TryGetComponent(component.Owner, out AppearanceComponent? appearanceComp))
{