the-infocom-files / suspended

Suspended
8 stars 3 forks source link

You can put worn objects into containers #17

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>INVENTORY
I am grasping...
  A usable extension (being worn)
  A hollow container

>PUT EXTENSION IN CONTAINER
Done.

>INVENTORY
I am grasping...
  A hollow container
    The hollow container contains...
      A usable extension (being worn)

We should probably check how other games handles that, assuming that they do.

eriktorbjorn commented 4 years ago

In Planetfall, it's handled by PRE-PUT:

<ROUTINE PRE-PUT ()
     <COND (<NOT ,PRSO>
        <RFALSE>)>
     <COND (<FSET? ,PRSO ,WORNBIT>
        <TELL "You can't while you're wearing it." CR>)
           (<OR <IN? ,PRSO ,GLOBAL-OBJECTS>
            <NOT <FSET? ,PRSO ,TAKEBIT>>>
        <TELL "Nice try." CR>)>>