I7: would like special warning on room name in text

Here’s some code I have for X ROOM NAME.

[code]xrooming is an action applying to one visible thing.

understand “x [any room]” as xrooming.
understand “examine [any room]” as xrooming.

check xrooming:
if noun is location of player:
say “X/EXAMINE (ROOM) is equivalent to LOOK in Shuffling Around.”;
try looking instead;
if noun is visited:
say “You’ve been there, but you can’t see that far[x-room-n].”;
say “You haven’t gotten there yet, and you can’t see that far[x-room-n].”;

to say x-room-n:
say “[one of]. X ROOM is really just the same as LOOK for the room you’re in, and you don’t need to look ahead or behind[or][stopping]”

Now I am wondering if there is any way to do this for every verb, so the player knows that the room names aren’t particularly relevant.

I could put it in “after reading a command” or maybe in the parser error code, but the problem is, if a room is named, say, Busiest Subsite, you need to check for each word, and so

if the player's command includes "[location of the player]"

would miss tha.

Is there an easy way to parse things?

You could use a “deciding the scope of the player” rule to add the current room to scope, and then write a “Before doing something to a room” rule to reject the action (except perhaps examining).

That would only allow referring to the current room, of course. (And I haven’t tested it.)

Putting every room in scope this way is also possible. However, you could get some unpleasant disambiguation responses. “X ROOM” could list a great number of rooms, none of which would actually be examinable; this might annoy the player.

Thanks. That knocks things out simply and effectively. I try to keep away from scope issues due to issues like you mentioned, but yeah, scope was made for this sort of thing where I only look for one room.