Cleanup microwave and ExpendableLight sound stop code.

Now this doesn't throw anymore, so no need to try catch it.
This commit is contained in:
Vera Aguilera Puerto
2021-09-20 11:24:28 +02:00
parent cda67df317
commit f1490f4d85
2 changed files with 2 additions and 16 deletions

View File

@@ -18,14 +18,7 @@ namespace Content.Client.Kitchen.EntitySystems
public void StopSoundLoop(MicrowaveComponent microwave) public void StopSoundLoop(MicrowaveComponent microwave)
{ {
try microwave.PlayingStream?.Stop();
{
microwave.PlayingStream?.Stop();
}
catch (Exception _)
{
// TODO: HOLY SHIT EXPOSE SOME DISPOSED PROPERTY ON PLAYING STREAM OR SOMETHING.
}
} }
} }
} }

View File

@@ -39,14 +39,7 @@ namespace Content.Client.Light.Visualizers
void TryStopStream(IPlayingAudioStream? stream) void TryStopStream(IPlayingAudioStream? stream)
{ {
try stream?.Stop();
{
stream?.Stop();
}
catch (Exception _)
{
// TODO: HOLY SHIT EXPOSE SOME DISPOSED PROPERTY ON PLAYING STREAM OR SOMETHING.
}
} }
if (component.TryGetData(ExpendableLightVisuals.State, out ExpendableLightState state) if (component.TryGetData(ExpendableLightVisuals.State, out ExpendableLightState state)