-
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
Converting multi-cooker to another item when it is filled with a dish. #37794
Converting multi-cooker to another item when it is filled with a dish. #37794
Conversation
To prevent other crafting processes to touch it when it is cooking.
data/json/items/tool/cooking.json
Outdated
"copy-from": "multi_cooker", | ||
"name": { "str": "multi cooker - cooking" }, | ||
"description": "A professional-grade multi-cooker, with a battery slot for camping trips or tailgating. There is a dish in it.", | ||
"//": "Don't know how to force it to lose qualities. Specifying empty array here seems not to work.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can put full item definition instead of using copy-from
.
Or try something like:
"delete": { "qualities": [ [ "COOK", 3 ] ] },
"extend": { "qualities": [ [ "HAMMER", 1 ], [ "COOK", 2 ] ] }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"delete": { "qualities": [ [ "COOK", 3 ] ] },
Did not worked for qualities.
I made full item definition instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #37804
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ZhilkinSerg 's PR is landed, so you can redo this on top of his new feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
SUMMARY: Bugfixes "Multicooker disapear from inventory when crafting other things"
Purpose of change
Fixes #37728 - Multicooker disapear from inventory when crafting other things
Describe the solution
Convert multi cooker to another item when it is filled with dish. This prevents other code from messing with It's qualities when trying to perform parallel crafting. Also it makes sense because multi-cooker cannot be used to heat other things when it is filled with a dish.
Describe alternatives you've considered
Modify crafting handling code to find where things go south when trying to use activated multi-cooker as a tool. Actually, in my opinion, investigation of the cause of such strange behaviour of item disapearing and calling function that shouldn't be called there should be done no matter if this PR will be merged or not.
Testing
Spawned a multi-cooker, tried to craft a dish with it. Tried to craft another dish manually while multi cooker was active.
Additional context
N/A