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

Prevent storing multiple copies of the same book #79523

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

ShnitzelX2
Copy link
Contributor

Summary

Bugfixes "prevent storing multiple copies of the same book"

Purpose of change

Fixes #73282

Describe the solution

  • Adds a function that removes duplicate items from an inventory_selector, discriminating by itype and optionally by variant
  • Adds some basic docs to inventory_selector and related classes
  • Adds an is_identifiable() function; this is currently just is_book(), but it allows a check for doing the identification so that non-books can be scanned in the future

Describe alternatives you've considered

Testing

Spawned textbooks 100 times and used "Store books" option with smartphone, noted no additional copies in list, but variants were still present.

Additional context

for e-scanning one copy of a book only
@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Feb 3, 2025
@Maleclypse Maleclypse merged commit 4fbc240 into CleverRaven:master Feb 5, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

storing books with smartphones will let you store multiply copies of the same book
2 participants