Add Modular grenades (chemnades). (#7138)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using Content.Shared.Sound;
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Server.Explosion.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Component for tracking active trigger timers. A timers can activated by some other component, e.g. <see cref="OnUseTimerTriggerComponent"/>.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ActiveTimerTriggerComponent : Component
|
||||
{
|
||||
[DataField("timeRemaining")]
|
||||
public float TimeRemaining;
|
||||
|
||||
[DataField("user")]
|
||||
public EntityUid? User;
|
||||
|
||||
[DataField("beepInterval")]
|
||||
public float BeepInterval;
|
||||
|
||||
[DataField("timeUntilBeep")]
|
||||
public float TimeUntilBeep;
|
||||
|
||||
[DataField("beepSound")]
|
||||
public SoundSpecifier? BeepSound;
|
||||
|
||||
[DataField("beepParams")]
|
||||
public AudioParams BeepParams = AudioParams.Default;
|
||||
}
|
||||
@@ -1,11 +1,36 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Content.Shared.Sound;
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Server.Explosion.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class OnUseTimerTriggerComponent : Component
|
||||
{
|
||||
[DataField("delay")] public float Delay = 0f;
|
||||
[DataField("delay")]
|
||||
public float Delay = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// If not null, a user can use verbs to configure the delay to one of these options.
|
||||
/// </summary>
|
||||
[DataField("delayOptions")]
|
||||
public List<float>? DelayOptions = null;
|
||||
|
||||
/// <summary>
|
||||
/// If not null, this timer will periodically play this sound wile active.
|
||||
/// </summary>
|
||||
[DataField("beepSound")]
|
||||
public SoundSpecifier? BeepSound;
|
||||
|
||||
/// <summary>
|
||||
/// Time before beeping starts. Defaults to a single beep interval. If set to zero, will emit a beep immediately after use.
|
||||
/// </summary>
|
||||
[DataField("initialBeepDelay")]
|
||||
public float? InitialBeepDelay;
|
||||
|
||||
[DataField("beepInterval")]
|
||||
public float BeepInterval = 1;
|
||||
|
||||
[DataField("beepParams")]
|
||||
public AudioParams BeepParams = AudioParams.Default.WithVolume(-2f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Shared.Sound;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.Explosion.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Whenever a <see cref="TriggerEvent"/> is run play a sound in PVS range.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class SoundOnTriggerComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("sound")]
|
||||
public SoundSpecifier? Sound { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user