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

Reloading Glass Jars of Sugar #37874

Closed
LetterShapedGlyphs opened this issue Feb 10, 2020 · 7 comments
Closed

Reloading Glass Jars of Sugar #37874

LetterShapedGlyphs opened this issue Feb 10, 2020 · 7 comments
Labels
<Bug> This needs to be fixed Items / Item Actions / Item Qualities Items and how they work and interact

Comments

@LetterShapedGlyphs
Copy link
Contributor

Describe the bug

Using the (R)eload screen displays glass jars containing sugar as valid targets. Despite the presence of other jars or loose sugar, attempting to select one results in a message about not having any sugar and the glass jar is moved to your inventory. This movement appears to be able to cause you to drop other items.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Obtain two glass jars partially full of sugar.
  2. Attempt to reload one of them.

Expected behavior

a - No ability to attempt to reload when reloading is not possible.
b - Reloading succeeds when executed.

Versions and configuration

  • OS: Windows 10
  • Game Version: 0.D-11543-g3e11834
  • Graphics version: Tiles
  • Mods loaded: None
@jkraybill
Copy link
Contributor

Trying to repro this. How did you obtain the partially filled jars of sugar? They are not craftable or debug-spawnable as far as I can tell.

@Drack820
Copy link
Contributor

Trying to repro this. How did you obtain the partially filled jars of sugar? They are not craftable or debug-spawnable as far as I can tell.

You can find them in houses, or you can use some sugar from a full jar of sugar.

I reproduced this in my current game and I wasn't able to reload any of the types of powder that I tested (lye powder, zinc powder, sugar, acrylamide, sulfur).

@jkraybill
Copy link
Contributor

jkraybill commented Feb 10, 2020

@Drack820 thanks -- I found an itemgroup that explicitly can spawn in sugar in glass jars, which seems to be the source of these found jars of sugar. The other powders you mentioned are defined as living in glass or plastic bottles.

I see in the code that the "reload" logic appears to never allow non-liquids to be transferred between bottles. While it would be ideal to fix that logic, one quick workaround would be to remove the itemgroup definition that can spawn sugar in glass bottles, and also to re-define these powders (lye powder, zinc powder, acrylamide, sulfur, I guess there are probably more) as existing in cardboard boxes.

EDIT: I've also found zinc oxide, manganese dioxide, potassium chloride, potassium hydroxide, chromium oxide, calcium carbide, peptone broth powder, agar as powders that natively live in bottles a player would expect to refill, but all of which give the message "you don't have any X to reload your (container) with X!"

@jkraybill
Copy link
Contributor

Also found an instance in data/json/itemgroups/SUS/domestic.json of powdered milk spawning in glass jars.

I think the right solution is to allow the refill/reload logic to treat powders like liquids, where it currently appears to treat them as non-refillable solids. Failing that, an alternative (easier?) solution would be to never spawn powders in plastic or glass bottles and re-define the substance containers as bags or boxes or large tin cans.

@TechyBen
Copy link
Contributor

I think jars and bottles might be part of the inventory refactor/changes. So this might get amended soon.

@LetterShapedGlyphs
Copy link
Contributor Author

It will probably be fixed by the container changes that are coming, but I thought it would be worth noting that this is a current problem to make sure that it's taken into account.

@wapcaplet
Copy link
Contributor

I could not reproduce this in 0.E-9737-g511ddcb179. Since the nested containers overhaul, solids like sugar cannot be reloaded into a glass jar, but they can be inserted. Liquids such as water can be reloaded into a glass jar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Items / Item Actions / Item Qualities Items and how they work and interact
Projects
None yet
Development

No branches or pull requests

6 participants