Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make wielding automatically drop the item on your other hand #27975

Merged
merged 7 commits into from
May 19, 2024

Conversation

DrSmugleaf
Copy link
Member

About the PR

Media

Content.Client_QatiCNMrhH.mp4
  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog
🆑

  • tweak: Attempting to dual wield something will now automatically drop the item in your other hand.

Content.Shared/Wieldable/WieldableSystem.cs Outdated Show resolved Hide resolved
@@ -155,7 +154,7 @@ public bool CanWield(EntityUid uid, WieldableComponent component, EntityUid user
return false;
}

if (hands.CountFreeHands() < component.FreeHandsRequired)
if (hands.Count < component.FreeHandsRequired)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably use a new method that checks for CountFreeableHands or something.

Also the wieldable-component-not-enough-free-hands string needs to be changed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First part is fixed in a10b87a (#27975)

What should the string be changed to? I think it still conveys the meaning of "you can't drop this so you don't have enough free hands"

wieldable-component-not-enough-free-hands = {$number ->
    [one] You need a free hand to wield { THE($item) }.
    *[other] You need { $number } free hands to wield { THE($item) }.
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First thought yesterday was to keep with the naming wieldable-component-not-enough-freeable-hands, but I'm not sure how readable that is to localizers.

Alternatives wieldable-component-not-enough-available-hands or wieldable-component-not-enough-usable-hands

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First thought yesterday was to keep with the naming wieldable-component-not-enough-freeable-hands, but I'm not sure how readable that is to localizers.

Alternatives wieldable-component-not-enough-available-hands or wieldable-component-not-enough-usable-hands

I think its better to keep the id the same since it would be such a minor change from the original, just to not break any existing localization of it, but I could change if you think that's not a big deal

@github-actions github-actions bot added the Merge Conflict This PR currently has conflicts that need to be addressed. label May 14, 2024
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@RiceMar1244
Copy link
Contributor

This is a great QoL idea! While youre there, do you think you could consider automatically unwielding when switching hands?

@github-actions github-actions bot removed the Merge Conflict This PR currently has conflicts that need to be addressed. label May 18, 2024
@github-actions github-actions bot added the Status: Needs Review This PR requires new reviews before it can be merged. label May 18, 2024
@DrSmugleaf
Copy link
Member Author

This is a great QoL idea! While youre there, do you think you could consider automatically unwielding when switching hands?

In another PR maybe, it wouldn't work well with more than 2 hands

@DrSmugleaf DrSmugleaf merged commit 3d41d5f into space-wizards:master May 19, 2024
12 checks passed
@DrSmugleaf DrSmugleaf deleted the tweak/wield-drop-others branch May 19, 2024 01:35
Titian3 pushed a commit to Titian3/space-station-14 that referenced this pull request May 24, 2024
…izards#27975)

* Make wielding automatically drop the item on your other hand

* Fix docs

* Remove redundant parameter

* Fix not deleting virtuals on fail

* Make count freeable hands method

* Add popup when dropping item
@DrSmugleaf
Copy link
Member Author

This is a great QoL idea! While youre there, do you think you could consider automatically unwielding when switching hands?

@RiceMar1244 #28161

@RiceMar1244
Copy link
Contributor

Thanks a bunch for the heads up :o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Review This PR requires new reviews before it can be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants