Trigger Refactor (#39034)
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Server.Sound.Components;
|
||||
using Content.Shared.UserInterface;
|
||||
using Content.Shared.Sound;
|
||||
using Content.Shared.Sound.Components;
|
||||
using Robust.Shared.Timing;
|
||||
@@ -38,16 +35,9 @@ public sealed class EmitSoundSystem : SharedEmitSoundSystem
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<EmitSoundOnTriggerComponent, TriggerEvent>(HandleEmitSoundOnTrigger);
|
||||
SubscribeLocalEvent<SpamEmitSoundComponent, MapInitEvent>(HandleSpamEmitSoundMapInit);
|
||||
}
|
||||
|
||||
private void HandleEmitSoundOnTrigger(EntityUid uid, EmitSoundOnTriggerComponent component, TriggerEvent args)
|
||||
{
|
||||
TryEmitSound(uid, component, args.User, false);
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private void HandleSpamEmitSoundMapInit(Entity<SpamEmitSoundComponent> entity, ref MapInitEvent args)
|
||||
{
|
||||
SpamEmitSoundReset(entity);
|
||||
|
||||
Reference in New Issue
Block a user