mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-14 04:41:14 +03:00
* Replace WithVolume() with AddVolume(), Remove AudioHelpers.WithVariation(), Use specifier options for audio params * Undo switching to AudioParams.AddVariation() * Replace AudioHelpers.WithVariation with AudioParams.AddVariation() * Test AudioParams.AddVariation() and change input parameters to sound like previous AudioHelpers.WithVariation() * Fix build error * Fix build error v2 * Remove DoAfter * fixes --------- Co-authored-by: AJCM-git <ajcm_mail@disroot.org>
33 lines
1.1 KiB
C#
33 lines
1.1 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.AddVolume(-5f)
|
|
};
|
|
|
|
[ViewVariables(VVAccess.ReadWrite),
|
|
DataField("nextCharge", customTypeSerializer:typeof(TimeOffsetSerializer)),
|
|
AutoNetworkedField]
|
|
[AutoPausedField]
|
|
public TimeSpan? NextCharge;
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public bool ShowExamineText = true;
|
|
}
|