void Character::remove_mission_items( int mission_id ) { if( mission_id == -1 ) { return; } remove_items_with( has_mission_item_filter { mission_id } ); }
item inventory::remove_item(const item *it) { auto tmp = remove_items_with( [&it] (const item &i) { return &i == it; } ); if( !tmp.empty() ) { return tmp.front(); } debugmsg("Tried to remove a item not in inventory (name: %s)", it->tname().c_str()); return nullitem; }
item Character::i_rem(const item *it) { auto tmp = remove_items_with( [&it] (const item &i) { return &i == it; } ); if( tmp.empty() ) { debugmsg( "did not found item %s to remove it!", it->tname().c_str() ); return ret_null; } return tmp.front(); }
item visitable<T>::remove_item( item& it ) { auto obj = remove_items_with( [&it]( const item& e ) { return &e == ⁢ }, 1 ); if( !obj.empty() ) { return obj.front(); } else { debugmsg( "Tried removing item from object which did not contain it" ); return item(); } }
item inventory::remove_item( const item *it ) { auto tmp = remove_items_with( [&it]( const item & i ) { return &i == it; }, 1 ); if( !tmp.empty() ) { binned = false; return tmp.front(); } debugmsg( "Tried to remove a item not in inventory." ); return item(); }