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

Fix in-progress crafting of liquid items to have liquid behaviour #36011

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@ item::item( const recipe *rec, int qty, std::list<item> items, std::vector<item_
}
}
}

// in craft of liquid item should have liquid attribute
if( find_type(making->result())->phase == LIQUID ) {
current_phase = static_cast<phase_id>( 2 );
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
current_phase = static_cast<phase_id>( 2 );
current_phase = LIQUID;

}
}

item item::make_corpse( const mtype_id &mt, time_point turn, const std::string &name )
Expand Down
2 changes: 2 additions & 0 deletions src/pickup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ bool pick_one_up( item_location &loc, int quantity, bool &got_water, bool &offer
}
} else if( newit.made_of_from_type( LIQUID ) && !newit.is_frozen_liquid() ) {
got_water = true;
} else if( newit.is_craft() && newit.made_of( LIQUID )) {
got_water = true; //Handles in progress liquid craft
} else if( !u.can_pickWeight( newit, false ) ) {
if( !autopickup ) {
const std::string &explain = string_format( _( "The %s is too heavy!" ),
Expand Down