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

Liquid duplication when LOOKING at buckets #17341

Closed
Coolthulhu opened this issue Jun 24, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@Coolthulhu
Copy link
Contributor

commented Jun 24, 2016

Now that's an arcane bug. I'm in the process of fixing it, but I feel the need to report it just as a warning for the future and possible amusement. I had to debug to find it.

  • Get a bucket with liquid. For example, spawn 2 contained colas, spill one and refill the newly opened can with the other.
  • Drop the bucket with liquid on the ground
  • Examine the tile with the bucket
  • Mark the bucket for pickup
  • Escape without picking up anything
  • There is now a copy of the liquid beneath your feet

The bug is caused because of how we're calculating volume and weight of items to be picked up: we clone the player, give the clone new items and ask how much does the clone's item weight and occupy volume.
But giving any character a bucket with liquid will spill the liquid. This includes the clone who doesn't really exist and will be deleted as soon as the pickup menu is closed.

So by imagining a character who will pick up an item, we create a real copy of said item's contents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.