Gun refactor (#8301)
Co-authored-by: Kara <lunarautomaton6@gmail.com> Co-authored-by: T-Stalker <le0nel_1van@hotmail.com> Co-authored-by: T-Stalker <43253663+DogZeroX@users.noreply.github.com> Co-authored-by: ElectroJr <leonsfriedrich@gmail.com> Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using Content.Shared.Sound;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Shared.Weapons.Ranged.Components;
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class BallisticAmmoProviderComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadOnly), DataField("soundRack")]
|
||||
public SoundSpecifier? SoundRack = new SoundPathSpecifier("/Audio/Weapons/Guns/Cock/smg_cock.ogg");
|
||||
|
||||
[ViewVariables(VVAccess.ReadOnly), DataField("soundInsert")]
|
||||
public SoundSpecifier? SoundInsert = new SoundPathSpecifier("/Audio/Weapons/Guns/MagIn/bullet_insert.ogg");
|
||||
|
||||
[ViewVariables, DataField("proto", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? FillProto;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("capacity")]
|
||||
public int Capacity = 30;
|
||||
|
||||
[ViewVariables, DataField("unspawnedCount")]
|
||||
public int UnspawnedCount;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("whitelist")]
|
||||
public EntityWhitelist? Whitelist;
|
||||
|
||||
public Container Container = default!;
|
||||
|
||||
// TODO: Make this use stacks when the typeserializer is done.
|
||||
[ViewVariables, DataField("entities")]
|
||||
public List<EntityUid> Entities = new();
|
||||
|
||||
/// <summary>
|
||||
/// Will the ammoprovider automatically cycle through rounds or does it need doing manually.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("autoCycle")]
|
||||
public bool AutoCycle = true;
|
||||
|
||||
/// <summary>
|
||||
/// Is the gun ready to shoot; if AutoCycle is true then this will always stay true and not need to be manually done.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("cycled")]
|
||||
public bool Cycled = true;
|
||||
}
|
||||
Reference in New Issue
Block a user