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].”;
else:
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]”
[/code]
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?