Mapped above, mapped below

I think this is a bug in Inform 7 (6M62), but it might be a weird piece of English syntax that I’m not parsing correctly?

I’m going to dynamically connect two rooms vertically, like this:

Empire State Building is a room. "You are on the roof, where airships moor on a regular basis."

Hindenberg is a room. "You are inside the famous unsinkable airship." 

Instead of waiting:
	say "The zeppelin arrives!";
	now Hindenberg is mapped above Empire State Building;
	now Empire State Building is mapped below Hindenberg.

But this is what happens:

Empire State Building
You are on the roof, where airships moor on a regular basis.

>up
You can't go that way.

>down
You can't go that way.

>wait
The zeppelin arrives!

>up
You can't go that way.

>down

Hindenberg
You are inside the famous unsinkable airship.

>up

Empire State Building
You are on the roof, where airships moor on a regular basis.

So evidently is mapped above means the same thing as “is down from,” or “is below,” and is mapped below means “is up from” or “is above.” And when I put it that way, I’m almost positive this isn’t how it’s supposed to work.

2 Likes

That’s a bug.

The “regular” form of this declaration would be

	now Hindenberg is mapped up of Empire State Building;
	now Empire State Building is mapped down of Hindenberg;

(Analogously to “mapped north of”, etc.) This works as desired. But the phrasing is clunky so the Standard Rules have the lines

The verb to be above means the reversed mapping up relation.
The verb to be mapped above means the reversed mapping up relation.
The verb to be below means the reversed mapping down relation.
The verb to be mapped below means the reversed mapping down relation.

Apparently these are backwards. Probably got flipped by a relation bug fix somewhere along the line, and nobody noticed.

You could also say

	change up exit of Empire State Building to Hindenberg;
	change down exit of Hindenberg to Empire State Building;

This compiles to the same thing.

2 Likes

So then the following is another candidate for addition to the patches extension (extensions/6M62 Patches.i7x at master · i7/extensions · GitHub)? (EDIT: No, it’s not! See Zed’s post below.)

[ Code deleted ]

To zarf’s point, WWI 8.5 Change of properties with values says:

“Now” is a simple way to change many things in Inform, but it’s cumbersome to change the map of the model world using “now”, because the map is such a complicated arrangement. (It’s not a property: it’s a sort of mesh of relations.) So a special phrase exists to change map connections…

It happened in 6L38, apparently to fix this, from 6L38’s Change Log:

Bug fixed (0001373) whereby “The Attic is above the Parlor” would work,
but “The Attic is a room above the Parlor” would make a connection
the wrong way (up from the Attic to the Parlor rather than vice versa).

If you change the reversed mappings to mapping, Ryan’s example works, but you get Bug 1373 back and

The parlor is a room.
The attic is a room above the parlor.
The parlor is below the attic.

gets you

parlor
 
>u
 
attic
 
>u
 
parlor
 
> 
1 Like