Opened 9 days ago

Closed 9 days ago

#16761 closed defect (fixed)

NANCY: Regression in Secrets Can Kill: Eloise drawer

Reported by: tunnelsociety Owned by: tunnelsociety <tunnelsociety@…>
Priority: normal Component: Engine: Nancy
Version: Keywords:
Cc: Game: Nancy Drew: Secrets Can Kill

Description

The phone card does not appear in the drawer at the beginning of the game.

$ git bisect bad

f091b03c8a94622ce3296ff42cb2719a62433e6c is the first bad commit
commit f091b03c8a94622ce3296ff42cb2719a62433e6c (origin/master)
Date:   Sat May 2 18:37:10 2026 +0300

    NANCY: Refactor most uses of friend class
    
    Add appropriate getters and setters, where needed

Attachments (1)

sck.001 (12.0 KB ) - added by tunnelsociety 9 days ago.

Download all attachments as: .zip

Change History (3)

by tunnelsociety, 9 days ago

Attachment: sck.001 added

comment:1 by tunnelsociety, 9 days ago

Hmm, I was able to make the phone card appear with the following, and tested quickly that some inventory-dependent conversation did not differ in nancy9...:

  • engines/nancy/action/actionmanager.cpp

    a b void ActionManager::processDependency(DependencyRecord &dep, ActionRecord &recor  
    338338                       dep.satisfied = true;
    339339                       break;
    340340               case DependencyType::kInventory:
    341                        if (dep.condition == g_nancy->_false) {
    342                                // Item not in possession or held
    343                                dep.satisfied = !NancySceneState.hasItem(dep.label);
    344                        } else {
    345                                dep.satisfied = NancySceneState.hasItem(dep.label);
    346                        }
     341                       dep.satisfied = NancySceneState.hasItem(dep.label) == dep.condition;
    347342
    348343                       break;
    349344               case DependencyType::kEvent:

I'll try a few things to make sure this doesn't add new problems.

comment:2 by tunnelsociety <tunnelsociety@…>, 9 days ago

Owner: set to tunnelsociety <tunnelsociety@…>
Resolution: fixed
Status: newclosed

In 37b8dcae:

NANCY: Fix inventory check in early games

hasItem() returns Nancy engine's _true and _false, which might
not be true and false.

Fix #16761

Note: See TracTickets for help on using tickets.