From c041a8339f62344592fb5b497a78b3f0a52f33dd Mon Sep 17 00:00:00 2001 From: T-Stalker <43253663+DogZeroX@users.noreply.github.com> Date: Sat, 11 Dec 2021 20:12:40 -0300 Subject: [PATCH] Punching and melee hitsounds now have unique SoundCollections (#5748) --- .../Weapon/Melee/Components/MeleeWeaponComponent.cs | 2 +- Resources/Prototypes/Entities/Mobs/Species/human.yml | 2 ++ Resources/Prototypes/SoundCollections/generic_hit.yml | 6 ++++++ Resources/Prototypes/SoundCollections/punching.yml | 7 +++++++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 Resources/Prototypes/SoundCollections/generic_hit.yml create mode 100644 Resources/Prototypes/SoundCollections/punching.yml diff --git a/Content.Server/Weapon/Melee/Components/MeleeWeaponComponent.cs b/Content.Server/Weapon/Melee/Components/MeleeWeaponComponent.cs index bcbdf53ae2..8f134bf029 100644 --- a/Content.Server/Weapon/Melee/Components/MeleeWeaponComponent.cs +++ b/Content.Server/Weapon/Melee/Components/MeleeWeaponComponent.cs @@ -14,7 +14,7 @@ namespace Content.Server.Weapon.Melee.Components [ViewVariables(VVAccess.ReadWrite)] [DataField("hitSound")] - public SoundSpecifier HitSound { get; set; } = new SoundPathSpecifier("/Audio/Weapons/genhit1.ogg"); + public SoundSpecifier HitSound { get; set; } = new SoundCollectionSpecifier("GenericHit"); [ViewVariables(VVAccess.ReadWrite)] [DataField("missSound")] diff --git a/Resources/Prototypes/Entities/Mobs/Species/human.yml b/Resources/Prototypes/Entities/Mobs/Species/human.yml index 6cee014309..90290f491f 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/human.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/human.yml @@ -265,6 +265,8 @@ - type: AnimationPlayer - type: Buckle - type: UnarmedCombat + hitSound: + collection: Punch range: 0.8 arcwidth: 30 arc: fist diff --git a/Resources/Prototypes/SoundCollections/generic_hit.yml b/Resources/Prototypes/SoundCollections/generic_hit.yml new file mode 100644 index 0000000000..d03313be57 --- /dev/null +++ b/Resources/Prototypes/SoundCollections/generic_hit.yml @@ -0,0 +1,6 @@ +- type: soundCollection + id: GenericHit + files: + - /Audio/Weapons/genhit1.ogg + - /Audio/Weapons/genhit2.ogg + - /Audio/Weapons/genhit3.ogg diff --git a/Resources/Prototypes/SoundCollections/punching.yml b/Resources/Prototypes/SoundCollections/punching.yml new file mode 100644 index 0000000000..e17afd0978 --- /dev/null +++ b/Resources/Prototypes/SoundCollections/punching.yml @@ -0,0 +1,7 @@ +- type: soundCollection + id: Punch + files: + - /Audio/Weapons/punch1.ogg + - /Audio/Weapons/punch2.ogg + - /Audio/Weapons/punch3.ogg + - /Audio/Weapons/punch4.ogg