Gun + PKA fixes (#16244)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Shared.Weapons.Ranged.Components;
|
||||
@@ -9,7 +8,7 @@ namespace Content.Shared.Weapons.Ranged.Components;
|
||||
/// Simply provides a certain capacity of entities that cannot be reloaded through normal means and have
|
||||
/// no special behavior like cycling, magazine
|
||||
/// </summary>
|
||||
[RegisterComponent, AutoGenerateComponentState]
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class BasicEntityAmmoProviderComponent : AmmoProviderComponent
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
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]
|
||||
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]
|
||||
public TimeSpan? NextCharge;
|
||||
}
|
||||
Reference in New Issue
Block a user