diff --git a/src/character.cpp b/src/character.cpp index 3b6307b2585b0..c02424a5e291a 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -8712,11 +8712,6 @@ bool Character::invoke_item( item *used, const std::string &method, const tripoi moves = pre_obtain_moves; return false; } - if( used->is_medication() && !can_use_heal_item( *used ) ) { - add_msg_if_player( m_bad, _( "Your biology is not compatible with that healing item." ) ); - moves = pre_obtain_moves; - return false; - } item *actually_used = used->get_usable_item( method ); if( actually_used == nullptr ) { diff --git a/src/game_inventory.cpp b/src/game_inventory.cpp index 32f08207802cb..638c4b43e96b6 100644 --- a/src/game_inventory.cpp +++ b/src/game_inventory.cpp @@ -692,7 +692,7 @@ class comestible_inventory_preset : public inventory_selector_preset return _( "Can't drink spilt liquids." ); } - if( med.is_medication() && !p.can_use_heal_item( med ) ) { + if( med.is_medication() && !p.can_use_heal_item( med ) && !med.is_craft() ) { return _( "Your biology is not compatible with that item." ); } diff --git a/src/player.cpp b/src/player.cpp index 209c114f5cbd9..f40ef895da110 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -2014,12 +2014,6 @@ void player::use( item_location loc, int pre_obtain_moves ) item &used = *loc; last_item = used.typeId(); - if( ( *loc ).is_medication() && !can_use_heal_item( *loc ) ) { - add_msg_if_player( m_bad, _( "Your biology is not compatible with that healing item." ) ); - moves = pre_obtain_moves; - return; - } - if( used.is_tool() ) { if( !used.type->has_use() ) { add_msg_if_player( _( "You can't do anything interesting with your %s." ), used.tname() ); @@ -2036,6 +2030,13 @@ void player::use( item_location loc, int pre_obtain_moves ) } else if( !used.is_craft() && ( used.is_medication() || ( !used.type->has_use() && used.is_food() ) ) ) { + + if( used.is_medication() && !can_use_heal_item( used ) ) { + add_msg_if_player( m_bad, _( "Your biology is not compatible with that healing item." ) ); + moves = pre_obtain_moves; + return; + } + if( avatar *u = as_avatar() ) { const ret_val ret = u->will_eat( used, true ); if( !ret.success() ) {