Add sfx for writing on paper (#25257)
* Initial commit * Moved params to sound * Removed type tag * Removed null check * Forced default
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Paper;
|
||||
|
||||
public abstract partial class SharedPaperComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Sound played after writing to the paper.
|
||||
/// </summary>
|
||||
[DataField("sound")]
|
||||
public SoundSpecifier? Sound { get; private set; } = new SoundCollectionSpecifier("PaperScribbles", AudioParams.Default.WithVariation(0.1f));
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class PaperBoundUserInterfaceState : BoundUserInterfaceState
|
||||
{
|
||||
|
||||
4
Resources/Audio/Items/Paper/attributions.yml
Normal file
4
Resources/Audio/Items/Paper/attributions.yml
Normal file
@@ -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/"
|
||||
BIN
Resources/Audio/Items/Paper/paper_scribble1.ogg
Normal file
BIN
Resources/Audio/Items/Paper/paper_scribble1.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Items/Paper/paper_scribble2.ogg
Normal file
BIN
Resources/Audio/Items/Paper/paper_scribble2.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Items/Paper/paper_scribble3.ogg
Normal file
BIN
Resources/Audio/Items/Paper/paper_scribble3.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Items/Paper/paper_scribble4.ogg
Normal file
BIN
Resources/Audio/Items/Paper/paper_scribble4.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Items/Paper/paper_scribble5.ogg
Normal file
BIN
Resources/Audio/Items/Paper/paper_scribble5.ogg
Normal file
Binary file not shown.
8
Resources/Prototypes/SoundCollections/bureaucracy.yml
Normal file
8
Resources/Prototypes/SoundCollections/bureaucracy.yml
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user