From: Krunklehorn <42424291+Krunklehorn@users.noreply.github.com> Date: Fri, 16 Feb 2024 23:48:18 +0000 (-0500) Subject: Add sfx for writing on paper (#25257) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=1de3f24f16733521d22543708a59e72a6b396c71;p=space-station-14.git Add sfx for writing on paper (#25257) * Initial commit * Moved params to sound * Removed type tag * Removed null check * Forced default --- diff --git a/Content.Server/Paper/PaperSystem.cs b/Content.Server/Paper/PaperSystem.cs index f599bbdb6a..c582b82e2c 100644 --- a/Content.Server/Paper/PaperSystem.cs +++ b/Content.Server/Paper/PaperSystem.cs @@ -160,6 +160,8 @@ namespace Content.Server.Paper if (args.Session.AttachedEntity != null) _adminLogger.Add(LogType.Chat, LogImpact.Low, $"{ToPrettyString(args.Session.AttachedEntity.Value):player} has written on {ToPrettyString(uid):entity} the following text: {args.Text}"); + + _audio.PlayPvs(paperComp.Sound, uid); } paperComp.Mode = PaperAction.Read; diff --git a/Content.Shared/Paper/SharedPaperComponent.cs b/Content.Shared/Paper/SharedPaperComponent.cs index 1e654cc68a..dd87f9f907 100644 --- a/Content.Shared/Paper/SharedPaperComponent.cs +++ b/Content.Shared/Paper/SharedPaperComponent.cs @@ -1,9 +1,16 @@ +using Robust.Shared.Audio; using Robust.Shared.Serialization; namespace Content.Shared.Paper; public abstract partial class SharedPaperComponent : Component { + /// + /// Sound played after writing to the paper. + /// + [DataField("sound")] + public SoundSpecifier? Sound { get; private set; } = new SoundCollectionSpecifier("PaperScribbles", AudioParams.Default.WithVariation(0.1f)); + [Serializable, NetSerializable] public sealed class PaperBoundUserInterfaceState : BoundUserInterfaceState { diff --git a/Resources/Audio/Items/Paper/attributions.yml b/Resources/Audio/Items/Paper/attributions.yml new file mode 100644 index 0000000000..42c973c67f --- /dev/null +++ b/Resources/Audio/Items/Paper/attributions.yml @@ -0,0 +1,4 @@ +- files: ["paper_scribble1.ogg", "paper_scribble2.ogg", "paper_scribble3.ogg", "paper_scribble4.ogg", "paper_scribble5.ogg"] + license: "CC0-1.0" + copyright: "Originally 'Pen Clicks and Writing on Paper' created by PDaefaul. Cut, spliced and converted by Krunklehorn." + source: "https://freesound.org/people/PDaefaul/sounds/631971/" diff --git a/Resources/Audio/Items/Paper/paper_scribble1.ogg b/Resources/Audio/Items/Paper/paper_scribble1.ogg new file mode 100644 index 0000000000..982bad95c4 Binary files /dev/null and b/Resources/Audio/Items/Paper/paper_scribble1.ogg differ diff --git a/Resources/Audio/Items/Paper/paper_scribble2.ogg b/Resources/Audio/Items/Paper/paper_scribble2.ogg new file mode 100644 index 0000000000..fd2d907879 Binary files /dev/null and b/Resources/Audio/Items/Paper/paper_scribble2.ogg differ diff --git a/Resources/Audio/Items/Paper/paper_scribble3.ogg b/Resources/Audio/Items/Paper/paper_scribble3.ogg new file mode 100644 index 0000000000..7e44117486 Binary files /dev/null and b/Resources/Audio/Items/Paper/paper_scribble3.ogg differ diff --git a/Resources/Audio/Items/Paper/paper_scribble4.ogg b/Resources/Audio/Items/Paper/paper_scribble4.ogg new file mode 100644 index 0000000000..1d9980133d Binary files /dev/null and b/Resources/Audio/Items/Paper/paper_scribble4.ogg differ diff --git a/Resources/Audio/Items/Paper/paper_scribble5.ogg b/Resources/Audio/Items/Paper/paper_scribble5.ogg new file mode 100644 index 0000000000..8e155e5fd6 Binary files /dev/null and b/Resources/Audio/Items/Paper/paper_scribble5.ogg differ diff --git a/Resources/Prototypes/SoundCollections/bureaucracy.yml b/Resources/Prototypes/SoundCollections/bureaucracy.yml new file mode 100644 index 0000000000..052b102649 --- /dev/null +++ b/Resources/Prototypes/SoundCollections/bureaucracy.yml @@ -0,0 +1,8 @@ +- type: soundCollection + id: PaperScribbles + files: + - /Audio/Items/Paper/paper_scribble1.ogg + - /Audio/Items/Paper/paper_scribble2.ogg + - /Audio/Items/Paper/paper_scribble3.ogg + - /Audio/Items/Paper/paper_scribble4.ogg + - /Audio/Items/Paper/paper_scribble5.ogg