]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add tree felling and chopping sounds (#14644)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Fri, 24 Mar 2023 02:17:22 +0000 (13:17 +1100)
committerGitHub <noreply@github.com>
Fri, 24 Mar 2023 02:17:22 +0000 (13:17 +1100)
Content.Server/Destructible/Thresholds/Behaviors/PlaySoundBehavior.cs
Resources/Audio/Effects/attributions.yml
Resources/Audio/Effects/chop.ogg [new file with mode: 0644]
Resources/Audio/Effects/tree_fell.ogg [new file with mode: 0644]
Resources/Prototypes/Entities/Objects/Decoration/flora.yml

index 015b480b82573983b017da619884eec1704a3b4c..f1fcfa4449a7a2a8ff99f704a6cec7b258b60628 100644 (file)
@@ -16,7 +16,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
         public void Execute(EntityUid owner, DestructibleSystem system, EntityUid? cause = null)
         {
             var pos = system.EntityManager.GetComponent<TransformComponent>(owner).Coordinates;
-            SoundSystem.Play(Sound.GetSound(), Filter.Pvs(pos), pos, AudioHelpers.WithVariation(0.125f));
+            system.EntityManager.System<SharedAudioSystem>().PlayPvs(Sound, pos);
         }
     }
 }
index 1c7843072020acae78a45aa26b09084743bb1c06..263b872aeed9bce847fbdf6d49cb8d126083bdf6 100644 (file)
@@ -22,3 +22,8 @@
   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"
+
+- files: ["tree_fell.ogg"]
+  license: "CC0-1.0"
+  copyright: "Taken from felix.blume via freesound.org and cropped + mixed from stereo to mono."
+  source: "https://freesound.org/people/felix.blume/sounds/414093/"
diff --git a/Resources/Audio/Effects/chop.ogg b/Resources/Audio/Effects/chop.ogg
new file mode 100644 (file)
index 0000000..bc4c393
Binary files /dev/null and b/Resources/Audio/Effects/chop.ogg differ
diff --git a/Resources/Audio/Effects/tree_fell.ogg b/Resources/Audio/Effects/tree_fell.ogg
new file mode 100644 (file)
index 0000000..2c9554e
Binary files /dev/null and b/Resources/Audio/Effects/tree_fell.ogg differ
index 44652af95565b8c9fecc436fa7fb17cebee6a54d..21f2255146e8756d6a5886080070e06d60fb15f9 100644 (file)
   - type: Damageable
     damageContainer: Inorganic
     damageModifierSet: Wood
+  - type: MeleeSound
+    soundGroups:
+      Brute:
+        path: /Audio/Effects/chop.ogg
+        params:
+          variation: 0.05
   - type: Destructible
     thresholds:
     - trigger:
         !type:DamageTrigger
         damage: 50
       behaviors:
+      - !type:PlaySoundBehavior
+        sound:
+          path: /Audio/Effects/tree_fell.ogg
+          params:
+            volume: 5
+            variation: 0.05
       - !type:DoActsBehavior
         acts: [ "Destruction" ]
       - !type:SpawnEntitiesBehavior