fix material reclaimer sound issue (#15278)

* fix material reclaimer sound issue

* this, too
This commit is contained in:
Nemanja
2023-04-10 17:30:33 -04:00
committed by GitHub
parent 8ea9957736
commit 2d78c50f3e
4 changed files with 9 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
{
SubscribeLocalEvent<MaterialReclaimerComponent, ComponentGetState>(OnGetState);
SubscribeLocalEvent<MaterialReclaimerComponent, ComponentHandleState>(OnHandleState);
SubscribeLocalEvent<MaterialReclaimerComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<MaterialReclaimerComponent, EntityUnpausedEvent>(OnUnpaused);
SubscribeLocalEvent<MaterialReclaimerComponent, ExaminedEvent>(OnExamined);
SubscribeLocalEvent<MaterialReclaimerComponent, GotEmaggedEvent>(OnEmagged);
@@ -60,6 +61,11 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
component.ItemsProcessed = state.ItemsProcessed;
}
private void OnShutdown(EntityUid uid, MaterialReclaimerComponent component, ComponentShutdown args)
{
component.Stream?.Stop();
}
private void OnUnpaused(EntityUid uid, MaterialReclaimerComponent component, ref EntityUnpausedEvent args)
{
component.NextSound += args.PausedTime;