diff --git a/Content.Shared/Sound/SharedEmitSoundSystem.cs b/Content.Shared/Sound/SharedEmitSoundSystem.cs index c50951f73e..c7bf5cf137 100644 --- a/Content.Shared/Sound/SharedEmitSoundSystem.cs +++ b/Content.Shared/Sound/SharedEmitSoundSystem.cs @@ -98,12 +98,12 @@ namespace Content.Shared.Sound if (predict) { - _audioSystem.PlayPredicted(component.Sound, component.Owner, user, component.Sound.Params.AddVolume(-2f)); + _audioSystem.PlayPredicted(component.Sound, component.Owner, user); } else if (_netMan.IsServer) { // don't predict sounds that client couldn't have played already - _audioSystem.PlayPvs(component.Sound, component.Owner, component.Sound.Params.AddVolume(-2f)); + _audioSystem.PlayPvs(component.Sound, component.Owner); } } } diff --git a/Content.Shared/Throwing/ThrowingSystem.cs b/Content.Shared/Throwing/ThrowingSystem.cs index 331c98feeb..1b7cfd7d6f 100644 --- a/Content.Shared/Throwing/ThrowingSystem.cs +++ b/Content.Shared/Throwing/ThrowingSystem.cs @@ -82,7 +82,7 @@ public sealed class ThrowingSystem : EntitySystem if (time < FlyTime) { - _thrownSystem.LandComponent(comp, physics); + _thrownSystem.LandComponent(uid, comp, physics); } else { @@ -93,7 +93,7 @@ public sealed class ThrowingSystem : EntitySystem if (physics.Deleted) return; - _thrownSystem.LandComponent(comp, physics); + _thrownSystem.LandComponent(uid, comp, physics); }); } @@ -104,7 +104,7 @@ public sealed class ThrowingSystem : EntitySystem _gravity.IsWeightless(user.Value, userPhysics)) { var msg = new ThrowPushbackAttemptEvent(); - RaiseLocalEvent(physics.Owner, msg); + RaiseLocalEvent(uid, msg); if (!msg.Cancelled) _physics.ApplyLinearImpulse(user.Value, -impulseVector * pushbackRatio, body: userPhysics); diff --git a/Content.Shared/Throwing/ThrownItemSystem.cs b/Content.Shared/Throwing/ThrownItemSystem.cs index e497b2ec19..d2b4d2dd46 100644 --- a/Content.Shared/Throwing/ThrownItemSystem.cs +++ b/Content.Shared/Throwing/ThrownItemSystem.cs @@ -8,6 +8,7 @@ using Robust.Shared.GameStates; using Robust.Shared.Physics; using Robust.Shared.Physics.Dynamics; using System.Linq; +using Content.Shared.Sound.Components; using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Events; using Robust.Shared.Physics.Systems; @@ -117,16 +118,17 @@ namespace Content.Shared.Throwing EntityManager.RemoveComponent(uid); } - public void LandComponent(ThrownItemComponent thrownItem, PhysicsComponent physics) + public void LandComponent(EntityUid uid, ThrownItemComponent thrownItem, PhysicsComponent physics) { _physics.SetBodyStatus(physics, BodyStatus.OnGround); - if (thrownItem.Deleted || Deleted(thrownItem.Owner) || _containerSystem.IsEntityInContainer(thrownItem.Owner)) return; + if (thrownItem.Deleted || Deleted(uid) || _containerSystem.IsEntityInContainer(uid)) + return; - var landing = thrownItem.Owner; + var landing = uid; // Unfortunately we can't check for hands containers as they have specific names. - if (thrownItem.Owner.TryGetContainerMan(out var containerManager) && + if (uid.TryGetContainerMan(out var containerManager) && EntityManager.HasComponent(containerManager.Owner)) { EntityManager.RemoveComponent(landing, thrownItem); diff --git a/Resources/Audio/Effects/attributions.yml b/Resources/Audio/Effects/attributions.yml index 66b0c39ac9..1c78430720 100644 --- a/Resources/Audio/Effects/attributions.yml +++ b/Resources/Audio/Effects/attributions.yml @@ -2,7 +2,23 @@ license: "CC-BY-NC-SA-3.0" copyright: "Amateur foley and audio editing by Bright0." source: "https://github.com/Bright0" + - files: ["teleport_arrival.ogg", "teleport_departure.ogg"] license: "CC-BY-SA-3.0" copyright: "tgstation" source: "https://github.com/tgstation/tgstation/commit/906fb0682bab6a0975b45036001c54f021f58ae7" + +- files: ["sadtrombone.ogg"] + license: "CC-BY-NC-SA-3.0" + copyright: "sadtrombone.ogg taken from Citadel Station." + source: "https://github.com/Citadel-Station-13/Citadel-Station-13/commit/35a1723e98a60f375df590ca572cc90f1bb80bd5" + +- files: ["box_deploy.ogg"] + license: "CC-BY-NC-SA-3.0" + copyright: "box_deploy.ogg taken from Citadel Station." + source: "https://github.com/Citadel-Station-13/Citadel-Station-13/commit/b604390f334343be80045d955705cf48ee056c61" + +- files: ["chime.ogg"] + license: "CC-BY-NC-SA-3.0" + copyright: "chime.ogg taken from Citadel Station." + source: "https://github.com/Citadel-Station-13/Citadel-Station-13/commit/b604390f334343be80045d955705cf48ee056c61" diff --git a/Resources/Audio/Effects/drop.ogg b/Resources/Audio/Effects/drop.ogg new file mode 100644 index 0000000000..3f1d45c8e6 Binary files /dev/null and b/Resources/Audio/Effects/drop.ogg differ diff --git a/Resources/Audio/Effects/licenses.txt b/Resources/Audio/Effects/licenses.txt index 93e2815927..95d0d98f70 100644 --- a/Resources/Audio/Effects/licenses.txt +++ b/Resources/Audio/Effects/licenses.txt @@ -32,11 +32,6 @@ bite.ogg take from https://github.com/tgstation/tgstation/commit/d4f678a1772007f bone_rattle.ogg licensed under CC0 1.0 and taken from spookymodem at https://freesound.org/people/spookymodem/sounds/202102/ -- files: ["sadtrombone.ogg"] - license: "CC-BY-NC-SA-3.0" - copyright: "sadtrombone.ogg taken from Citadel Station." - source: "https://github.com/Citadel-Station-13/Citadel-Station-13/commit/35a1723e98a60f375df590ca572cc90f1bb80bd5" - The following sounds are taken from TGstation github (licensed under CC by 3.0): demon_attack1.ogg: taken at https://github.com/tgstation/tgstation/commit/d4f678a1772007ff8d7eddd21cf7218c8e07bfc0 @@ -49,12 +44,10 @@ pop.ogg licensed under CC0 1.0 by mirrorcult box_deploy.ogg and chime.ogg taken from Citadel Station at commit: https://github.com/Citadel-Station-13/Citadel-Station-13/commit/b604390f334343be80045d955705cf48ee056c61 -- files: ["box_deploy.ogg"] - license: "CC-BY-NC-SA-3.0" - copyright: "box_deploy.ogg taken from Citadel Station." - source: "https://github.com/Citadel-Station-13/Citadel-Station-13/commit/b604390f334343be80045d955705cf48ee056c61" -- files: ["chime.ogg"] - license: "CC-BY-NC-SA-3.0" - copyright: "chime.ogg taken from Citadel Station." - source: "https://github.com/Citadel-Station-13/Citadel-Station-13/commit/b604390f334343be80045d955705cf48ee056c61" \ No newline at end of file + - files: + - "drop.ogg" + license: "Royalty free" + copyright: "Sonniss.com - GDC 2016 - Game Audio Bundle - Levan Nadashvili - Soldier Footsteps - FS Concrete Soldier Crouch N02, mixed from stereo to mono" + +# Do not add to this list, I only did the above because yaml scheme validator doesn't like custom licenses. diff --git a/Resources/Prototypes/Entities/Objects/base_item.yml b/Resources/Prototypes/Entities/Objects/base_item.yml index 00d5171cfb..f9b171a7eb 100644 --- a/Resources/Prototypes/Entities/Objects/base_item.yml +++ b/Resources/Prototypes/Entities/Objects/base_item.yml @@ -10,6 +10,11 @@ - type: Clickable - type: InteractionOutline - type: MovedByPressure + - type: EmitSoundOnLand + sound: + path: /Audio/Effects/drop.ogg + params: + volume: 2 - type: DamageOnHighSpeedImpact damage: types: