Stop listing the contents of an individual supporter

There are a couple of ways that come to mind to handle listing contents of specific supporters. Also, have a look at this thread which also covers ways you can customize listing the contents of individual supporters.

The concepts in the documentation that most sound like what you’re trying to do are ones found in the Activities section, like WI 18.24 Writing a paragraph about and WI 18.25 Listing nondescript items of something, both of which have some bits about how to create special cases to print information about things.

I’m going to borrow one of the offered solutions from the linked thread and present it here (slightly modified) as one potential solution using the Writing a paragraph about activity:

Lab is a room.

A table is a supporter in Lab.

The pen is on the table.
The paper is on the table.
The orange is on the table.

Rule for writing a paragraph about the table:
	say "You see a table[if a thing is on the table]. On the table [is-are a list of things on the table][end if]."

Output:

Lab
You see a table. On the table are a pen, a paper and an orange.
 
>x table
On the table are a pen, a paper and an orange.
 
>take all
pen: Taken.
paper: Taken.
orange: Taken.
 
>l
Lab
You see a table.
 
>x table
You see nothing special about the table.

Note that there is a difference if you make the table a scenery supporter, so you’ll need to be careful about the situations where you use this activity depending on the kind of supporter it is.

Output with scenery supporter:

Lab
On the table are a pen, a paper and an orange.
 
>x table
On the table are a pen, a paper and an orange.
 
>take all
pen: Taken.
paper: Taken.
orange: Taken.
 
>l
Lab

If this is the case, you’ll want to read WI 18.28 Printing a locale description about which talks about the determination of whether to print some text about items the players can see. You’ll also want to familiarize yourself about cases where items can be “mentioned” which can affect how items may or may not be described. The example in this section also provides another way of handling items on supporters.

1 Like