2022-06-04 17:36:40 +10:00
|
|
|
using Content.Client.Weapons.Ranged.Systems;
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.Weapons.Ranged.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Visualizer for gun mag presence; can change states based on ammo count or toggle visibility entirely.
|
|
|
|
|
/// </summary>
|
2022-06-07 15:26:28 +02:00
|
|
|
[RegisterComponent, Access(typeof(GunSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class MagazineVisualsComponent : Component
|
2022-06-04 17:36:40 +10:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// What RsiState we use.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("magState")] public string? MagState;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How many steps there are
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("steps")] public int MagSteps;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Should we hide when the count is 0
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("zeroVisible")] public bool ZeroVisible;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum GunVisualLayers : byte
|
|
|
|
|
{
|
|
|
|
|
Base,
|
|
|
|
|
BaseUnshaded,
|
|
|
|
|
Mag,
|
|
|
|
|
MagUnshaded,
|
|
|
|
|
}
|