* Add access to gun components Found from an rmc14 PR. * Admin verbs proving why access needs to exist * Someone is probably going to post this pr to le reddit and complain about self-merges.
34 lines
1.5 KiB
C#
34 lines
1.5 KiB
C#
using Content.Shared.Weapons.Ranged.Systems;
|
|
using Robust.Shared.Audio;
|
|
|
|
namespace Content.Shared.Weapons.Ranged.Components;
|
|
|
|
/// <summary>
|
|
/// Chamber + mags in one package. If you need just magazine then use <see cref="MagazineAmmoProviderComponent"/>
|
|
/// </summary>
|
|
[RegisterComponent, AutoGenerateComponentState]
|
|
[Access(typeof(SharedGunSystem))]
|
|
public sealed partial class ChamberMagazineAmmoProviderComponent : MagazineAmmoProviderComponent
|
|
{
|
|
/// <summary>
|
|
/// If the gun has a bolt and whether that bolt is closed. Firing is impossible
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("boltClosed"), AutoNetworkedField]
|
|
public bool? BoltClosed = false;
|
|
|
|
/// <summary>
|
|
/// Does the gun automatically open and close the bolt upon shooting.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("autoCycle"), AutoNetworkedField]
|
|
public bool AutoCycle = true;
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("soundBoltClosed"), AutoNetworkedField]
|
|
public SoundSpecifier? BoltClosedSound = new SoundPathSpecifier("/Audio/Weapons/Guns/Bolt/rifle_bolt_closed.ogg");
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("soundBoltOpened"), AutoNetworkedField]
|
|
public SoundSpecifier? BoltOpenedSound = new SoundPathSpecifier("/Audio/Weapons/Guns/Bolt/rifle_bolt_open.ogg");
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("soundRack"), AutoNetworkedField]
|
|
public SoundSpecifier? RackSound = new SoundPathSpecifier("/Audio/Weapons/Guns/Cock/ltrifle_cock.ogg");
|
|
}
|