]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Sound Effect For Emagged Borgs (#21451)
authorBixkitts <72874643+Bixkitts@users.noreply.github.com>
Mon, 20 Nov 2023 15:36:25 +0000 (16:36 +0100)
committerGitHub <noreply@github.com>
Mon, 20 Nov 2023 15:36:25 +0000 (10:36 -0500)
* Added sound effect for borg being emagged

* attributions

* license

* patched for #21460

* Made the sound trigger on emag instead of role add

* oops

Content.Server/Silicons/Laws/SiliconLawSystem.cs
Content.Shared/Silicons/Laws/Components/EmagSiliconLawComponent.cs
Resources/Audio/Ambience/Antag/attributions.yml
Resources/Audio/Ambience/Antag/emagged_borg.ogg [new file with mode: 0644]

index 06d845b72c41c5ec5d6358eda84b0962b7beb271..182ab6c94718ddbaf5779c6b01c11593bc4c1731 100644 (file)
@@ -36,6 +36,7 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
     [Dependency] private readonly SharedStunSystem _stunSystem = default!;
     [Dependency] private readonly IEntityManager _entityManager = default!;
     [Dependency] private readonly SharedRoleSystem _roles = default!;
+    [Dependency] private readonly SharedAudioSystem _audioSystem = default!;
 
     /// <inheritdoc/>
     public override void Initialize()
@@ -187,6 +188,10 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
         EnsureEmaggedRole(uid, component);
 
         _stunSystem.TryParalyze(uid, component.StunTime, true);
+
+        if (!_mind.TryGetMind(uid, out var mindId, out _))
+            return;
+        _roles.MindPlaySound(mindId, component.EmaggedSound);
     }
 
     private void OnEmagMindAdded(EntityUid uid, EmagSiliconLawComponent component, MindAddedMessage args)
index f492db4d1295c7c2c76b3386097a03d463f39e2a..2155401062fa94b6726bd1f0bd8f0763302c5088 100644 (file)
@@ -1,6 +1,7 @@
-using Content.Shared.Roles;
+using Content.Shared.Roles;
 using Robust.Shared.GameStates;
 using Robust.Shared.Prototypes;
+using Robust.Shared.Audio;
 
 namespace Content.Shared.Silicons.Laws.Components;
 
@@ -48,4 +49,12 @@ public sealed partial class EmagSiliconLawComponent : Component
     /// </summary>
     [DataField]
     public ProtoId<AntagPrototype>? AntagonistRole = "SubvertedSilicon";
+
+    /// <summary>
+    /// The sound that plays for the borg player
+    /// to let them know they've been emagged
+    /// </summary>
+    [DataField]
+    public SoundSpecifier EmaggedSound = new SoundPathSpecifier("/Audio/Ambience/Antag/emagged_borg.ogg");
+
 }
index 0a4a0479d12c999d8e79b76d4d94a1dfb491102c..25917a5da2bb6d11b3d0689c0028d6bbe6000ba5 100644 (file)
@@ -14,3 +14,7 @@
   license: "CC0-1.0"
   copyright: "Made by https://www.youtube.com/@a-guy173"
   source: https://github.com/A-Guy173/Music/blob/main/revolution.mp3
+- files: ["emagged_borg.ogg"]
+  license: "CC-BY-SA-3.0"
+  copyright: "Made by @ps3moira on github"
+  source: https://www.youtube.com/watch?v=4-R-_DiqiLo
diff --git a/Resources/Audio/Ambience/Antag/emagged_borg.ogg b/Resources/Audio/Ambience/Antag/emagged_borg.ogg
new file mode 100644 (file)
index 0000000..4b59823
Binary files /dev/null and b/Resources/Audio/Ambience/Antag/emagged_borg.ogg differ