diff --git a/Content.Shared/Wieldable/Components/WieldableComponent.cs b/Content.Shared/Wieldable/Components/WieldableComponent.cs index 4a50b93072..5dc6abbbbe 100644 --- a/Content.Shared/Wieldable/Components/WieldableComponent.cs +++ b/Content.Shared/Wieldable/Components/WieldableComponent.cs @@ -26,6 +26,13 @@ public sealed partial class WieldableComponent : Component [AutoNetworkedField, DataField("wielded")] public bool Wielded = false; + /// + /// Whether using the item inhand while wielding causes the item to unwield. + /// Unwielding can conflict with other inhand actions. + /// + [DataField] + public bool UnwieldOnUse = true; + [DataField("wieldedInhandPrefix")] public string? WieldedInhandPrefix = "wielded"; diff --git a/Content.Shared/Wieldable/WieldableSystem.cs b/Content.Shared/Wieldable/WieldableSystem.cs index 6bd406c1ca..ba3f787a4b 100644 --- a/Content.Shared/Wieldable/WieldableSystem.cs +++ b/Content.Shared/Wieldable/WieldableSystem.cs @@ -125,7 +125,7 @@ public sealed class WieldableSystem : EntitySystem if (!component.Wielded) args.Handled = TryWield(uid, component, args.User); - else + else if (component.UnwieldOnUse) args.Handled = TryUnwield(uid, component, args.User); } diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml index 49b2eeaada..79f2e7b45f 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml @@ -14,6 +14,7 @@ slots: - Back - type: Wieldable + unwieldOnUse: false - type: GunWieldBonus minAngle: -20 maxAngle: -20