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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions data/json/items/tool/cooking.json
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,14 @@
],
"magazine_well": 2
},
{
"id": "multi_cooker_filled",
"type": "TOOL",
"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.",
"delete": { "qualities": [ [ "CONTAIN", 1 ] ] }
},
{
"id": "oil_cooker",
"type": "TOOL",
Expand Down
4 changes: 2 additions & 2 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8682,7 +8682,7 @@ int iuse::multicooker( player *p, item *it, bool t, const tripoint &pos )

it->contents.erase( dish_it );
it->erase_var( "RECIPE" );

it->convert( "multi_cooker" );
if( is_delicious ) {
p->add_msg_if_player( m_good,
_( "You got the dish from the multi-cooker. The %s smells delicious." ),
Expand Down Expand Up @@ -8764,7 +8764,7 @@ int iuse::multicooker( player *p, item *it, bool t, const tripoint &pos )
p->add_msg_if_player( m_good,
_( "The screen flashes blue symbols and scales as the multi-cooker begins to shake." ) );

it->active = true;
it->convert( "multi_cooker_filled" ).active = true;
it->ammo_consume( charges_to_start, pos );

p->practice( skill_cooking, meal->difficulty * 3 ); //little bonus
Expand Down