Exits Without Direction (adv3Lite)

EDIT: Solved. The key is just to do it by authorial fiat while being very careful about which objects are handling which actions, and what happens when they do. I wrote my own code to move the wagon, and it seems to be working.

I need the player to pull the little red wagon through a door that isn’t a door. This is in a room from which there are NO directional exits, because that’s the puzzle. At first I had the exits coded as simple Fixtures. That produced a stack overflow for some reason. So I changed the exits’ class to Passage.

Now I get a nil object reference at line 1319 of travel.t. (I think I’m making progress.) The parser is trying to construct an output message describing the travel, and it darn well wants to know what direction the player is using to exit the room. But the value returned by getDepartingDirection(gActor) is of course nil, because the actor is not traveling in a direction – she’s traveling more or less by authorial fiat. The direction in which the door is currently pointing is unknowable.

This is sort of a version of the classic code-an-elevator problem, but it’s not the same, because in an elevator the door is always in some known direction – east or whatever. What’s on the other side of the door will change, but the door itself is bog-standard. So if the player is in the elevator and types ‘e’, the parser can find the travel direction, no sweat. That won’t work here.

Just to be clear, the PC can travel through these directionless exits, no problem! The problem is pulling the wagon through the exit. That causes a PushTravelThrough or PushTravelVia action, something like that, and I don’t know how to circumvent it.

Suggestions would be very welcome…