Sound Effect For Emagged Borgs (#21451)
* Added sound effect for borg being emagged * attributions * license * patched for #21460 * Made the sound trigger on emag instead of role add * oops
This commit is contained in:
@@ -36,6 +36,7 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
|
|||||||
[Dependency] private readonly SharedStunSystem _stunSystem = default!;
|
[Dependency] private readonly SharedStunSystem _stunSystem = default!;
|
||||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||||
[Dependency] private readonly SharedRoleSystem _roles = default!;
|
[Dependency] private readonly SharedRoleSystem _roles = default!;
|
||||||
|
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
@@ -187,6 +188,10 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
|
|||||||
EnsureEmaggedRole(uid, component);
|
EnsureEmaggedRole(uid, component);
|
||||||
|
|
||||||
_stunSystem.TryParalyze(uid, component.StunTime, true);
|
_stunSystem.TryParalyze(uid, component.StunTime, true);
|
||||||
|
|
||||||
|
if (!_mind.TryGetMind(uid, out var mindId, out _))
|
||||||
|
return;
|
||||||
|
_roles.MindPlaySound(mindId, component.EmaggedSound);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnEmagMindAdded(EntityUid uid, EmagSiliconLawComponent component, MindAddedMessage args)
|
private void OnEmagMindAdded(EntityUid uid, EmagSiliconLawComponent component, MindAddedMessage args)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Content.Shared.Roles;
|
using Content.Shared.Roles;
|
||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
|
|
||||||
namespace Content.Shared.Silicons.Laws.Components;
|
namespace Content.Shared.Silicons.Laws.Components;
|
||||||
|
|
||||||
@@ -48,4 +49,12 @@ public sealed partial class EmagSiliconLawComponent : Component
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public ProtoId<AntagPrototype>? AntagonistRole = "SubvertedSilicon";
|
public ProtoId<AntagPrototype>? AntagonistRole = "SubvertedSilicon";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The sound that plays for the borg player
|
||||||
|
/// to let them know they've been emagged
|
||||||
|
/// </summary>
|
||||||
|
[DataField]
|
||||||
|
public SoundSpecifier EmaggedSound = new SoundPathSpecifier("/Audio/Ambience/Antag/emagged_borg.ogg");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,3 +14,7 @@
|
|||||||
license: "CC0-1.0"
|
license: "CC0-1.0"
|
||||||
copyright: "Made by https://www.youtube.com/@a-guy173"
|
copyright: "Made by https://www.youtube.com/@a-guy173"
|
||||||
source: https://github.com/A-Guy173/Music/blob/main/revolution.mp3
|
source: https://github.com/A-Guy173/Music/blob/main/revolution.mp3
|
||||||
|
- files: ["emagged_borg.ogg"]
|
||||||
|
license: "CC-BY-SA-3.0"
|
||||||
|
copyright: "Made by @ps3moira on github"
|
||||||
|
source: https://www.youtube.com/watch?v=4-R-_DiqiLo
|
||||||
|
|||||||
BIN
Resources/Audio/Ambience/Antag/emagged_borg.ogg
Normal file
BIN
Resources/Audio/Ambience/Antag/emagged_borg.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user