Files
tbd-station-14/Content.Shared/Weapons/Ranged/Components/RechargeBasicEntityAmmoComponent.cs
Pieter-Jan Briers e00f74505c Use new ComponentPauseGenerator (#25183)
Also includes some (non critical) changes to the solution file to re-organize the Roslyn components.
2024-02-26 14:36:19 +11:00

31 lines
1.0 KiB
C#

using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Weapons.Ranged.Components;
/// <summary>
/// Responsible for handling recharging a basic entity ammo provider over time.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class RechargeBasicEntityAmmoComponent : Component
{
[ViewVariables(VVAccess.ReadWrite)]
[DataField("rechargeCooldown")]
[AutoNetworkedField]
public float RechargeCooldown = 1.5f;
[DataField("rechargeSound")]
[AutoNetworkedField]
public SoundSpecifier RechargeSound = new SoundPathSpecifier("/Audio/Magic/forcewall.ogg")
{
Params = AudioParams.Default.WithVolume(-5f)
};
[ViewVariables(VVAccess.ReadWrite),
DataField("nextCharge", customTypeSerializer:typeof(TimeOffsetSerializer)),
AutoNetworkedField]
[AutoPausedField]
public TimeSpan? NextCharge;
}