"A Basic Door (Part 2)" by John Timmons
The release number is 1. The story creation year is 2007. The story headline is "Creating A Basic Door (Part 2)". The story description is "This is a variation of 'A Basic Door' where the player does not have to explicitly open a closed door before going through it. This is based on Example 117 'Higher Calling' in Chapter 8.13 Calling names in the Inform documentation."
Release along with the source text and a website.
[To eliminate the need for the player to explicitly open a door before going through, this before rule checks if the door is closed and, if it is, the player automatically opens it. This block of code can be copied & pasted into any game and will work.]
Before going through a closed door (called the blocking door):
say "(first opening [the blocking door])[line break]";
silently try opening the blocking door;
if the blocking door is closed, stop the action.
The Front Porch is a room. "Standing outside the house, you see a front door to the north."
[Here we create a door called 'front door'. We also make it scenery so that it won't be mentioned in the room description. We then say how it is situated direction-wise between the two rooms the door connects. This will also need to be explicitly mentioned in each of the room descriptions that the door connects so the player will know which way to go. By default, the player will have to open the door before going through it (and will stay open unless the player closes it.)]
The front door is a door and scenery. It is south of the Foyer and north of the Front Porch.
The Foyer is a room. "The foyer is at the front of the house and has a door leading south."
Test me with "x front door / n".