-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Crafting menu does not recognize Survivor toolbelt qualities when belt is in inventory #43248
Comments
The code says |
Happens with butchering too, where the reported butchering level may be invalid, when the best tool is stored in a container. |
@danielkwinsor Can you make a separate issue for that with steps to reproduce it? Butchering works different than crafting, so it requires a different fix. |
(for drive-bys, mqrause is referring to the section here: https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/crafting.cpp#L558-L564) That does make sense. Well, from a code standpoint at least, it's silly from a logic standpoint. |
Is there an elegant solution? I'm not a programmer so please excuse if any of this is fanciful. Seems like that check should only apply to "container" containers (e.g. cooking pots, metal tanks, etc.) and nothing else (e.g. survivor toolbelts). Does this mean the only solution is manually editing every single item with a new attribute "can only be used when empty"? That sounds maybe tedious, but is probably best for the long run. The other thing that comes to mind is the check you linked to only triggers when a recipe requires either of the following:
Edit: OR how about just checking if the tool can carry liquids first then checking if it's empty. It would make sense that if you want to use a pot full of water to cook, you'd need to empty it first (and therefore choose the ground or another container). But if the pot happens to be full of dry beans, then it's trivial to take the beans out temporarily. |
Definitely. It just needs a proper definition of all the expected behavior. It's not necessarily something you just slap a solution on for whatever item you come across. |
Could a solution be adding the qualities of the container to the contained items qualities? like it thinks its holding itself plus anything put into it. |
Describe the bug
When I have a survivor utility belt in my inventory (either worn or not), I am unable to perform the Improvised Lockpick craft, and the
metal sawing 2
requirement is highlighted red. When I drop the belt and try the craft after doing so, I am able to perform the craft. If I pick the belt back up, I am once again unable to perform it.Steps To Reproduce
Expected behavior
I would expect the metal sawing 2 quality to be available as long as the tool is in reach, regardless of whether it is in my personal inventory or elsewhere.
Screenshots
Do not take a screenshot of the crashing window. Please provide the crash logs in the "Additional context" -->
Versions and configuration
The text was updated successfully, but these errors were encountered: