Hi, all. I’ve only been reading the Inform 7 documentation for 2 weeks, so I apologise if this is covered in there somewhere. I’ve spent hours looking for solutions here (and digressing to solutions to other problems I have. Hopefully this post willl “empty my stack”!).
Here’s my code:
"Glasses as containers 2" by Marbles
R1 is a room. "A nondescript room." The printed name of R1 is "Somewhere".
A glass is a kind of container.
a brandy balloon, a champagne flute, a pint glass, a sherry glass, a tumbler, and a highball glass are glasses.
The player is holding a marble, a whistle, a bee, a brandy balloon, a champagne flute, a pint glass, a sherry glass, a tumbler, and a highball glass.
A giant glass is a glass in R1. It is fixed in place.
Definition: a container is empty if it does not contain something.
Tidying is an action applying to nothing.
Understand "tidy" as tidying.
Carry out tidying:
repeat with item running through the list of empty glasses which are in the location:
say "[item]: [run paragraph on]";
try taking the item.
test me with "put marble in balloon/put whistle in flute/drop all/tidy/get all".
My problem is that, although “drop all” and “get all” use 1 line for each object, my “tidy” has a blank line between the line for each object. Is there any way of suppressing those blank lines?
(In case you’re wondering what version 1 was, it built a list of tidied glasses then said “You tidy up the [tidied glasses].”… which was even better… till I added the untakeable giant glass, which led to a line saying (cryptically) “That’s fixed in place.\n\n”.)