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:
@@ -18,14 +18,7 @@ namespace Content.Client.Kitchen.EntitySystems
|
||||
|
||||
public void StopSoundLoop(MicrowaveComponent microwave)
|
||||
{
|
||||
try
|
||||
{
|
||||
microwave.PlayingStream?.Stop();
|
||||
}
|
||||
catch (Exception _)
|
||||
{
|
||||
// TODO: HOLY SHIT EXPOSE SOME DISPOSED PROPERTY ON PLAYING STREAM OR SOMETHING.
|
||||
}
|
||||
microwave.PlayingStream?.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,14 +39,7 @@ namespace Content.Client.Light.Visualizers
|
||||
|
||||
void TryStopStream(IPlayingAudioStream? stream)
|
||||
{
|
||||
try
|
||||
{
|
||||
stream?.Stop();
|
||||
}
|
||||
catch (Exception _)
|
||||
{
|
||||
// TODO: HOLY SHIT EXPOSE SOME DISPOSED PROPERTY ON PLAYING STREAM OR SOMETHING.
|
||||
}
|
||||
stream?.Stop();
|
||||
}
|
||||
|
||||
if (component.TryGetData(ExpendableLightVisuals.State, out ExpendableLightState state)
|
||||
|
||||
Reference in New Issue
Block a user