I think that will give the same result. The “(first opening the red door)” is being printed by the rules for the going action, before the opening action is called.
The idea behind this response is to explain to the player why they’re getting responses for an opening action when what they typed was a GO command. (The player might not have realized there was a door in the way.) It’s a reasonable default, but you could change it to something else if you wanted. It’s called the “can’t go through closed doors rule response (A)”. You’ll find it in the Actions Index, in the check rules for the going action.
You probably just want to write an extra rule to cover the situation.
Instead of going east in the lounge when the red door is closed: say "You reach out to open the red door. 'Don't you touch that handle, kiddo!' cries poppa."
Alternately, include Implicit Actions by Eric Eve, which would by default change the message to “(first trying to open the door)”, and allows it to be customized quite extensively or suppressed.
This shouldn’t happen. The Instead rule runs before the Check rule which produces the (first opening…) message, and should prevent it from firing.
If there’s only going to be one door in any location, you can pick out its direction with “the direction of a random visible door from the location.” You can define a word for it:
To decide which direction is doorward: decide on the direction of a random visible door from the location.
If you might have several doors in a location, maybe it’s better to define an adjective meaning “towards a door”. This isn’t elegant but it works:
Definition: a direction (called D) is doorwise if the door D from the location is not nothing.
(If you’re only interested in closed doors, you can build that in as part of the definition too.)
Either of these can be used in rule conditions.
Instead of going doorward: ...
Instead of going doorwise: ...
That’s interesting. I thought that the condition “going through a closed door” only depended on the “door gone through” variable, but apparently it looks at the “room gone to” as well. So it’s not synonymous with “going when the door gone through is a closed door”.
Also (as an irrelevant aside), I hadn’t noticed before that the “room gone to” variable actually gets set twice: once in the “setting action variables” stage, and then again during the check stage (the determine map connections rule). I guess that’s to cater for some before rule jiggering up the map connections in between.