Print room description details for parts

There are a few posts with questions that sound kind of like this one, but none of them hit exactly on the point I need to understand. Essentially I want to know why the *** starred *** code below doesn’t work.

This is an implementation of a trunk the player can stand on. Not too much different than some other implementations of supporter-containers I’ve seen. What I want to do, however, is have the room description details of the supporter show up when something is on the trunk (which is therefore closed), and the room description details ("(open)" or “(closed)”) show up when nothing is on top. The supporter details (“on which is a pan-galactic gargleblaster”) work fine, but not the container details. I assume this is due to some other rule suppressing the details of a part, but so far I haven’t found anything in the Standard Rules that would give me a clue.

Anyone know what would suppress the details from being printed, even when the activity is specifically invoked?

The black trunk is a supporter. It is enterable. It is in the Place. It is portable.
The black trunk's inside is a container. The printed name is "black trunk". It is a part of the black trunk. It is openable. 

The cardboard box is a container in Port-Side Bunks. It is open and openable.

Before entering the black trunk:
	if the black trunk's inside is open:
		say "(first closing the black trunk)[command clarification break]";
		silently try closing the black trunk's inside;
	continue the action.
	
Rule for listing contents of the black trunk:
	if something is on the black trunk:
		continue the activity;
	otherwise:
		carry out the listing contents activity with the black trunk's inside;

Rule for printing room description details for the black trunk when nothing is on the black trunk:
	*** carry out the printing room description details activity with the black trunk's inside; ***

Instead of opening the black trunk when the player is on the black trunk:
	say "You'll have to get off the black trunk first.";
	
Instead of opening the black trunk when something (called T) is on the black trunk and T is not the player:
	say "You'll have to remove the [list of things that are not the player on the black trunk] first."

Instead of opening the black trunk:
	try opening the black trunk's inside;
	
Instead of closing the black trunk:
	try closing the black trunk's inside;
	
Instead of inserting a thing (called T) into the black trunk:
	try inserting T into the black trunk's inside;
	
Instead of putting something (called T) on the black trunk when the black trunk's inside is open:
	say "(first closing the black trunk)[command clarification break]";
	silently try closing the black trunk's inside;
	continue the action;
	
Instead of examining the black trunk:
	if something is on the black trunk:
		continue the action;
	otherwise:
		try examining the black trunk's inside;
	
Instead of searching the black trunk:
	if something is on the black trunk:
		continue the action;
	otherwise:
		try searching the black trunk's inside;

There might be a nicer way to do this, but this seems like it might do what you want:

To write after entry for (O - object):
    (- WriteAfterEntry( {O} ); -).

Rule for printing room description details for the black trunk when nothing is on the black trunk:
    write after entry for black trunk's inside.
2 Likes

Works perfectly. Thanks! I tried to just recreate the text myself, and although that worked, this is much better.