Skip to content

Commit

Permalink
# If this commit is applied, it will ....
Browse files Browse the repository at this point in the history
Don't allow to scan books that are owned by other character

# Explain why this change is being made
# |<----      Limit Each Line to a Maximum Of 72 Characters       ---->|
It was possible to scan books from merchant inventory without
buying them.

# Provide links or keys to any relevant tickets, articles or other resources
# Example: fixes CleverRaven#1234, closes CleverRaven#2345, resolves CleverRaven#3456, references CleverRaven#4567
fixes CleverRaven#65840
  • Loading branch information
Demivan committed May 30, 2023
1 parent dc4fd35 commit 4d896b1
Showing 1 changed file with 2 additions and 2 deletions.
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 );
},
*p->as_avatar(), _( "Scan which book?" ), PICKUP_RANGE );

Expand Down

0 comments on commit 4d896b1

Please sign in to comment.