Adding sounds to stamps (#17834)

* Add sounds

* FixSound

* Delete sound

* hmmmmmm
This commit is contained in:
Alex
2023-07-07 05:53:38 +03:00
committed by GitHub
parent 70d6e3dcbd
commit 68bd6f63d1
6 changed files with 20 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ namespace Content.Server.Paper
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly TagSystem _tagSystem = default!;
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
public override void Initialize()
{
@@ -119,6 +120,8 @@ namespace Content.Server.Paper
var stampPaperSelfMessage = Loc.GetString("paper-component-action-stamp-paper-self", ("target", Identity.Entity(args.Target, EntityManager)),("stamp", args.Used));
_popupSystem.PopupEntity(stampPaperSelfMessage, args.User, args.User);
_audio.PlayPvs(stampComp.Sound, uid);
UpdateUserInterface(uid, paperComp);
}
}

View File

@@ -1,3 +1,5 @@
using Robust.Shared.Audio;
namespace Content.Shared.Paper
{
[RegisterComponent]
@@ -13,5 +15,8 @@ namespace Content.Shared.Paper
/// </summary>
[DataField("stampState")]
public string StampState { get; set; } = "paper_stamp-generic";
[DataField("sound")]
public SoundSpecifier? Sound;
}
}

View File

@@ -0,0 +1,9 @@
- files: ["thick_stamp_sub.ogg"]
license: "CC-BY-4.0"
copyright: "Created by newagesoup. Converted from WAV to OGG."
source: "https://freesound.org/people/newagesoup/sounds/347323/"
- files: ["automatic_stamp.ogg"]
license: "CC-BY-4.0"
copyright: "Created by kermite607. Converted from WAV to OGG."
source: "https://freesound.org/people/kermite607/sounds/362624/"

Binary file not shown.

Binary file not shown.

View File

@@ -389,6 +389,7 @@
- type: Stamp
stampedName: stamp-component-stamped-name-mime
stampState: "paper_stamp-mime"
sound: /Audio/Items/Stamp/thick_stamp_sub.ogg
- type: Sprite
sprite: Objects/Misc/bureaucracy.rsi
state: stamp-mime
@@ -466,6 +467,7 @@
- type: Stamp
stampedName: stamp-component-stamped-name-denied
stampState: "paper_stamp-deny"
sound: /Audio/Items/Stamp/automatic_stamp.ogg
- type: Sprite
sprite: Objects/Misc/bureaucracy.rsi
state: stamp-deny
@@ -478,6 +480,7 @@
- type: Stamp
stampedName: stamp-component-stamped-name-approved
stampState: "paper_stamp-iaa"
sound: /Audio/Items/Stamp/automatic_stamp.ogg
- type: Sprite
sprite: Objects/Misc/bureaucracy.rsi
state: stamp-iaa