using Robust.Shared.GameStates; using Robust.Shared.Audio; using Content.Shared.Damage; namespace Content.Shared.Item; /// /// Handles the changes to the melee weapon component when the item is toggled. /// /// /// You can change the damage, sound on hit, on swing, as well as hidden status while activated. /// [RegisterComponent, NetworkedComponent] public sealed partial class ItemToggleMeleeWeaponComponent : Component { /// /// The noise this item makes when hitting something with it on. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public SoundSpecifier? ActivatedSoundOnHit; /// /// The noise this item makes when hitting something with it off. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public SoundSpecifier? DeactivatedSoundOnHit; /// /// The noise this item makes when hitting something with it on and it does no damage. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public SoundSpecifier? ActivatedSoundOnHitNoDamage; /// /// The noise this item makes when hitting something with it off and it does no damage. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public SoundSpecifier? DeactivatedSoundOnHitNoDamage; /// /// The noise this item makes when swinging at nothing while activated. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public SoundSpecifier? ActivatedSoundOnSwing; /// /// The noise this item makes when swinging at nothing while not activated. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public SoundSpecifier? DeactivatedSoundOnSwing; /// /// Damage done by this item when activated. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public DamageSpecifier? ActivatedDamage = null; /// /// Damage done by this item when deactivated. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public DamageSpecifier? DeactivatedDamage = null; /// /// Does this become hidden when deactivated /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public bool DeactivatedSecret = false; } /// /// Raised in order to effect changes upon the MeleeWeaponComponent of the entity. /// [ByRefEvent] public record struct ItemToggleMeleeWeaponUpdateEvent(bool Activated) { public bool Activated = Activated; }