add artifact sound effects (#17792)
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using Content.Shared.Xenoarchaeology.XenoArtifacts;
|
using Content.Shared.Xenoarchaeology.XenoArtifacts;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||||
|
|
||||||
@@ -77,6 +78,19 @@ public sealed class ArtifactComponent : Component
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("pointDangerMultiplier"), ViewVariables(VVAccess.ReadWrite)]
|
[DataField("pointDangerMultiplier"), ViewVariables(VVAccess.ReadWrite)]
|
||||||
public float PointDangerMultiplier = 1.35f;
|
public float PointDangerMultiplier = 1.35f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The sound that plays when an artifact is activated
|
||||||
|
/// </summary>
|
||||||
|
[DataField("activationSound")]
|
||||||
|
public SoundSpecifier ActivationSound = new SoundCollectionSpecifier("ArtifactActivation")
|
||||||
|
{
|
||||||
|
Params = new()
|
||||||
|
{
|
||||||
|
Variation = 0.1f,
|
||||||
|
Volume = 3f
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public sealed partial class ArtifactSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||||
[Dependency] private readonly IRobustRandom _random = default!;
|
[Dependency] private readonly IRobustRandom _random = default!;
|
||||||
|
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||||
|
|
||||||
private ISawmill _sawmill = default!;
|
private ISawmill _sawmill = default!;
|
||||||
|
|
||||||
@@ -173,6 +174,7 @@ public sealed partial class ArtifactSystem : EntitySystem
|
|||||||
if (component.CurrentNodeId == null)
|
if (component.CurrentNodeId == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
_audio.PlayPvs(component.ActivationSound, uid);
|
||||||
component.LastActivationTime = _gameTiming.CurTime;
|
component.LastActivationTime = _gameTiming.CurTime;
|
||||||
|
|
||||||
var ev = new ArtifactActivatedEvent
|
var ev = new ArtifactActivatedEvent
|
||||||
|
|||||||
BIN
Resources/Audio/Items/Artifact/artifact1.ogg
Normal file
BIN
Resources/Audio/Items/Artifact/artifact1.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Items/Artifact/artifact2.ogg
Normal file
BIN
Resources/Audio/Items/Artifact/artifact2.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Items/Artifact/artifact3.ogg
Normal file
BIN
Resources/Audio/Items/Artifact/artifact3.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Items/Artifact/artifact4.ogg
Normal file
BIN
Resources/Audio/Items/Artifact/artifact4.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Items/Artifact/artifact5.ogg
Normal file
BIN
Resources/Audio/Items/Artifact/artifact5.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Items/Artifact/artifact6.ogg
Normal file
BIN
Resources/Audio/Items/Artifact/artifact6.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Items/Artifact/artifact7.ogg
Normal file
BIN
Resources/Audio/Items/Artifact/artifact7.ogg
Normal file
Binary file not shown.
4
Resources/Audio/Items/Artifact/attributions.yml
Normal file
4
Resources/Audio/Items/Artifact/attributions.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
- files: ["artifact1.ogg", "artifact2.ogg", "artifact3.ogg", "artifact4.ogg", "artifact5.ogg", "artifact6.ogg", "artifact7.ogg"]
|
||||||
|
license: "CC-BY-4.0"
|
||||||
|
copyright: "Created by Garuda1982, split into individual files and converted to OGG and Mono by EmoGarbage404 (github)"
|
||||||
|
source: "https://freesound.org/people/Garuda1982/sounds/560310/"
|
||||||
10
Resources/Prototypes/SoundCollections/artifact.yml
Normal file
10
Resources/Prototypes/SoundCollections/artifact.yml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
- type: soundCollection
|
||||||
|
id: ArtifactActivation
|
||||||
|
files:
|
||||||
|
- /Audio/Items/Artifact/artifact1.ogg
|
||||||
|
- /Audio/Items/Artifact/artifact2.ogg
|
||||||
|
- /Audio/Items/Artifact/artifact3.ogg
|
||||||
|
- /Audio/Items/Artifact/artifact4.ogg
|
||||||
|
- /Audio/Items/Artifact/artifact5.ogg
|
||||||
|
- /Audio/Items/Artifact/artifact6.ogg
|
||||||
|
- /Audio/Items/Artifact/artifact7.ogg
|
||||||
Reference in New Issue
Block a user