MagazineVisualsComponent.cs 818 B

123456789101112131415161718192021222324252627282930313233
  1. using Content.Client.Weapons.Ranged.Systems;
  2. namespace Content.Client.Weapons.Ranged.Components;
  3. /// <summary>
  4. /// Visualizer for gun mag presence; can change states based on ammo count or toggle visibility entirely.
  5. /// </summary>
  6. [RegisterComponent, Access(typeof(GunSystem))]
  7. public sealed partial class MagazineVisualsComponent : Component
  8. {
  9. /// <summary>
  10. /// What RsiState we use.
  11. /// </summary>
  12. [DataField("magState")] public string? MagState;
  13. /// <summary>
  14. /// How many steps there are
  15. /// </summary>
  16. [DataField("steps")] public int MagSteps;
  17. /// <summary>
  18. /// Should we hide when the count is 0
  19. /// </summary>
  20. [DataField("zeroVisible")] public bool ZeroVisible;
  21. }
  22. public enum GunVisualLayers : byte
  23. {
  24. Base,
  25. BaseUnshaded,
  26. Mag,
  27. MagUnshaded,
  28. }