using Content.Shared.Timing;
using Content.Shared.Verbs;
using Content.Shared.Whitelist;
+using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
public const string DefaultStorageMaxItemSize = "Normal";
public const float AreaInsertDelayPerItem = 0.075f;
+ private static AudioParams _audioParams = AudioParams.Default
+ .WithMaxDistance(7f)
+ .WithVolume(-2f);
private ItemSizePrototype _defaultStorageMaxItemSize = default!;
// If we picked up at least one thing, play a sound and do a cool animation!
if (successfullyInserted.Count > 0)
{
- Audio.PlayPredicted(component.StorageInsertSound, uid, args.User);
+ Audio.PlayPredicted(component.StorageInsertSound, uid, args.User, _audioParams);
EntityManager.RaiseSharedEvent(new AnimateInsertingEntitiesEvent(
GetNetEntity(uid),
GetNetEntityList(successfullyInserted),
{
if (_sharedHandsSystem.TryPickupAnyHand(player, entity, handsComp: hands)
&& storageComp.StorageRemoveSound != null)
- Audio.PlayPredicted(storageComp.StorageRemoveSound, uid, player);
+ Audio.PlayPredicted(storageComp.StorageRemoveSound, uid, player, _audioParams);
{
return;
}
return;
TransformSystem.DropNextTo(itemEnt, player);
- Audio.PlayPredicted(storageComp.StorageRemoveSound, storageEnt, player);
+ Audio.PlayPredicted(storageComp.StorageRemoveSound, storageEnt, player, _audioParams);
}
private void OnInsertItemIntoLocation(StorageInsertItemIntoLocationEvent msg, EntitySessionEventArgs args)
Insert(target, entity, out _, user: user, targetComp, playSound: false);
}
- Audio.PlayPredicted(sourceComp.StorageInsertSound, target, user);
+ Audio.PlayPredicted(sourceComp.StorageInsertSound, target, user, _audioParams);
}
/// <summary>
return false;
if (playSound)
- Audio.PlayPredicted(storageComp.StorageInsertSound, uid, user);
+ Audio.PlayPredicted(storageComp.StorageInsertSound, uid, user, _audioParams);
return true;
}
}
if (playSound)
- Audio.PlayPredicted(storageComp.StorageInsertSound, uid, user);
+ Audio.PlayPredicted(storageComp.StorageInsertSound, uid, user, _audioParams);
return true;
}