SHERLOCK: Fix localized inventory target mismatch#7268
Closed
1SHAMAY1 wants to merge 1 commit intoscummvm:masterfrom
Closed
SHERLOCK: Fix localized inventory target mismatch#72681SHAMAY1 wants to merge 1 commit intoscummvm:masterfrom
1SHAMAY1 wants to merge 1 commit intoscummvm:masterfrom
Conversation
Allow verb targets to match an inventory item's description as well as its name. Add comparisons against inv[...]._description in WidgetInventoryVerbs::load and WidgetInventory::handleEvents, and introduce _invTargetDesc (set when selecting an item) so verbs referencing an item's description are recognized.
Member
|
Unfortunately, we do not accept untested changes. What you did could break Chinese version or break other versions of the game. |
Member
|
I tested your code, and whilst it was an interesting attempt, it didn't work at all. FWIW: widget_inventory.cpp:279 is where the main verb list is built up for objects. I checked, and in the Chinese version, these are the values: So the compareToIgnoreCase fails. Unfortunately, it seems the Chinese version will require more extensive work to set up mappings for Chinese to English so that these actions work. As such, I'm closing this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow verb targets to match an inventory item's description as well as its name. Add comparisons against inv[...]._description in WidgetInventoryVerbs::load and WidgetInventory::handleEvents, and introduce _invTargetDesc (set when selecting an item) so verbs referencing an item's description are recognized.
Fixes #16497
SHERLOCK: ROSETATTOO: (Chinese) inventory action menu missing due to localized target mismatch
(Note for reviewers: I unfortunately don't have the Chinese CD version of Rose Tattoo to test this locally. However, since
Object::loadpopulates_descriptionwith the localized display name from the game data, updating the comparison logic to check both_name(internal) and_description(localized) should correctly resolve the target string mismatch described in the ticket. Could someone with the Chinese data please verify?)