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

Makes items dropped while in a locker go into the locker #28167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mith-randalf
Copy link
Contributor

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

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

Breaking changes

Changelog

🆑

  • fix: Due to a budget oversight, items dropped while in lockers were teleporting out of the locker. This has now been rectified.

@Plykiya
Copy link
Contributor

Plykiya commented May 20, 2024

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

Comment on lines +112 to +117
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);
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@SoulFN
Copy link
Contributor

SoulFN commented May 21, 2024

This works with disposal pipes too, this PR fixes it?

@Mith-randalf
Copy link
Contributor Author

This works with disposal pipes too, this PR fixes it?

Yeah, tested it, works as intended.

Copy link
Member

@ShadowCommander ShadowCommander left a 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.

@AJCM-git AJCM-git added the Status: Awaiting Changes This PR needs its reviews addressed or changes to be made in order to be merged. label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting Changes This PR needs its reviews addressed or changes to be made in order to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stripping inside container with full hands puts items on the floor
6 participants