Куча говна (#539)

This commit is contained in:
ThereDrD0
2023-11-07 08:23:27 +03:00
committed by Aviu00
parent 0fcefc84f5
commit 7ede02488c
16 changed files with 141 additions and 34 deletions

View File

@@ -6,6 +6,7 @@ using Content.Shared.Popups;
using Content.Shared.Sound.Components;
using Content.Shared.Throwing;
using Content.Shared.White.EndOfRoundStats.EmitSoundStatSystem;
using Content.Shared.White.Sounds;
using JetBrains.Annotations;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
@@ -43,6 +44,9 @@ public abstract class SharedEmitSoundSystem : EntitySystem
SubscribeLocalEvent<EmitSoundOnPickupComponent, GotEquippedHandEvent>(OnEmitSoundOnPickup);
SubscribeLocalEvent<EmitSoundOnDropComponent, DroppedEvent>(OnEmitSoundOnDrop);
// WD edit
SubscribeLocalEvent<EmitSoundOnPickupComponent, GotRemovedEvent>(EmitSoundOnGotRemoved);
SubscribeLocalEvent<EmitSoundOnCollideComponent, EntityUnpausedEvent>(OnEmitSoundUnpaused);
SubscribeLocalEvent<EmitSoundOnCollideComponent, StartCollideEvent>(OnEmitSoundOnCollide);
}
@@ -99,6 +103,12 @@ public abstract class SharedEmitSoundSystem : EntitySystem
TryEmitSound(uid, component, args.User);
}
// WD edit
private void EmitSoundOnGotRemoved(EntityUid uid, EmitSoundOnPickupComponent component, GotRemovedEvent args)
{
TryEmitSound(uid, component, args.User, false);
}
private void OnEmitSoundOnDrop(EntityUid uid, EmitSoundOnDropComponent component, DroppedEvent args)
{
TryEmitSound(uid, component, args.User);
@@ -120,7 +130,7 @@ public abstract class SharedEmitSoundSystem : EntitySystem
}
if (_netMan.IsServer)
RaiseLocalEvent(new EmitSoundStatEvent(component.Owner, component.Sound));
RaiseLocalEvent(new EmitSoundStatEvent(uid, component.Sound));
}
private void OnEmitSoundUnpaused(EntityUid uid, EmitSoundOnCollideComponent component, ref EntityUnpausedEvent args)