-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Make wielding automatically drop the item on your other hand #27975
Conversation
Content.Shared/Inventory/VirtualItem/SharedVirtualItemSystem.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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) }.
}
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
orwieldable-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
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This is a great QoL idea! While youre there, do you think you could consider automatically unwielding when switching hands? |
…on-14 into tweak/wield-drop-others
In another PR maybe, it wouldn't work well with more than 2 hands |
…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
|
Thanks a bunch for the heads up :o |
About the PR
Media
Content.Client_QatiCNMrhH.mp4
Changelog
🆑