using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Content.Server._DV.Weapons.Ranged.Systems; namespace Content.Server._DV.Weapons.Ranged.Components; /// /// Allows for energy gun to switch between three modes. This also changes the sprite accordingly. /// /// This is BatteryWeaponFireModesSystem with additional changes to allow for different sprites. [RegisterComponent] [Access(typeof(EnergyGunSystem))] [AutoGenerateComponentState] public sealed partial class EnergyGunComponent : Component { /// /// A list of the different firing modes the energy gun can switch between /// [DataField("fireModes", required: true)] [AutoNetworkedField] public List FireModes = new(); /// /// The currently selected firing mode /// [DataField("currentFireMode")] [AutoNetworkedField] public EnergyWeaponFireMode? CurrentFireMode = default!; } [DataDefinition] public sealed partial class EnergyWeaponFireMode { /// /// The projectile prototype associated with this firing mode /// [DataField("proto", required: true, customTypeSerializer: typeof(PrototypeIdSerializer))] public string Prototype = default!; /// /// The battery cost to fire the projectile associated with this firing mode /// [DataField("fireCost")] public float FireCost = 100; /// /// The name of the selected firemode /// [DataField("name")] public string Name = string.Empty; /// /// What RsiState we use for that firemode if it needs to change. /// [DataField("state")] public string State = string.Empty; }