Add sfx for writing on paper (#25257)
* Initial commit * Moved params to sound * Removed type tag * Removed null check * Forced default (cherry picked from commit 1de3f24f16733521d22543708a59e72a6b396c71)
This commit is contained in:
parent
0af6ccb1c0
commit
b1e1ec66ea
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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/"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -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
|
||||
Loading…
Reference in New Issue