Add gatherable break sounds (#19360)
This commit is contained in:
@@ -43,14 +43,18 @@ public sealed partial class GatherableSystem : EntitySystem
|
||||
Gather(uid, args.User, component);
|
||||
}
|
||||
|
||||
public void Gather(EntityUid gatheredUid, EntityUid? gatherer = null, GatherableComponent? component = null, SoundSpecifier? sound = null)
|
||||
public void Gather(EntityUid gatheredUid, EntityUid? gatherer = null, GatherableComponent? component = null)
|
||||
{
|
||||
if (!Resolve(gatheredUid, ref component))
|
||||
return;
|
||||
|
||||
if (TryComp<SoundOnGatherComponent>(gatheredUid, out var soundComp))
|
||||
{
|
||||
_audio.PlayPvs(soundComp.Sound, Transform(gatheredUid).Coordinates);
|
||||
}
|
||||
|
||||
// Complete the gathering process
|
||||
_destructible.DestroyEntity(gatheredUid);
|
||||
_audio.PlayPvs(sound, gatheredUid);
|
||||
|
||||
// Spawn the loot!
|
||||
if (component.MappedLoot == null)
|
||||
|
||||
Reference in New Issue
Block a user