Easy Doors by Hanon Ondricek

Daniel,
I added the omission rule:

The standard entering rule does nothing when the noun is an easydoor.

and it did not change the results. This is good because I didn’t want it to interfere with the other doors I had in the story, or Emily Short’s Locksmith extension.

I think the problem I have is that booth does not map to something in the rooms. I will try to fix that; otherwise, go out does work.

Yeah, that line is a fix for an unrelated issue.

OK, I think I got it working. Not sure if I understand it, but the player can examine the “booth” and enter one of the doors (only the priest door for now), and exit again. Should be easy to add the second Patron Niche room and doors.

Narthex is a room. "You are in the Narthex, filled with pews.".
Booth is a thing in the Narthex. "You see a black booth along the wall. You recognize it as a confessional for the church.". 
Description of booth is "A tall black booth, ornately decorated with gold-painted scrollwork. It has two small doors".

Outer Priest door is an easydoor in Narthex. Outer Priest door leads to Priest Niche. 
Dooraction is "You pass through into the darkness beyond.".
Description of outer priest door is "A simple handle allows access into the booth."
Printed name of Outer Priest door is "the priest door". 

Priest Niche is a room. 
Description of priest Niche is "You are inside a small room for the priest. It is cramped and dark in here.".

Outer Patron door is an easydoor in Narthex. Outer Patron door leads to Patron Niche. 
Dooraction is "You pass through into the darkness beyond.".
Description of outer patron door is "A simple handle allows access into the booth."
Printed name of Outer Patron door is "the patron door". 

Patron Niche is a room. 
Description of Patron Niche is "You are inside a small room. It is cramped and dark in here.".

Inner Priest door is an easydoor in Priest Niche. Inner Priest door leads to Narthex. 
Inner Priest door portals Outer Priest door. 
Dooraction is "The door closes behind you with a Click!". [Outpoint is Narthex.]
Printed name of Inner Priest door is "the small door from which you entered".

Understand "go out" as exiting.

Before entering something when location is Narthex:
	if noun is booth:
		say "Which side, priest door or patron door?" instead.

Instead of exiting when location is priest niche:
	try silently entering inner priest door;
	
test booth with "x booth/ enter booth/ enter priest door/ leave priest niche/ exit/ enter priest door/ go out".

I’m not sure “exit” works as expected, but at least this navigation works.

So my apologies that “exit” doesn’t work out of the box as one might imagine. As conceived, Easy Doors are “one-way directionless transportation to another location that behaves like a door” which can be gimmicked to work like a two-way door. The key word is “directionless” and they are basically a door-shaped object which recognize the player can potentially open and close them, possibly lock and unlock them, and enter them and land anywhere. Therefore there is no natural “outside” direction Inform 7 can infer from their existence that will automatically work with EXIT - unless the door leads to the inside of an enterable container, which is one of the possibilities with this extension.

I’m sure there’s a reason for creating the Priest/Patron Niches as rooms. If I were implementing I’d make them both permanently open enterable containers within the room, and then add Easy Doors in the location leading to each essentially just as scenery so the player can pretend to open and close them and the parser will recognize ENTER PRIEST NICHE DOOR and put the player in the container. Then just GET OUT or EXIT should work as expected and there’s no need for actual doors inside the container.

1 Like

Though if you’re making them enterable containers, you could also just make those containers be openable (and lockable if you like).

1 Like

Exactly. Easy Doors is a solution to some problems, but not all of them!

There are fiddly bits to account for with either the niches as rooms or niches as enterable containers approaches… I think life is probably overall simpler with the separate rooms and Easydoors.

(It occurs to me that a simpler version of Easydoors if one wanted only two-way doors would be fakedoors that were a kind of backdrop that was openable that one could just assert was in the rooms on both sides of it… but when I say simpler, I mean slightly simpler than writing Easydoors from scratch, not simpler than using Easydoors!)

1 Like

Honestly, one of the biggest benefits of easydoors to me is how easily you can write different descriptions (and just in general different code) for each side. I find it far easier than tacking “…when the location is X” onto all my rules.

2 Likes