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)
|
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.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user