using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Content.Server.Weapons.Ranged.Systems; namespace Content.Server.Weapons.Ranged.Components; /// /// Allows battery weapons to fire different types of projectiles /// [RegisterComponent] [Access(typeof(BatteryWeaponFireModesSystem))] [AutoGenerateComponentState] public sealed partial class BatteryWeaponFireModesComponent : Component { /// /// A list of the different firing modes the weapon can switch between /// [DataField("fireModes", required: true)] [AutoNetworkedField] public List FireModes = new(); /// /// The currently selected firing mode /// [DataField("currentFireMode")] [AutoNetworkedField] public BatteryWeaponFireMode? CurrentFireMode = default!; } [DataDefinition] public sealed partial class BatteryWeaponFireMode { /// /// 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; }