I’m having issues dealing with containers.
Here is what I have:
In an apartment building lobby there is a bank of mailboxes, one for each of 8 apartments.
I have it set up where there is a fixed in place container in the room acting as the bank of mailboxes, and there are 8 containers within the mailbox bank.
Initially, I had this:
You can see a front door and a row of mailboxes (in which are mailbox #1 (closed), mailbox #2 (closed), mailbox #3 (closed), mailbox #4 (closed), mailbox #5 (closed), mailbox #6 (closed), mailbox #7 (closed), and mailbox #8 (closed)) here.
So I put in the “omit contents in listing” and now I have this:
You can see a front door and a row of mailboxes here.
This is fine.
My issue comes in when the player starts working with the mailboxes.
What I’d ultimately like to happen is this:
You can see a front door and a row of mailboxes here. Mailbox #6 is open and there is a letter inside.
But this is proving more difficult that I thought. I can get it to say these things by using the “After printing the locale description of…” rule, but that puts a paragraph break in, so it looks like this:[code]You can see a front door and a row of mailboxes here.
Mailbox #6 is open and there is a letter inside.[/code]Which is not the effect I’m going for. If I use the “After printing the name of the mailbox bank” I get this:
You can see a front door and a row of mailboxes, mailbox #6 is open and there is a letter inside here.
Which is even worse.
My question is: how do I tack stuff onto the item listing without having that paragraph break? What’s the rule I need to invoke here?
Thanks
Perhaps one of the extensions here could help you? Rrom Description Control seems promising. (But I haven’t used it myself.) Otherwise, it seems as if you would need to replace one of the standard rules.
One thing that might help is using the “printing a locale paragraph about” activity for the bank of mailboxes. Something like this:
for printing a locale paragraph about a row of mailboxes:
say "You can see a row of mailboxes here.[no line break]";
now the row of mailboxes is mentioned;
repeat with candidate running through mailboxes in row of mailboxes:
if candidate is open:
say " [Candidate] is open[if candidate contains something], and contains [a list of things in candidate][end if].[no line break]";
say paragraph break;
Trouble is, this gives the row of mailboxes a paragraph to itself; the front door and other visible objects will be listed in a separate paragraph. If you specifically want the door listed on the same line, you could kludge it in easily enough:
for printing a locale paragraph about a row of mailboxes:
say "You can see a front door and a row of mailboxes here.[no line break]";
now the row of mailboxes is mentioned;
now the front door is mentioned;
repeat with candidate running through mailboxes in row of mailboxes:
if candidate is open:
say " [Candidate] is open[if candidate contains something], and contains [a list of things in candidate][end if].[no line break]";
say paragraph break;
but other random objects you drop will still be listed in another paragraph. That might not be a problem. Since the door and mailboxes are part of the room, setting them apart from the more transient contents may not seem too jarring.
I can’t think of any entirely perfect way to do what you want, though, without rewriting some library rules from scratch.
Actually, that worked perfectly Thank you.
What I’ve got now is this:For printing a locale paragraph about the ApartmentMailboxBank:
say "You can see a front door and a row of mailboxes here[no line break]";
now the ApartmentMailboxBank is mentioned;
now the FrontDoorOfApartment is mentioned;
if the Apartment6Mailbox is unlocked and the Apartment6Mailbox is closed:
say ". Mailbox #6 is unlocked[no line break]";
if the Apartment6Mailbox is open:
say ". Mailbox #6 is open[no line break]";
if the Apartment6Mailbox contains something:
say ", and contains [a list of things in the Apartment6Mailbox][no line break]";
say ".[paragraph break]";I didn’t need anything fancy for dealing with each individual mailbox, since the only mailbox ever used is #6, the rest are basically scenery.