ChamberMagazineAmmoProviderComponent.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Content.Shared.Weapons.Ranged.Systems;
  2. using Robust.Shared.Audio;
  3. namespace Content.Shared.Weapons.Ranged.Components;
  4. /// <summary>
  5. /// Chamber + mags in one package. If you need just magazine then use <see cref="MagazineAmmoProviderComponent"/>
  6. /// </summary>
  7. [RegisterComponent, AutoGenerateComponentState]
  8. [Access(typeof(SharedGunSystem))]
  9. public sealed partial class ChamberMagazineAmmoProviderComponent : MagazineAmmoProviderComponent
  10. {
  11. /// <summary>
  12. /// If the gun has a bolt and whether that bolt is closed. Firing is impossible
  13. /// </summary>
  14. [ViewVariables(VVAccess.ReadWrite), DataField("boltClosed"), AutoNetworkedField]
  15. public bool? BoltClosed = false;
  16. /// <summary>
  17. /// Does the gun automatically open and close the bolt upon shooting.
  18. /// </summary>
  19. [ViewVariables(VVAccess.ReadWrite), DataField("autoCycle"), AutoNetworkedField]
  20. public bool AutoCycle = true;
  21. /// <summary>
  22. /// Can the gun be racked, which opens and then instantly closes the bolt to cycle a round.
  23. /// </summary>
  24. [ViewVariables(VVAccess.ReadWrite), DataField("canRack"), AutoNetworkedField]
  25. public bool CanRack = true;
  26. [ViewVariables(VVAccess.ReadWrite), DataField("soundBoltClosed"), AutoNetworkedField]
  27. public SoundSpecifier? BoltClosedSound = new SoundPathSpecifier("/Audio/Weapons/Guns/Bolt/rifle_bolt_closed.ogg");
  28. [ViewVariables(VVAccess.ReadWrite), DataField("soundBoltOpened"), AutoNetworkedField]
  29. public SoundSpecifier? BoltOpenedSound = new SoundPathSpecifier("/Audio/Weapons/Guns/Bolt/rifle_bolt_open.ogg");
  30. [ViewVariables(VVAccess.ReadWrite), DataField("soundRack"), AutoNetworkedField]
  31. public SoundSpecifier? RackSound = new SoundPathSpecifier("/Audio/Weapons/Guns/Cock/ltrifle_cock.ogg");
  32. }