the-infocom-files / infidel

Infidel
3 stars 3 forks source link

When you examine the knothole, you see at most one object inside it #36

Open eriktorbjorn opened 5 years ago

eriktorbjorn commented 5 years ago
>LOOK
West End of Hold
You are in the westmost portion of the hold, below the deck of the barge. On the
north side of the hull is a small knothole about three feet off the deck.
Overhead you can see a hole going through the deck while, directly below this
hole, on the deck by your feet, is a slot.
The knothole contains:
  A matchbook
  A cigarette pack
Coming down through the hole above your head and ending in the slot at your feet
is the beam which served as a mast.

>EXAMINE KNOTHOLE
All I can see is a matchbook in there.

That's because TORCH-HOLDER-FCN assumes that there can only be one object inside, when the only thing that would keep you from putting more inside is that it has limited capacity:

           (<VERB? EXAMINE LOOK-INSIDE>
        <COND (<SET FROB <FIRST? ,PRSO>>
               <TELL "All I can see is a " D .FROB " in there." CR>)
              (T
               <TELL "Through the knothole is inky blackness." CR>)>)>>
eriktorbjorn commented 5 years ago

There are other containers in the game where you can only put one object in them at a time. Look for instance at DIAMOND-HOLE-FCN. A similar approach could be used here.