^
1
|
Details —
A single action in detail. |
Unlocking something with something (past tense unlocked it with)
Unlocking undoes the
effect of locking, and renders the noun openable again provided that the
actor is carrying the right key (which must be the second noun).
Unlocking can be performed on any kind of thing which provides the either/or
properties lockable, locked, openable and open. The 'can't unlock without a lock
rule' tests to see if the noun both provides the lockable property, and if
it is in fact lockable: it is then assumed that the other properties can
safely be checked. In the Standard Rules, the container and door kinds both
satisfy these requirements.
We can create a new kind on which opening, closing, locking and unlocking
will work thus: 'A briefcase is a kind of thing. A briefcase can be openable.
A briefcase can be open. A briefcase can be lockable. A briefcase can be
locked. A briefcase is usually openable, lockable, open and unlocked.'
Inform checks whether the key fits using the 'can't unlock without the correct
key rule'. To satisfy this, the actor must be directly holding the second
noun, and it must be the current value of the 'matching key' property for
the noun. (This property is seldom referred to directly because it is
automatically set by assertions like 'The silver key unlocks the wicket
gate.')
The Standard Rules provide locking and unlocking actions at a fairly basic
level: they can be much enhanced using the extension Locksmith by Emily
Short, which is included with all distributions of Inform.
Typed commands leading to this action
"open/unwrap/uncover [something] with [something preferably held]"
"unlock [something] with [something preferably held]"
Rules controlling this action
instead of doing something to the cables
check an actor unlocking something with can't unlock without a lock rule name unlist 1
check an actor unlocking something with can't unlock what's already unlocked rule name unlist 1
check an actor unlocking something with can't unlock without the correct key rule name unlist 1
carry out an actor unlocking something with standard unlocking rule name unlist
report an actor unlocking something with standard report unlocking rule name unlist 2