"Open" on non container property not working

From the documentation:

" > The umbrella is carried by the player. The umbrella can be open.

And now the umbrella, which is a thing and not a door or container, can also have the property."

Yet, in my code:

The maritime recovery trust letter is scenery in the hallway. The maritime recovery trust letter can be open. The maritime recovery trust letter is not open. The description of the maritime recovery trust letter is “[if not open]It looks official. It’s unopened[else]Blah[end if].”

Results in:

x letter
It looks official. It’s unopened.

open it
It isn’t something you can open.


What gives? I don’t understand why my code doesn’t work. It seems an exact equivalence to the documentation example. (I’ve not used “Instead”: I’ve written a “carry out opening” rule for the letter that moves it to the player’s inventory and so forth, and I’ve written a “report opening… instead” rule, and a “report examining … when the letter is open” rule.)

Hi John,
This is a bit confusing, but there are two different properties here, “open” and “openable,” and “openable” is different from “can be open.”

When you say the letter (or umbrella) “can be open,” that just means that the property “open” (and its opposite “closed”) can be assigned to the umbrella.

The property “openable” determines whether the opening action can be performed on the thing that has it. There’s a “can’t open what’s not openable” rule which checks whether the noun provides the property openable (that is, “can this thing ever be openable?”) and is openable (“is this thing openable right now?”).

This is different from “can be open,” because there are some things that can be open or closed but which the opening action doesn’t work on–think of a door that you open by pressing a button.

So if you want opening to work in the standard way, you should add:

The maritime recovery trust letter can be openable. The maritime recovery trust letter is openable.

(I think saying “The maritime recovery trust letter is openable scenery in the hallway” can also work–the Inform compiler knows that if something is declared as openable, it can be open.)

1 Like

Ah, thanks @matt_weiner it had me going around in circles! I was re-reading the check and carry out stages to try and see where I’d gotten lost, but I’ve got it now, I think. Muchas gracias for your explanation.