using Content.Shared.Weapons.Ranged.Systems; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; namespace Content.Shared.Weapons.Ranged.Components; /// /// Allows battery weapons to fire different types of projectiles /// [RegisterComponent, NetworkedComponent] [Access(typeof(BatteryWeaponFireModesSystem))] [AutoGenerateComponentState] public sealed partial class BatteryWeaponFireModesComponent : Component { /// /// A list of the different firing modes the weapon can switch between /// [DataField(required: true)] [AutoNetworkedField] public List FireModes = new(); /// /// The currently selected firing mode /// [DataField] [AutoNetworkedField] public int CurrentFireMode; } [DataDefinition, Serializable, NetSerializable] public sealed partial class BatteryWeaponFireMode { /// /// The projectile prototype associated with this firing mode /// [DataField("proto", required: true)] public EntProtoId Prototype = default!; /// /// The battery cost to fire the projectile associated with this firing mode /// [DataField] public float FireCost = 100; /// /// Wether or not this fire mode can be used by pacifists /// [DataField] public bool PacifismAllowedMode = false; } [Serializable, NetSerializable] public enum BatteryWeaponFireModeVisuals : byte { State }