-
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
Makes items dropped while in a locker go into the locker #28167
base: master
Are you sure you want to change the base?
Conversation
I believe you're not supposed to do RP changelog messages, to make it more clear to users and to shorten the amount they have to read |
var userXform = Transform(uid); | ||
var isInContainer = ContainerSystem.IsEntityOrParentInContainer(uid, xform: userXform); | ||
|
||
var entity = hand.HeldEntity!.Value; | ||
DoDrop(uid, hand, doDropInteraction: doDropInteraction, handsComp); | ||
if (!isInContainer) | ||
DoDrop(uid, hand, doDropInteraction: doDropInteraction, handsComp); |
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.
Isn't this just PlaceNextTo?
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.
Apparently this was caused by a bulk replace, so I need to actually dig through and figure out whats going on better, I just figured DropNextTo was there for a good reason. I'll update.
This works with disposal pipes too, this PR fixes it? |
Yeah, tested it, works as intended. |
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.
Can you make a test for this? Hands probably needs refactoring and having a test will make this a lot easier.
About the PR
Fixed unintended behaviour where items dropped while inside a locker went onto the floor, rather than into the locker's storage. Maybe fixes #17230?
Why / Balance
Bug bad.
Technical details
Game was trying to insert items into the locker twice. I don't fully understand why it was set up this way, but the second attempt saw the item was already in, freaked out, and dropped it on the floor outside the locker. I just made the first insert attempt be conditional on it not taking place in a container, because there's a second one that (I think) does the same thing if you are. I tested it and it didnt give me any errors and worked. If there's a way this should be working other than this, let me know and I'll change it, the hard part was figuring out what was causing it.
Media
Breaking changes
Changelog
🆑