Emulating the looking action

I’m making a version of “A View of Green Hills” (example 80), except instead of just printing the room name, I want it to print all the details of the room, just as if you’d carried out the LOOK action in the room (minus any triggered events caused by the player actually being there, of course). The room name and description are simple enough, but I’m stuck on how to print the contents of the room correctly.

[code]The field is a room. “A grassy field.” The player is in the field.

The forest is north of the field. “A thick forest.”

Some trees are in the forest.

A man called the suspicious-looking man is in the forest. “Skulking about under the trees is a suspicious-looking figure.”

The player is carrying the binoculars.

Looking toward is an action applying to one visible thing.
Understand “look [direction]” as looking toward.

Check looking toward:
if the binoculars are not touchable:
say “You don’t have your binoculars.” instead;
if the noun is not a direction:
say “You must specify a direction to look.” instead.

Carry out looking toward:
let the viewed room be the room noun from the location;
if the viewed room is not a room:
say “The winter forest is deceptively still.”;
try looking adjacent to the viewed room.

Looking adjacent to is an action applying to one visible thing.
Understand “look toward [any room]” as looking adjacent.

Check looking adjacent to:
if the noun is not a room, say “You must specify a location to look toward.” instead;
if the noun is the location, try looking instead;
if the noun is not an adjacent room, say “[The noun] is too far away.” instead.

Carry out looking adjacent to:
if the player is not holding the binoculars:
now the player is holding the binoculars;
say “You hold up your binoculars.”

Report looking adjacent to:
say “Peering through your binoculars, you see the [the noun] region.[paragraph break]”;
say “[the description of the noun]”.[/code]

One way would be to actually move the player there, then back. That is how the scrying in “Scroll Thief” was implemented.

That’s very much suboptimal. For one thing, it reprints the description of the player’s actual location when you move them back. There’s the complication of the player being on or in things, or other more complex locations. And any descriptions that relate to the presence of the player (“the suspicious-looking man eyes you warily”) would be wrong.

I’d much rather emulate the action, if possible.

You should be able to call the printing the locale description activity with “describe locale for foo” where foo is the name of the room you want to use. This doesn’t print the room name or the description - only the objects in the room.

True, but most methods will run into the same problems.

You can suppress that with something like this.

Move the player to the Kitchen, without printing a room description.

The easiest way around this is to record the “holder” of the player, meaning the container, supporter, or room which immediately contains them.

This is going to be a problem, and I don’t know if there’s a good way around this (though it will also apply to any other way of printing the room description, unless you write a second “distant description” for each location). You may just want to avoid such things in your room descriptions, or surround them with an if-statement to check if the player is actually there or not.

Busterwrites has got it. I knew there was probably a simple activity that handled it. Thanks!