mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-23 00:27:50 +03:00
Signed-off-by: stellar-novas <stellar_novas@riseup.net> (cherry picked from commit b3c27808a6cb00dec49d42e24f6a23b1da37d7c9)
41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using Content.Shared.Silicons.Bots;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Silicon.Components;
|
|
|
|
/// <summary>
|
|
/// Replaces the entities' factions when emagged.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent]
|
|
[Access(typeof(MedibotSystem))]
|
|
public sealed partial class EmagReplaceFactionsComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// How long should the entity be stunned for the emagger to get out of the way? Defaults to five seconds.
|
|
/// </summary>
|
|
[DataField(required: false)]
|
|
public int StunSeconds = 5;
|
|
|
|
/// <summary>
|
|
/// Should the component add factions to the existing list of factions instead of replacing them?
|
|
/// </summary>
|
|
[DataField(required:false)]
|
|
public bool Additive = false;
|
|
|
|
/// <summary>
|
|
/// Factions to replace from the original set.
|
|
/// </summary>
|
|
[DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
|
|
public List<string> Factions = [];
|
|
|
|
/// <summary>
|
|
/// Sound to play when the entity has been emagged
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier SparkSound = new SoundCollectionSpecifier("sparks")
|
|
{
|
|
Params = AudioParams.Default.WithVolume(8f)
|
|
};
|
|
}
|