Replacing "in which is" when printing can-also-see

Apologies if this has been answered a thousand times (but I just can’t find it).

I would like to replace the phrase “in which is” when listing the contents of a (specialized) container in the room description.

For example, instead of

 You can also see a portrait ([i]in which is[/i] safe2 (closed)) and hat here.

I would like to say (something like)

You can also see a portrait ([i]which concealed[/i] safe2 (closed)) and hat here.

Any help?

Test Chamber is a room.

The portrait is a container in Test Chamber. The indefinite article is "a".

The safe is a closed openable container in the portrait. The printed name of the safe is "safe2". The safe is proper-named.

The apple pie is an edible thing in the portrait.

The hat is a wearable thing in Test Chamber.

The table is a supporter in Test Chamber.

Rule for printing the name of the portrait while listing contents of a room:
	say "portrait (which concealed [if portrait contains nothing]nothing[else][a list of things in portrait including contents][end if])";
	omit contents in listing.
	
Test me with "x portrait / take portrait / i / put portrait on table / l / x table / take all from portrait / l / take portrait / i / x portrait / drop portrait / l / take hat / put hat in portrait / l".

A similar alternative is:

Rule for printing room description details of the portrait:
	say " (which concealed [if portrait contains nothing]nothing[else][a list of things in portrait including contents][end if])";
	omit contents in listing.

This second rule will trigger under more circumstances than the first (see the output of “x table” in “test me” for the two different rules). Depending on the details of your game, you may want to relax the first rule’s constraint (while listing contents of a room -> while listing contents).

Strangely, without the line that explicitly sets the portrait’s article, the first approach causes the article “an” to be chosen for the portrait if it contains an apple pie. However, if I change the apple pie to a papple pie, the article “a” is selected instead.

Vince, what version are you using? That sounds kind of like a bug involving indefinite articles that was fixed in 6L02… but in any case it sounds like a bug, which you should file.

I’m using 6M62 on OS X 10.6.8.

I filed this in Mantis as 1893. I also discovered and filed 1894 in the process.

Edit: 1893 seems to be a zcode-only bug.

Thank you. The key thing I was apparently missing was using the “while listing contents of a room” part of defining the rule.

Rule for printing the name of the portrait while listing contents of a room:

Now that you show me, I feel even more foolish than I did when I posted my question… sigh.

Thank you again - this can definitely be marked as answered.