Containers

Dear all, here’s a very easy question (for you): How do I need to define a container when I don’t want its content to be listed in the room description, but upon examining it (and when the container is in the player’s inventory)? Thanks and kind regards, G.

1 Like

I believe it’s
contentsListed = nil
contentsListedInExamine = true

Just noticed the inventory part. Might have to check that when I get back to a computer

There are potentially many ways to tweak your inventory lister to show contents of an item that doesn’t usually show them.
But maybe the quickest is to simply set your Container like this:

contentsListed = gActionIs(Inventory)

This might be another solution:

modify Lister
contentsListed(obj) { return obj.contentsListedInExamine || inherited(obj); }

2 Likes

Thanks, that did the trick!

1 Like