Skip to content

SHERLOCK: Fix localized inventory target mismatch#7268

Closed
1SHAMAY1 wants to merge 1 commit intoscummvm:masterfrom
1SHAMAY1:fix-sherlock-inventory-16497
Closed

SHERLOCK: Fix localized inventory target mismatch#7268
1SHAMAY1 wants to merge 1 commit intoscummvm:masterfrom
1SHAMAY1:fix-sherlock-inventory-16497

Conversation

@1SHAMAY1
Copy link
Contributor

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::load populates _description with 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?)

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.
@sev-
Copy link
Member

sev- commented Feb 27, 2026

Unfortunately, we do not accept untested changes. What you did could break Chinese version or break other versions of the game.

@1SHAMAY1 1SHAMAY1 marked this pull request as draft February 27, 2026 14:01
@dreammaster
Copy link
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:
obj._use[useNum]._target = "»áÔ±½äÖ¸"
inv[_owner->_invSelect]._description = "@$[�tQ]„vX$@"

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.

@dreammaster dreammaster closed this Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants