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

Don't allow to scan books that are owned by other characters #65927

Merged
merged 2 commits into from
Jun 19, 2023
Merged
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
4 changes: 2 additions & 2 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8864,8 +8864,8 @@ std::optional<int> iuse::ebooksave( Character *p, item *it, bool t, const tripoi
}

const item_location book = game_menus::inv::titled_filter_menu(
[&ebooks]( const item & itm ) {
return itm.is_book() && itm.type->book->is_scannable && !ebooks.count( itm.typeId() );
[&ebooks, &p]( const item & itm ) {
return itm.is_book() && itm.type->book->is_scannable && !ebooks.count( itm.typeId() ) && itm.is_owned_by( *p, true );
Demivan marked this conversation as resolved.
Show resolved Hide resolved
},
*p->as_avatar(), _( "Scan which book?" ), PICKUP_RANGE );

Expand Down