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

Converting multi-cooker to another item when it is filled with a dish. #37794

Merged

Conversation

eilaattwood
Copy link
Contributor

@eilaattwood eilaattwood commented Feb 7, 2020

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

To prevent other crafting processes to touch it when it is cooking.
@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Items / Item Actions / Item Qualities Items and how they work and interact labels Feb 7, 2020
"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.",
Copy link
Contributor

@ZhilkinSerg ZhilkinSerg Feb 7, 2020

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 ] ] }

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #37804

Copy link
Member

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done:

image

@ZhilkinSerg ZhilkinSerg merged commit dc64c6e into CleverRaven:master Feb 24, 2020
@eilaattwood eilaattwood deleted the yet-another-multicooker-fix branch July 3, 2020 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multicooker disapear from inventory when crafting other things
3 participants