]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Give AI a Sound Cue when an Antimov board is inserted (#32625)
authorZachary Higgs <compgeek223@gmail.com>
Thu, 17 Oct 2024 03:41:06 +0000 (00:41 -0300)
committerGitHub <noreply@github.com>
Thu, 17 Oct 2024 03:41:06 +0000 (22:41 -0500)
* Subversion Board Insertion Audio Notification

Add Subversion flag and SubversionSound to SiliconLawProviderComponent

Add new Method (OnSubversionInserted)
to SiliconLawSystem to handle a Subversive
SiliconLawProviderComponent and play it's SubversionSound

Add Check for Subversive law provider to OnUpdaterInsert that
calls OnSubversionInserted if the SiliconLawProviderComponent is
Subversive

* Fix subversion Sound

- Change out Weh sound used to test that subversion sounds can be
changed by prototype for a a not yet present Antimov subversion sound

* Make it not just subversive

- Remove OnSubversionInserted and move the MindPlaySound in the
OnUpdaterInsert so long as LawUploadSound exists

- Modify SubversionSound into LawUploadSound

- Remove the Subversion flag

- Just use emagged_borg.ogg until the better one is made

* Remove errant spaces and a errant namespace

* CR Fixes - Add generic Lawboard insert cue

- Combine the If statements per /pull/32625#discussion_r1786926400
inside OnUpdaterInsert

- Remove the ViewVariables(VVAccess.ReadWrite) per
pull/32625#discussion_r1786924433

- Add Cryo_warning.ogg from TGStation, the sound utilized for Law Upload
cue, Attribution.

* CR Add a placeholder Antimov notification sound

- Add a new sound kitbashed from the cryo_sound used for uploading
and the emagged noise

* Add self referential source attribution

- also fix an errant space

* Add more bespoke Sound by ps3moira + attributions

Content.Server/Silicons/Laws/SiliconLawSystem.cs
Content.Shared/Silicons/Laws/Components/SiliconLawProviderComponent.cs
Resources/Audio/Ambience/Antag/attributions.yml
Resources/Audio/Ambience/Antag/silicon_lawboard_antimov.ogg [new file with mode: 0644]
Resources/Audio/Misc/attributions.yml
Resources/Audio/Misc/cryo_warning.ogg [new file with mode: 0644]
Resources/Prototypes/Entities/Mobs/Player/silicon.yml

index 07674352ec030c92e43a0c4991aba36dce13e8f3..0070beb6ef9f5c4ee371983c6d343b811235d444 100644 (file)
@@ -293,6 +293,8 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
         while (query.MoveNext(out var update))
         {
             SetLaws(lawset, update);
+            if (provider.LawUploadSound != null && _mind.TryGetMind(update, out var mindId, out _))
+                _roles.MindPlaySound(mindId, provider.LawUploadSound);
         }
     }
 }
index 4800aa0c59d2bd616a6ed943b90699b41af6490a..1c54938b8a40cef8a0d63ca8fa676e657302a78a 100644 (file)
@@ -1,4 +1,5 @@
 using Robust.Shared.Prototypes;
+using Robust.Shared.Audio;
 
 namespace Content.Shared.Silicons.Laws.Components;
 
@@ -20,4 +21,12 @@ public sealed partial class SiliconLawProviderComponent : Component
     /// </summary>
     [DataField, ViewVariables(VVAccess.ReadWrite)]
     public SiliconLawset? Lawset;
+
+    /// <summary>
+    /// The sound that plays for the Silicon player
+    /// when the particular lawboard has been inserted.
+    /// </summary>
+    [DataField]
+    public SoundSpecifier? LawUploadSound = new SoundPathSpecifier("/Audio/Misc/cryo_warning.ogg");
+
 }
index 25917a5da2bb6d11b3d0689c0028d6bbe6000ba5..0d3d278a627d73e65a4ffcec61a487f7b6720c2a 100644 (file)
@@ -18,3 +18,7 @@
   license: "CC-BY-SA-3.0"
   copyright: "Made by @ps3moira on github"
   source: https://www.youtube.com/watch?v=4-R-_DiqiLo
+- files: ["silicon_lawboard_antimov.ogg"]
+  license: "CC-BY-SA-3.0"
+  copyright: "Made by @ps3moira on Discord for SS14"
+  source: "https://www.youtube.com/watch?v=jf1sYGYVLsw"
diff --git a/Resources/Audio/Ambience/Antag/silicon_lawboard_antimov.ogg b/Resources/Audio/Ambience/Antag/silicon_lawboard_antimov.ogg
new file mode 100644 (file)
index 0000000..911a345
Binary files /dev/null and b/Resources/Audio/Ambience/Antag/silicon_lawboard_antimov.ogg differ
index 9b3cb64ae730e9da3fa26e8190b9a576ed3cea84..a7349a445be63b8ff09ee2b25166d08c636d8686 100644 (file)
   copyright: "Taken from TG station."
   source: "https://github.com/tgstation/tgstation/blob/2f63c779cb43543cfde76fa7ddaeacfde185fded/sound/effects/ratvar_reveal.ogg"
 
+- files: ["cryo_warning.ogg"]
+  license: "CC-BY-SA-3.0"
+  copyright: "Taken from TG station."
+  source: "https://github.com/tgstation/tgstation/blob/00cf2da5f785c110b9930077b3202f1a4638e1fd/sound/machines/cryo_warning.ogg"
+
 - files: ["epsilon.ogg"]
   license: "CC-BY-SA-3.0"
   copyright: "Made by dj-34 (https://github.com/dj-34)"
diff --git a/Resources/Audio/Misc/cryo_warning.ogg b/Resources/Audio/Misc/cryo_warning.ogg
new file mode 100644 (file)
index 0000000..06cdebc
Binary files /dev/null and b/Resources/Audio/Misc/cryo_warning.ogg differ
index 15878a4017d00c89b563e41b336b2b872d9e6e24..9c906bd1a1c8d2f111c8da5e0484058d9d1c9d2e 100644 (file)
     state: std_mod
   - type: SiliconLawProvider
     laws: AntimovLawset
+    lawUploadSound: /Audio/Ambience/Antag/silicon_lawboard_antimov.ogg
 
 - type: entity
   id: NutimovCircuitBoard