fix material reclaimer sound issue (#15278)
* fix material reclaimer sound issue * this, too
This commit is contained in:
@@ -160,6 +160,8 @@ public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
|
|||||||
if (!Resolve(uid, ref component))
|
if (!Resolve(uid, ref component))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
base.Reclaim(uid, item, completion, component);
|
||||||
|
|
||||||
var xform = Transform(uid);
|
var xform = Transform(uid);
|
||||||
|
|
||||||
SpawnMaterialsFromComposition(uid, item, completion * component.Efficiency, xform: xform);
|
SpawnMaterialsFromComposition(uid, item, completion * component.Efficiency, xform: xform);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using Content.Shared.Construction.Prototypes;
|
|||||||
using Content.Shared.Whitelist;
|
using Content.Shared.Whitelist;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Prototypes;
|
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
SubscribeLocalEvent<MaterialReclaimerComponent, ComponentGetState>(OnGetState);
|
SubscribeLocalEvent<MaterialReclaimerComponent, ComponentGetState>(OnGetState);
|
||||||
SubscribeLocalEvent<MaterialReclaimerComponent, ComponentHandleState>(OnHandleState);
|
SubscribeLocalEvent<MaterialReclaimerComponent, ComponentHandleState>(OnHandleState);
|
||||||
|
SubscribeLocalEvent<MaterialReclaimerComponent, ComponentShutdown>(OnShutdown);
|
||||||
SubscribeLocalEvent<MaterialReclaimerComponent, EntityUnpausedEvent>(OnUnpaused);
|
SubscribeLocalEvent<MaterialReclaimerComponent, EntityUnpausedEvent>(OnUnpaused);
|
||||||
SubscribeLocalEvent<MaterialReclaimerComponent, ExaminedEvent>(OnExamined);
|
SubscribeLocalEvent<MaterialReclaimerComponent, ExaminedEvent>(OnExamined);
|
||||||
SubscribeLocalEvent<MaterialReclaimerComponent, GotEmaggedEvent>(OnEmagged);
|
SubscribeLocalEvent<MaterialReclaimerComponent, GotEmaggedEvent>(OnEmagged);
|
||||||
@@ -60,6 +61,11 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
|
|||||||
component.ItemsProcessed = state.ItemsProcessed;
|
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)
|
private void OnUnpaused(EntityUid uid, MaterialReclaimerComponent component, ref EntityUnpausedEvent args)
|
||||||
{
|
{
|
||||||
component.NextSound += args.PausedTime;
|
component.NextSound += args.PausedTime;
|
||||||
|
|||||||
@@ -76,6 +76,7 @@
|
|||||||
- IdCard
|
- IdCard
|
||||||
tags:
|
tags:
|
||||||
- HighRiskItem
|
- HighRiskItem
|
||||||
|
soundCooldown: 0
|
||||||
sound:
|
sound:
|
||||||
path: /Audio/Ambience/Objects/crushing.ogg
|
path: /Audio/Ambience/Objects/crushing.ogg
|
||||||
params:
|
params:
|
||||||
|
|||||||
Reference in New Issue
Block a user