Power Sink Upgraded (#15683)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -1,8 +1,44 @@
|
||||
namespace Content.Server.PowerSink
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
|
||||
namespace Content.Server.PowerSink
|
||||
{
|
||||
/// <summary>
|
||||
/// Absorbs power up to its capacity when anchored then explodes.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class PowerSinkComponent : Component {}
|
||||
public sealed class PowerSinkComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// When the power sink is nearing its explosion, warn the crew so they can look for it
|
||||
/// (if they're not already).
|
||||
/// </summary>
|
||||
[DataField("sentImminentExplosionWarning")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool SentImminentExplosionWarningMessage = false;
|
||||
|
||||
/// <summary>
|
||||
/// If explosion has been triggered, time at which to explode.
|
||||
/// </summary>
|
||||
[DataField("explosionTime", customTypeSerializer:typeof(TimeOffsetSerializer))]
|
||||
public System.TimeSpan? ExplosionTime = null;
|
||||
|
||||
/// <summary>
|
||||
/// The highest sound warning threshold that has been hit (plays sfx occasionally as explosion nears)
|
||||
/// </summary>
|
||||
[DataField("highestWarningSoundThreshold")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float HighestWarningSoundThreshold = 0f;
|
||||
|
||||
[DataField("chargeFireSound")]
|
||||
public SoundSpecifier ChargeFireSound = new SoundPathSpecifier("/Audio/Effects/PowerSink/charge_fire.ogg");
|
||||
|
||||
[DataField("electricSound")] public SoundSpecifier ElectricSound =
|
||||
new SoundPathSpecifier("/Audio/Effects/PowerSink/electric.ogg")
|
||||
{
|
||||
Params = AudioParams.Default
|
||||
.WithVolume(15f) // audible even behind walls
|
||||
.WithRolloffFactor(10)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user