[beta] Liquid pools are consumed by waiting in them

Issue #97 resolved
syntaxaire created an issue

Steps to reproduce:

  • Go to any zone around Joppa
  • Check the depth of a pool then stand in it
  • Use the ctrl+period keybind to wait 100 turns at a time

After waiting for a while the pool will be destroyed. Works on deep pools as well, and on asphalt too.

Comments (4)

  1. Noelle Lavenza

    Working hypothesis: Entering a pool with a different liquid already covering you, even if it’s by a 1/1000 difference in proportion, will cause some of the liquid to be transferred to you on contact. This mixed liquid will still not match the pool, and so it will try to cover you with the maximum amount possible. This will still not match the pool, so it’ll once again try to cover you. This will continue until the liquid drains entirely. Worse still, once the liquid reaches a certain point, it will begin to evaporate as well as have its proportion changed by the liquid flowing off of you.

    This can be triggered even by walking through a small puddle of liquid on your way into a much deeper pool, and can be hard to notice if, say, that small puddle is covered by watervine, brinestalk, or any other object that renders above it. I suspect this is why my first attempt to reproduce this bug was successful but no attempts after were—I just didn’t notice my character was already covered in a (slightly) different liquid when entering.

    Two thoughts on how to fix this: First, use fuzzy matching/epsilon equality for proportions in GetCurrentCoverIfSame, so that liquids within a certain tolerance are treated as matching. This might be marginally more expensive to calculate, and runs into issues of what (admittedly arbitrary) threshold to use as the tolerance. Second, ignore proportions altogether and only check if the primary and secondary liquids match. This would be cheaper but run into issues where a 501/499 liquid mix isn’t mixing with a 999/001 liquid mix, because they’re considered the same.

  2. Log in to comment