From: Zachary Higgs Date: Thu, 17 Oct 2024 03:41:06 +0000 (-0300) Subject: Give AI a Sound Cue when an Antimov board is inserted (#32625) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=79a23d3e0b33224fc4df28175b298ba860963e40;p=space-station-14.git Give AI a Sound Cue when an Antimov board is inserted (#32625) * 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 --- diff --git a/Content.Server/Silicons/Laws/SiliconLawSystem.cs b/Content.Server/Silicons/Laws/SiliconLawSystem.cs index 07674352ec..0070beb6ef 100644 --- a/Content.Server/Silicons/Laws/SiliconLawSystem.cs +++ b/Content.Server/Silicons/Laws/SiliconLawSystem.cs @@ -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); } } } diff --git a/Content.Shared/Silicons/Laws/Components/SiliconLawProviderComponent.cs b/Content.Shared/Silicons/Laws/Components/SiliconLawProviderComponent.cs index 4800aa0c59..1c54938b8a 100644 --- a/Content.Shared/Silicons/Laws/Components/SiliconLawProviderComponent.cs +++ b/Content.Shared/Silicons/Laws/Components/SiliconLawProviderComponent.cs @@ -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 /// [DataField, ViewVariables(VVAccess.ReadWrite)] public SiliconLawset? Lawset; + + /// + /// The sound that plays for the Silicon player + /// when the particular lawboard has been inserted. + /// + [DataField] + public SoundSpecifier? LawUploadSound = new SoundPathSpecifier("/Audio/Misc/cryo_warning.ogg"); + } diff --git a/Resources/Audio/Ambience/Antag/attributions.yml b/Resources/Audio/Ambience/Antag/attributions.yml index 25917a5da2..0d3d278a62 100644 --- a/Resources/Audio/Ambience/Antag/attributions.yml +++ b/Resources/Audio/Ambience/Antag/attributions.yml @@ -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 index 0000000000..911a34532d Binary files /dev/null and b/Resources/Audio/Ambience/Antag/silicon_lawboard_antimov.ogg differ diff --git a/Resources/Audio/Misc/attributions.yml b/Resources/Audio/Misc/attributions.yml index 9b3cb64ae7..a7349a445b 100644 --- a/Resources/Audio/Misc/attributions.yml +++ b/Resources/Audio/Misc/attributions.yml @@ -28,6 +28,11 @@ 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 index 0000000000..06cdebc944 Binary files /dev/null and b/Resources/Audio/Misc/cryo_warning.ogg differ diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 15878a4017..9c906bd1a1 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -239,6 +239,7 @@ state: std_mod - type: SiliconLawProvider laws: AntimovLawset + lawUploadSound: /Audio/Ambience/Antag/silicon_lawboard_antimov.ogg - type: entity id: NutimovCircuitBoard