[I7] Checking if Current Room Description is Blank

Is there a way to see if the current room description has actually printed anything?

When I say “current” I don’t mean if the source text has a room description for a room, which is a static consideration. I’m talking about a check based on what the player actually saw at a given time, and is thus a dynamic consideration.

So as an example, you might have rules that display a room description under some circumstances but other times not.

I’m curious if there’s a way to check if, for the location just visited, the room description was not blank or was blank. Basically it would be nice if I could do something like:

if the current room description for Flower Walk was "":
    ...

The idea would be just looking for the description, not the locale or the room heading.

This might depend on how complicated your room description code is. If the room description itself isn’t contained tidily in one place, which seems likely from your other thread, then I can’t think of a super obvious way to do this other than by using Text Capture by Eric Eve.

With Text Capture, you could start capturing text at the moment you start printing the room description, and then at the end check whether the captured text is empty–that would let you check what the player actually sees, not just some text substitution. (You’d also have to say the captured text to make sure the person actually sees it!)

If you only care about the description of the location–for instance, you have a complex description with substitutions that could turn out empty–you could check the description, as in this:

Storehouse is a room. "This is for storing the things that affect your mood in the moodarium, to the south." A feather, a fish, a thorn, and a book are in Storehouse.

Moodarium is south of storehouse. "[if the player carries the feather]You feel reassured.[otherwise if the player carries the fish]The fish wriggles in a threatening manner.[otherwise if the player carries the thorn]A sense of danger overwhelms you.[otherwise if the player carries the book]You groan under the burden of unfinished business.[end if]"

After looking:
	if the number of characters in the description of the location is 0:
		say "Looks like there wasn't much of interest here." 

(“if the description of the location is empty” should work here, as in §20.3, but it doesn’t seem to. Maybe that actually tests if it’s the empty text?)